Ilogic code to export BOM to excel file overwrites data in excel file

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to create Ilogic code that opens an excel template file (with existing data in multiple tabs), performs a save as (Ilogic handles the naming schema), then exports the structured BOM to an existing tab in the new file. The open and save as perform without issue, but I can't get the BOM to export without one of the following issues occurring.
1. The BOM is written to the new excel file but all tabs and pre-existing data are lost.
Or....
2. When exporting the BOM I am prompted that the file I am writing to is read only, and asked to do a save as. If I save as, all the data is retained and a new tab is created containing the BOM. This is not ideal because I am prompted for a file name during the save as and the BOM is not saved to the tab I need it to be.
Any help is appreciated!