11-14-2024 01:26 AM
Hello
I am using Excel report generation toolkit to create a template report. Its a DAY report, in which the a SINGLE ROW will be added to existing/new report after every test, i.e. ever time the subvi executes, a single row will be added to the excel file
My Issue
1. I am able to create the new excel file from the template and add the single line report, but whenever the vi executes, it throws an error while saving the excel file "Save report to File.vi"
2. I have tried to use clear error vi to remove this error. But some how after some while, the report stops generating and a *.tmp file starts getting created
3. I have attached some reports generated
To test my code, in the cluster, change the "DAY REPORT TEMPLATE FILE" . Select browse button on the Path Control and choose "DAY_REPORT_TEMPLATE.xlsx" file
I am using LabVIEW 2020 SP1 32 bit and
Microsoft® Excel® 2021 MSO (Version 2410 Build 16.0.18129.20100) 64-bit
Kindly provide help on this issue.
11-14-2024 01:28 AM
Sorry forgot to attach the project in earlier port
Project attached in this post
11-14-2024 08:52 AM
I can't open your file but I'm going to assume this is your problem because it is a common issue.
If you haven't added NI_Excel.lvclass to your project or you haven't used an Excel-specific VI, the VI needed to save an Excel file is not loaded, even though you specify Report Type as Excel.
No Excel-specific VI....
No Report to File for Excel.
Add Excel-specific VI....
Save Report to File for Excel is now available.
11-14-2024 11:40 AM
Hello
Thanks for the suggestion, but still the problem is not getting resolved
I have added "NI_Excel.lvclass" to my project and also the "Excel get activex reference vi" which you had suggested
The problem is that if I clear errors after excel File save, it sometimes works, but sometimes it creates a *.tmp files
The save excel throws error which is as follows
Exception occured in Microsoft Excel: Cannot access '14-11-2024.xlsx'.Help Path is xlmain11.chm and context 0 in NI_ReportGenerationToolkit.lvlib:Excel_Save_Workbook.vi->NI_Excel.lvclass:Save Report to File.vi->AUTO_UI_DAY_REPORT_TRIAL_SUBVI.vi
attached the project folder for the reference
11-14-2024 11:50 AM
Try the suggestions in this thread:
11-14-2024 11:10 PM
Hello
I had gone through that post before I posted here. Somehow that points highlighted in that post is not applicable in my case.
The only thought I am having and if someone can through insight is, that could the problem arise, if I am using the same excel file over and over again?
My use case is that, in my test bench, I am getting results after every periodic test complete cycle. In a day I might have several testing cycles of DUT in the production line.
So I want to save the data in formatted condition to a file. So when the test completed, I append the new data to the same excel file.
Could this be a problem?
I could solve this by creating a *.csv file, but since the formatting is not applicable in csv format, the report does not look appealing.
Thanks
11-15-2024 10:00 AM - edited 11-15-2024 10:03 AM
Hi I also just ran into this issue this week. Curious if your company's IT department just implemented a requirement to add a "sensitivity label", seen in the capture below, onto Microsoft Office files (Word, Excel, etc.). In my case, I cannot save a file unless I explicitely select an option from the dropdown. There is no default and LabVIEW does not support setting this with a built-in VI (that I am aware of). I am thinking this is the route of my issue, which is the exact same as the OP's.