08-09-2023 03:23 AM
Hi,
I want to use the report generation toolkit to save to an existing Excel file. But all it is doing is creating a new Excel and I have to save it. How do I save to an existing file. I am using the report generation toolkit because I need to save in .xlsx format and also be able to choose the worksheet in which I save. I have attached the code. Thank You.
08-09-2023 04:10 AM - edited 08-09-2023 04:11 AM
08-09-2023 04:21 AM
The build path is not important. I can directly connect a path to it and still get the same result that is open a new .xlsx file instead of adding to existing one. I have uploaded a updated one with a direct path instead of built path. With this program I get the same output as before.
08-09-2023 04:35 AM
Hi govindsankar,
@govindsankar wrote:
The build path is not important. I can directly connect a path to it and still get the same result that is open a new .xlsx file instead of adding to existing one. I have uploaded a updated one with a direct path instead of built path. With this program I get the same output as before.
You forgot to actually save your report - you just edit the template!
Use the DisposeReport function…
08-09-2023 05:40 AM
DisposeReport function is creating a copy of the original file and not saving it to the existing file.
08-09-2023 05:57 AM - edited 08-09-2023 06:08 AM
Hi govindsankar,
@govindsankar wrote:
DisposeReport function is creating a copy of the original file and not saving it to the existing file.
Nope, for me it saved the template file…
(What have you tried now?)
This worked for me:
08-09-2023 06:00 AM - edited 08-09-2023 06:18 AM
08-09-2023 06:29 AM
There is no create report in the report generation toolkit for me.
08-09-2023 07:18 AM
Got it. Finally got it working.
08-09-2023 07:32 AM
There are some subtle omissions in the posted code examples (although Raphaël got it right). If you want to insert information into an existing Workbook/Worksheet, you need to do the following:
That should work. Try it, and if it doesn't, make a folder with your VI + the Template file (.xlsx) that you want to use + a Data file that you want to insert into the Template (and where you want it to go). Giving us Real Code and Real Data to chew on will let one (or more!) of us return a "Fixed Example" to you.
Bob Schor