Hi is this possible? I have a script on a button now that save records as excel, but this the webdirect dont understand..
Well there are three answers:
No because web direct doesn't do save records as excel or export records in excel format (I will slap a big kiss on the lips then fall at the feet and worship the FileMaker engineer who implements this).
Maybe because we can export field contents. If you create a global field and populate it with text that looks like a csv file then do export field contents this can come pretty close. Your file would look like this
Name, Address, Hat Size
If you are feeling mega clever then you could probably recreate the Excel XML file format using some serious bad ass XSLT XML hackery. I have used this in the dim and distant to create RTF files, Russ Cohen and beverly are masochistic enough to still do this kind of thing so maybe they can chime in....
Yes because in some circumstances you can put an spreadsheet in a container field and then export that. For example when we print an invoice we save an excel version as some of our clients on the extranet prefer this. Exporting from a container doesn't care about the file format.
There is a way to do this that might work for you... What you can do is have a script that sets a variable to the the file name you would like, e.g. 'MyExport.csv' and then do an Export, exporting as 'Merge' format with the destination being the file name variable you set...
This works well in WebDirect and the CSV file can be opened by Excel, and has column headers :-)
The script would look something like:
Set Variable [ $path; Value:"MyExport.csv" ]
Export Records [ With dialog: Off ; "$path" ; Macintosh ]
With the Export Records 'Specify Output File' options looking like:
When the script is run in WebDirect you will get something like the following, which downloads the CSV file to the user's Downloads folder...
well, if I were using Web, I would use CWP and PHP (which can write Excel). But if export as .csv (or .mer renamed as .csv) OR export as .htm work, then I would use them with Web Direct. Excel can open these kinds of files just fine.
I forgot about MER exports but I tend to build the text into a CSV so I can choose field names
Thanks alot for you input. I dont seem to get the "download files" dialog to show?
What if there is som related portal data on the current window that the user is doing this export from, we want to have does as wel in this mer file?
Retrieving data ...