LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write position inside a spread sheet

Hi all,

 

appologies for the basic posts recently, Its all coming together slowly!

 

With the guidance from people on here, i've managed to get a nice self test program working which im happy with for core 1 progress. The final job i need to do is make it record the resutls to a spread sheet. Ive managed this sucessfully using the built in spread sheet and write functions. However, I now need a way of telling labview where to write the data INSIDE the spread sheet. For example, (in my state maching architecture), one case may test the mains voltage on a PCB, and record the results in column 1 of the spread sheet. The next case may test the current draw of a PCB, but when it records the data, it adds it to the end of colum 1 of the spread sheet. How do i specify where abouts in the spread sheet the data is stored ?

 

thanks and hope this makes sense, Ill will attach code if needed,

 

Richard.

0 Kudos
Message 1 of 6
(3,336 Views)

@lvrichard wrote:

 

thanks and hope this makes sense, Ill will attach code if needed,

 

Richard.


Yes, attach the code, please

0 Kudos
Message 2 of 6
(3,321 Views)

Hi richard,

 

a "spread sheet" usually is just a 2D array of strings.

All you need to do is to put the strings with your measurement results in the correct element of a predefined 2D array of (empty) strings. ReplaceArraySubset is your friend then…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(3,305 Views)
0 Kudos
Message 4 of 6
(3,296 Views)

Hi,

 

Please see my attached code, I have tried to implement the recording in batt voltage case

 

thanks,

 

 

0 Kudos
Message 5 of 6
(3,291 Views)

I notice that your code specifies the filename "tedt.xls".  I assume you know that the LabVIEW "Write Delimited Spreadsheet" function does not write an Excel (.xls) file, but rather writes a text file, and since you have specified commas as the separator, this is a .csv (comma-separated variables) file.  If you do use the Report Generation Toolkit to write an Excel file, then you can, of course, replace a cell (e.g. "G12") with new data.  Otherwise, you will need to (a) Read Delimited Spreadsheet to get the data back into a 2D array, (b) replace whatever needs to be replaced, then (c) re-Write Delimted Spreadsheet to update it.

 

Bob Schor

0 Kudos
Message 6 of 6
(3,264 Views)