04-04-2014 07:27 AM
Hello,
I have some code whereby I get data from an instrument and I want to save this data to a spreadsheet file.
At the moment I find that the saved spreadsheet is showing zeros. So I must have the spreadsheet string to array set up incorrectly.
Snippet of code here and complete .vi attached.
Solved! Go to Solution.
04-04-2014 07:30 AM - edited 04-04-2014 07:32 AM
Hi nevica,
where are those zeros you're talking about?
When your SerialNumber and SpectrometerName don't consist just of numbers you surely get zeros when trying to convert from string to number…
Why don't you create an array of those two strings to save it directly using WriteToSpreadsheetFile? Why append them to one string and convert that string into a 2D array of numbers?
04-04-2014 07:35 AM - edited 04-04-2014 07:38 AM
How do i create an array of the two strings please?
It's actually what I tried in the first place but failed.
04-04-2014 07:38 AM - edited 04-04-2014 07:38 AM
04-04-2014 07:42 AM
It works, thanks!
04-04-2014 08:29 AM - edited 04-04-2014 08:37 AM
A new problem now. I want to 'save to spreadsheet file' a number array with the first column as a time stamp (a text field).
I tried bundling the time stamp text with the number 1- D array but it didn't work.
How can I do this please?
OK, done it, converted number array into string array.