export records to excel file in filemaker go
using script from filemaker pro
I use a scripted export to CSV (which Excel can open). See if this link helps:
in export excel file i want just send this file to mail never save him in ipad
Once exported, the script can attach the file to an email and send it.
In Attach file i saved in windows path
when i run app in ipad and i click export
show me message error say : connot create this path
You would do it this way:
Use set variable to compute a file path for your export and assign it to the variable.
Use the variable to export the data
Use the variable to attach the file.
You may need to put a short pause between exporting and sending to make sure that the file has been exported fully before send mail tries to attach and send it.
In both Export Records and Send Mail, you get the same dialog where you specify the name and location of a file, one for your export and one for your attachment. In both places you simply type in the name of your variable.
There are get functions that calculate file paths to standard locations as determined by the current device executing the script that you can use in the set variable step. If memory serves correct, you can use the Get ( TemporaryPath ) function call to get a path that works on all your devices whether iOS, Mac or Windows.
philmodjunk plz you can explained that with example script
Gee patience, I'm not on 24 hour call or something.
First, don't clear the $Path variable!
You'll need it exactly as you set it up in the first line in order to attach the exported file inside your send mail script step.
Second, you'll need to stop using repeating fields to store your data in this table. Using repeating fields to store data (as opposed to using it as part of a user interface for temporary display/data entry) is not a good idea in the first place. I don't know the structure of your file nor why you used a repeating field (Which were replaced by related tables and portals for most uses back when FileMaker 3, the first relational version of FileMaker, was released), so I can't say much more than that at this point in the conversation.
One hint: Since FileMaker 3, there's been a useful trick where you can import data from a table's set of repeating fields into a new related table very easily. When you set up the import, FileMaker will ask you if you want to split the data from the repeating fields into separate records and this option makes it very easy to export your data and split it up at the same time.
i am very sorry,
And Thank you For helping
i have another question ??
if i open excel file in filemaker go, it's like this :
it's possible to change the file format (for example add colours, merge lines..).
and Thank you So Much philmodjunk For Helping
Sorry, but this is not possible in an export from FileMaker Go,
philmodjunk Ok, Thank you master
What you can do is format an Excel file created with Excel the way that you want it and then import the data from the exported file into it. This is outside my area of expertise, but you might even be able to set up a Macro or VBA script in Excel to automate the import.
The problem you encountered is that Windows filepaths are not GO filepaths.
IF you use the temporary directory in GO or Pro, then the system should delete the file eventually.
set var $filename to "whatever"
Set var $path to get(temporarypath) & $filename
export to $path
send email and attach file $path
or you could just use $filename and the file will show up in the launch center and you can open it or delete it.
Retrieving data ...