09-23-2010 12:04 PM
I am using the Report toolkit vi's to build a multi sheet Excel report. I'm using the New Report.vi, Excel Easy Text.vi, the Excel Run Macro.vi which prints the report, and finally the Save Report to File.vi. Most of the time it works fine but occasionally it won't save the report. The report alwaysprints fine. If I try to save it manually from the Excel menu I get a message "File too corrupt to save". I don't see any corruption of the data in the workbook. The workbook contains 24 hours of raw data taken every 5 seconds and several other sheets that perform calculations on the raw data plus the final printed report so the file is large. About 5.5 megabytes. If I copy and paste all the worksheets to another workbook and rename it, it will save so were not losing our data. The LV program generates a report file name based on test start time and attempts to save the named file in a unique directory generated and created earlier in the program to a network drive. I'm using LV8.5.1. This has been a mystery for a while and may have nothing to do with LV but would be happy to hear from anyone that has a clue. Because I don't.
09-24-2010 11:25 AM
Hello,
Is this error a LabVIEW error or an Excel error? Can you provide a screenshot of your error?
I would suggest isolating this from your application. Can you reproduce this issue with a constant set of data? What if we simply open the report, add this constant array and save it to file. Does this reproduce the error.
If that does not throw the same error, I would then replace the array with your actual data. Then add in the macro. While doing this, constantly test to see when the problem arises again.
Hope this helps!
09-24-2010 11:29 AM - edited 09-24-2010 11:30 AM
Thanks for laying out that procedure. Makes sense. I'll see what I can do. It is an Excel error BTW.