Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

how to manipulate csv report headers

Is there any way to manipulate the column headers for a csv report? Normally I would just create an expression and name it whatever I would like the header to read and the log the expression. But I am developing an app for test equipment and the names of the signals will be different each time it is used, so I cannot use my prevuous method. I would really like to somehow use a text entry to define the header columns.
0 Kudos
Message 1 of 3
(3,210 Views)


Hello Carl,

I am attaching an example LKS file which uses two Spreadsheet objects to accomplish custom headers for the CSV file. The "tirck" here is to use the two objects to write to the same CSV file.

The first object, uses TextEntry objects and logs them ONLY once -- thus giving us the headers (plus one entry). Subsequent logs should all use the second object to log the actual data.

So you need to setup the Sheet1 object so that it logs only once when a fresh test is being started.

The not-so-good part of this is that the first object which sets up the headers also makes one entry when it's asked to log once. However, this can be used to our advantage and maybe enter some description for the headers in here (this will be tak
en from the TextEntry inputs).

I am also attaching the sample CSV generated. Of course, we can always write macros and whatnot in Excel to make all this pretty and good. That requires some time and learning though.

Hope this helps.

Regards,

Khalid


Download All
Message 2 of 3
(3,210 Views)
Thanks Khalid (Again)!! I can't speak for everyone, but I know I'm glad you're out there.
0 Kudos
Message 3 of 3
(3,210 Views)