NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
gjacob
Posts: 62
0 Kudos
Accepted Solution

How would I add labels to rows and columns of a spreadsheet?

I have gotten some data from an oscilloscope that has about 500 rows that I would like to label with the time of the measurement (1ms, 2ms, 3ms...) and about 10 columns which I would like to label with a corresponding wavelength (800nm, 805nm, 810nm...). Any insight or links to examples would be appreciated,

 

Gregory

Active Participant
krispiekream
Posts: 905
0 Kudos

Re: How would I add labels to rows and columns of a spreadsheet?

[ Edited ]

i post my code on to ask some questions and it has what you are looking for in the labels to rows and columns.

http://forums.ni.com/ni/board/message?board.id=170&thread.id=502609&view=by_date_ascending&page=2

 

its the sample 

ActiveX.vi

Message Edited by krispiekream on 06-10-2010 12:27 PM
Best regards,
Krispiekream
Trusted Enthusiast
tbob
Posts: 4,089

Re: How would I add labels to rows and columns of a spreadsheet?

Before you write data to your spreadsheet file, write one row of column names.  Just make a 1D string array with the column names.  Write the 1D array to the spreadsheet.  If you want labels on each row, you will have to convert your data to strings.  So you will have a 2D array of string data.  Create a 1D array of your row labels.  Use Insert Into Array to insert your label array into the data array, being sure to wire a 0 into the column index, not the row index.  This will put your labels in the first column.  Then write the 2D array to the spreadsheet file.

 

- tbob

Inventor of the WORM Global