LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write spreadsheet with number and string?

Dear All,
I want to write spreadsheet not only with number but also with string.
But the write to spreadsheet file.vi only accept 2D array.
I only want to insert a line to display the unit of the row.
Is there any good way?
Thank you very much.
0 Kudos
Message 1 of 9
(3,830 Views)
Dear Hugoliang,

       you can use the "Array to Spreadsheetstring"  vi to  convert the Array into the  Spreadsheet string or either you can convert  your  string into Array with  "Spreadsheet string to Array", and you can get both the vi in string  palette in block diagram. Hope this helps.

Thanks,
Nishant
Message 2 of 9
(3,825 Views)

Thank you for your reply.

I have written an 2D-array to the spreadsheet, I only want to insert a line to display the unit of the row.

The array is number. I see that it is impossible that the number and string in one array.

Is there any easy way?

Thank you!

帖子被hugoliang在08-24-2006 07:41 PM时编辑过了

帖子被hugoliang在08-24-2006 07:42 PM时编辑过了

0 Kudos
Message 3 of 9
(3,807 Views)

Hi,

Convert the number to a string and then put it in an array of strings.  Then use <b>Array to Spreadsheet String</b>.

Albert

Message 4 of 9
(3,794 Views)

Could send your code to liping.zhao@gmail.com?

You could also use Chinese to post your question on http://forums.ni.com/ni/board?board.id=2170 

🙂

Message 5 of 9
(3,789 Views)
Thank you for your reply!
Under albertm's suggestion, I have solved the problem.
Next time, I will try chinese forum.
Thank you.
0 Kudos
Message 6 of 9
(3,770 Views)
Two files:
First such as:
 
SN:a
 
WL    PDL 
1590     0.32
1600     0.45
 
 
Second such as:
 
SN:a
 
WL  PDL
1590    0.03
1600    0.04
 
 
 
I want to get a result such as:
 
SN:a
 
WL  PDL
1590  0.29                                             (0.32-0.03)This I don't need
1600  0.41                                             (0.45-0.04)
 
 
How can I get it? Any suggestion?
 
 
 
_________________________


EZCONN TEST ENGINEER
-- --

V
0 Kudos
Message 7 of 9
(3,759 Views)
Read first 3 lines using Read Lines From File and write them to a new file.  Use Read From Spreadsheet File to read the rest.  Wire the Mark After Read output from the Read Lines to the offset input of Read From SS; this will start the read on the 4th line.  Now you have a 2D array.  You may have to convert to numbers.  Use Index Array and wire a constant 1 to the columns input.  This will give you a 1D array of the numbers you want to subtract.  Do the same for the second file.  Subtract the 1D arrays to get a difference array.  You will also have to index column 0 and use it and the difference array to create a new 2D array.  Write this to the new file.  You will probably have to convert the numbers to strings since the file contains other strings.
- tbob

Inventor of the WORM Global
0 Kudos
Message 8 of 9
(3,751 Views)
thank you very much
0 Kudos
Message 9 of 9
(3,711 Views)