Editing the Default Excel Export Template

  • Software
  • Editing the Default Excel Export Template
Jacob Hulinsky

Posted on 18.10.2024 14:58

Hello,


I am looking to export data into a custom excel spreadsheet template which does not include the 'DataInfo' or 'Events' sheets by default. I'm developing a data post-processing script in a different software program and would like to simplify the data being imported from DewesoftX as much as possible. I have a hunch that the Empty [Data Only] and Empty template [with only data available] scripts have something to do with the default export format, as deleting them completely breaks DewesoftX's ability to export to Excel, but so far have been unable to figure out how to permanently modify them. Has anybody found success with this?

Corey Schwanz
Support Tech Manager
Posted on 21.10.2024 14:52

Hey Jacob,


Thanks for your question. I've been playing around with modifying the existing templates or making modifications to an existing one and I have some good news and some bad news. Firstly, it IS possible to modify an existing template without breaking the DEWESoft export. The easiest way to get to these is by clicking Options button in the top right corner of your DEWESoft windows and going to Settings, then in the File and Folders tab on the left click "System Folder."


In this System folder there will be another folder called Scripts; that is where the DEWESoft Excel templates are located. All templates exist in three components: an *.xlt, and *.xltx, and an *.xps file. All of these need to exist and be present for you to properly export and have the new ones show up in DEWESoft. I modified the default Empty (Data Only) template and actually removed the DataInfo and Events sheets entirely so the only one left was the data itself, but whenever I exported the supplementary sheets were automatically included. They contain DEWESoft-specific metadata, such as file name and recording time, so it looks like they are required no matter what and we can't get around that. But the good news is that it doesn't compromise the export itself so there is no way to break that as long as you have the proper components. If you make your own templates instead of modifying an existing one make sure you have those three constituent files and you should be able to export.


In this instance the easiest way to remove those extra sheets for your separate software would be to create a VBA Script to delete the sheets after DEWESoft exports the file using your preferred template. I found a couple of resources that specifically are about this: https://excelchamps.com/vba/delete-sheet/ and https://stackoverflow.com/questions/31475376/delete-worksheet-in-excel-using-vba So you can export directly out of DEWESoft, run this macro and have it churn out a properly modified file, and then have it import into your analysis software. I think that would be the easiest way to accomplish what you need. Please let me know how this works for you!

Jacob Hulinsky

Posted on 21.10.2024 14:57

@Corey Schwanz


Thank you very much for the detailed reply! This is incredibly helpful.

Login to reply to this topic. If you don't have account yet, you can signup for free account .