LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Append to excel file (not csv)

Solved!
Go to solution

Ill give it a try.

Thanks

 

0 Kudos
Message 11 of 17
(1,062 Views)

Found it! 

Also gave some thoughts about other part I wanted to change.

Thanks a lot!

0 Kudos
Message 12 of 17
(1,058 Views)

Sorry, I could not test on my current computer because it seems my report generation is broken. I always get error 1498 "LabVIEW attempted to load the class at this path: C:\Program Files\National Instruments\LabVIEW 2020\vi.lib\Utility\NIReport.llb\Excel\NI_Excel.lvclass".

 

You also did not attach the template.

0 Kudos
Message 13 of 17
(1,052 Views)

Here is the template. 

I assume you know where to put the file. 

I'm not getting this error. At least excel vi is working )

0 Kudos
Message 14 of 17
(1,044 Views)

@alexela wrote:

 

I know that it looks wired, but I need it that way (this is the only part from big project I want to replace)

Now I have CSV file, but I need it to be excel file from the start.

 


Have you considered:

  1. write to a .csv file as the program does now
  2. At the end of your program open the .csv
  3. Convert the .csv to to an Excel file (.xlsx)
  4. Delete the .csv file
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 15 of 17
(1,025 Views)

I saw this solution in my head, but wanted to avoid it.

Thanks

0 Kudos
Message 16 of 17
(979 Views)

@Alexela,

 

I don't know if you have really "solved" your problem (though you marked a "Solution", you still seem to be having trouble and don't quite understand how to use the RGT to write the Excel file you want).  Here are some points:

  • Pay attention to the Revised Example I posted 8 years ago.
  • Use the Excel Easy Table function instead of Append Table to Report.
  • If you have a Template File with the Header you want in Row 1, you don't need to write the header in your LabVIEW code!  If you already know the header is in Row 1, you can tell Easy Table to start writing data in Row 2!  [Note that Cell A2, the second row, first column, has Coordinates 1, 0, or (Row-1, Column-1)].  No need to figure out the last line when you start with a "known configuration".
  • Try to keep your code (and your thinking!) neat and structured.  Note that the Easy Table functions will tell you, after you write out some rows/columns, where the "next set" of rows and columns (for the next Easy Table write) should go.  Refer to my Revised Example to see how to use this.

Bob Schor

0 Kudos
Message 17 of 17
(967 Views)