11-06-2020 04:14 AM
hi friends
I am using labview to create an excel report, and also, I am using an excel template.
everything works well with my computer, and I can get an Excel template format report, also, I generated a exe application file and installer file, I run exe application file on my computer, it also works well.
but if I move to another PC, and install the installation file and then run the exe file, the programme run well, the only thing I have is that the report can not be generated, and there is no any error message showing the problem. in my computer, when I press save file button in front panel, there is a pop-up window to ask for the file path, and after I press save , then the dialog window disappears , also the excel file will be saved automatically. in another computer,I do the same, but there is no any file saved.
more information for your reference.
my computer, win10, office 365. I am using excel 1997-2003 template in labview. also, Excel file is named as XX.xls.
another computer
win7, originally, kingsoft WPS(compatible with office),
also, after I have tried several times, the issue could no disappear, then I download the Kingsoft, and then install office 2007, but the issue remains no change.
see attached for the file saving block diagram, appreciate if someone can give me some ideas on this.
Solved! Go to Solution.
11-06-2020 11:41 AM
1. Report Generation Toolkit uses ActiveX.
Although Kingsoft can open Excel file, doesn't mean it supports ActiveX.
2. You are using different versions of Excel. That could be a problem.
3. Display the error cluster from the RGT on the front panel of your file saving VI to catch errors.
11-06-2020 12:47 PM
The Report Generation Toolkit should be able to handle this simple task. It definitely works with Windows 10 and Office 365. However, your Template is in a very old (obsolete?) version of Excel.
I think this might fix it --
It should work. If it doesn't, please attach the following:
Something to note -- LabVIEW and Excel mean different things by a Template file. Excel template files have a special extension, .xlt, and Excel does special things with these files. The LabVIEW meaning is simply "Please open this file and use it". Excel (I think) does a renaming of its "Template" file -- you open a .xlt File, and save a .xls File. LabVIEW opens a .xlsx File, and saves a .xlsx File (with the name needing to be explicitly set by the Save Report to File).
Bob Schor
11-09-2020 12:26 AM
Thanks Bob, I tried the way according to your suggestions, but it still has no change, works well with my computer(office 365), but can not generate any report with another computer(Kingsoft only, no office installed). aslo I tried with other computers(kingsoft installed only, no office), it also can not generate any EXCEL report.
attached is the code package, also, I attached the template together.
appreciate if you can help me to dig more on the issue, this is the last barrier of my code, I hope to get it done ASAP, thanks.
11-09-2020 01:52 AM - edited 11-09-2020 01:55 AM
Hi Powerdou,
@Powerdou wrote:
works well with my computer(office 365), but can not generate any report with another computer(Kingsoft only, no office installed).
The RGT is made to work with MicrosoftOffice. (As is stated here.)
As you have already noted it works with MicrosoftOffice (365), but does not work with your other "Kingsoft" office suite.
I see two options:
Ofcourse there is a 3rd option:
11-09-2020 02:06 AM
GerdW,
thanks for your input, but one more question, for another computer, the computer was installed with Kingsoft, and excel file can not be generated, but I also mentioned , I tried to uninstall the kingsoft, and then installed office2007, the issued did not change. that means, the same labview exe file can run properly on my computer(office installed), but can not generate excel file on another computer(firstly kingsoft, then office installed after I uninstalled the kingsoft).
11-09-2020 02:17 AM
Hi Powerdou,
@Powerdou wrote:
I tried to uninstall the kingsoft, and then installed office2007, the issued did not change. that means, the same labview exe file can run properly on my computer(office installed), but can not generate excel file on another computer(firstly kingsoft, then office installed after I uninstalled the kingsoft).
I don't know if Office2007 was installed correctly after uninstalling "kingsoft" on this very computer.
I know for sure Microsoft changes/changed the ActiveX API with each Office version in subtle details, which sometimes requires to update a VI because of a changed ActiveX method. Surely there were changes between Office2007 and Office365: a VI running nicely with Office365 can give problems when calling an old Office2007.
You surely have an error message/number (or even an error log) in your executable so you determine the error reason, don't you?
11-09-2020 03:54 AM
thank you GerdW, just checked the error message, I attached the message, looks like that is introduced by new report vi and file saving vi.
to be honest, I just am a about 2 months learner of Labview, not familiar with all error message, I appreciate if you can give me further help.
BTW, is there another easy way to create an EXCEL report? I just want to get a template formated EXCEL file for a report.
thanks.
11-09-2020 04:06 AM
Hi Powerdou,
@Powerdou wrote:
just checked the error message, I attached the message, looks like that is introduced by new report vi and file saving vi.
This is a simple "File not found" error. Either a (template?) file is missing or it's due to your "Kingsoft" tools…
@Powerdou wrote:
BTW, is there another easy way to create an EXCEL report? I just want to get a template formated EXCEL file for a report.
I already mentioned XLR8.
I know there are other tools available in VIPM to access Excel files but forgot their name. See for yourself!
11-09-2020 09:03 AM
Sorry for the delay, but I didn't have LabVIEW 2020 installed yet, so I installed it on a VM (I'll need it, eventually ...).
I made a few simplifications of your code, including saving your data in chronological order (earliest first, rather than latest first), and didn't try to do multiple Saves (after I pushed "Save", I pushed "Stop"). I also added a Stop button (and a second "Quit" button to stop the Save loop).
I simplified the generation of 16 simulated data triplets by using a nested For loop, and used a Shift Register to hold the growing Table.
When I ran this, I got a very nicely-formatted output, Flow Table, BS.xlsx, which I've attached. Here's a Snippet of my version of your code (note that I placed your file on my Desktop, hence the revised building of the File Paths. I noticed that some of your Excel files were Password-protected -- I have no idea if that will cause problems with LabVIEW, but I had no trouble with the code I've attached ...
Bob Schor