If you are completely discarding the current copy of D:\Filemaker\CompaniesCities.xlsx for a new copy with your exported data, then you can put together a script step like this:
Set Variable: [$Path ; Value: "D:\Filemaker\CompaniesCities.xlsx"]
Then thpe in $Path (no quotes) as the OutPut file.
If you want to append the data to data already present in that excel file, then this can be done, but it's much more complex an undertaking.
It's necessary to actually replace the data on a specific sheet in within the Excel file.
However -- believe your succinct solution will get me to the point where the rest will just plain have to be done in Excel.
It is possible to export the data to a different file and then trigger Excel to import the data. I haven't done this, but others here in the forum have been able to fully automate the process.
It's not working.
For some reason the script is excluding the D: from the path.
Can you post the script that you are using?
To post a script to the forum:
- You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
- If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script (options 2 and 3), you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format. (Use the HTML option on the database tab panel and paste the text into the forum's HTML editor.)
And also post what you have entered in the File Reference dialog in the Export Records step.
I found the problem.
Looking at the export guidelines closely ... You can't use the normal Windows path, copied from the directory window. It needs to see a foreslash as opposed to a backslash, and that foreslash also has to go in front of the drive letter.
So "D:\Filemaker\CompaniesCities.xlsx" in export terms has to be "/D:/Filemaker/CompaniesCities.xlsx" .
At least, that's what works.
Good catch. You can actually use \, but then you have to use it twice for every instance of the slash as it's the "escape" character when used inside a quoted string of text. (\" placed inside a quoted screen escapes the " to include it as a character inside the quoted string instead of the quotes that end the string of quoted text...)