02-19-2016 01:47 AM
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.
02-19-2016 02:28 AM
@lvrichard wrote:
thanks and hope this makes sense, Ill will attach code if needed,
Richard.
Yes, attach the code, please
02-19-2016 03:03 AM
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…
02-19-2016 03:15 AM
02-19-2016 03:17 AM
Hi,
Please see my attached code, I have tried to implement the recording in batt voltage case
thanks,
02-19-2016 07:28 AM
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