LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Report Generation Error

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.

 

0 Kudos
Message 1 of 7
(114 Views)

Sorry forgot to attach the project in earlier port

 

Project attached in this post

0 Kudos
Message 2 of 7
(112 Views)

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....

aputman_0-1731595695892.png

No Report to File for Excel.

aputman_1-1731595722275.png

 

Add Excel-specific VI....

aputman_2-1731595755991.png

Save Report to File for Excel is now available. 

aputman_3-1731595773514.png

 

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 7
(74 Views)

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

 

0 Kudos
Message 4 of 7
(62 Views)

Try the suggestions in this thread:

https://forums.ni.com/t5/LabVIEW/tmp-file-is-created-by-NI-Report-generation-toolkit-for-logging/td-...

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 7
(57 Views)

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 

0 Kudos
Message 6 of 7
(32 Views)

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. 

sdepot_0-1731686392638.png

 

0 Kudos
Message 7 of 7
(13 Views)