Are you using the file import menu item? You might want to try dragging the excel file onto the Filemaker Icon. I don't know if this would be different.
The closest approximation of this that I can come up with is to script it. But then you're still doing it twice, you're just having the script do these two imports in automatic succession for you.
Thanks. That's pretty much what I do now. I use a script to import the first worksheet then have it import the second, but I still have to select the Excel file between the first and second import. I've tried, without any luck, to come up with a better way.
I gather that it's not the same file name each time. Best fix I can think of is to rename your excel file so that it always has the same name and always resides in the same folder. (You could rename and place copies of your file in a designated folder for example.) Then your scripted import could import the data without ever asking for a filename.
Unfortunately, renaming the file is not an option but thanks.
Please note that I suggested renaming a copy of your excel file rather than renaming the orignal. That approach can preserve the filenames of your originals. Some savvy developers may have a batch file (windows) or Applescript that can automate the process.
You could have users select the file to import by using the Insert File script step. Use a global container field as the target, and pre-select 'Store only as reference'.
Once you have the reference to the file in the container, you can extract the path using GetAsText (gContainerField), place it into a variable and proceed with the imports.
I like what I am reading but...
Once I have the file path in a field, how do I use that field in a script that imports data from the file?
Since "comment" hasn't responded, I thought I should jump in before more time passes.
Once you have the file path in a field, store the contents of that field into a variable. For example:
Set Variable ( $path ; "file:" & <fieldname> ]
Then, in the Import Records script step, where you specify the data source, use $path.