03-22-2023 02:02 AM
Saving EXCEL REPORT worked well in LABVIEW 2019 version, but it did not work in LABVIEW 2022 version, so when I checked the source, the 2022 version of the Excel_Save_Workbook.vi source was disabled.
I would appreciate it if you could let me know if I can unlock that disabled part and use it or if I need to use another function.
03-22-2023 04:39 AM
Check for Relink option.
Also you may need to select the proper MSExcel from Automation refnum if there is a change in version.
03-22-2023 03:18 PM
Many years ago (2014?), I posted a "Revised Excel Demo" here on the Forum (that's not the exact name of the Post, but if you start typing that, by the time you finish "Excel", it should be pointing you to the code). I just tried it in LabVIEW 2022 Q3, and it ran, but I didn't see the save. I tried again with LabVIEW 2021, and it worked fine. So I tried it "one mo' time" with LabVIEW 2022 Q3, and ... it ran just fine.
What I suspect happened (because I was "watching" what LabVIEW did when it did a Save Report to File) is that there is, indeed, a "bug" in the NI code that writes the file. I remember about a week ago stumbling on this, wrote a little fix, and now the fix appears to have "spread" and possibly "cured" LabVIEW 2022.
Sadly, I didn't document it at the time. The Good News is that I may be able to re-create this, if by at least looking in VI.lib for a VI with a March 2023 date. If so, I'll certainly post it ...
Bob Schor
03-22-2023 03:38 PM
OK, I don't get it! I actually found (and fixed!) a bug in LabVIEW 2019, which I'll describe in a bit more detail after I have a chance to study the LabVIEW code for LabVIEW 2020, 2021, and 2022 (which I fully expect to be identical with the Original LabVIEW 2019 version, which I cleverly renamed Yadda-yadda Orig.vi).
So here was the bug -- I was developing some test utilities that output a 5-WorkSheet Excel WorkBook. While testing, I used the same File Name for the output file, so when I got to the Save Report function, I got asked if I wanted to overwrite the file. If I said "Yes", it happily overwrote it just fine. But when I said "No", I got "Error 43" (to which I took offense!). Turns out this appears to be an "unexpected Feature" that NI didn't stumble upon. Let me do a little more testing, and I'll at least explain this situation.
Meanwhile, I'll also try (with an "unpatched" PC) to duplicate the Original Poster's problem. Maybe just rebooting this PC will cause it to "magically reappear" -- I'll try that, too.
Bob Schor