I am trying to update an excel file from data in a jmp table in a script. I know how to do this manually by using the save database command however when I try this in a script I get a that the 'file already exist'. When I use the manual save database command I do not get the 'file already exist' error. Any ideas? The command that shows up in the log and is what I've tried in my script looks like this: DataTable("table") << Create Table ("DSN=Excel Files;C:\file.xlsx;DefaultDir=C:\; DriverId=1046;MaxBufferSize=2048;PageTimeout=5;","table name";
This command seems to write the file although I want to update the file. The manual method updates the file instead of trying to create it. I'm thinking it must be a simple fix.
The interactive version does a "Drop Table" command before it does the Save Table. Otherwise, the database will refuse the update. If you want to do the replace through JSL, you'll need to perform the Drop Table.