LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a row of cells one by one until the end of the row? (CVI & ExcelReport)

How can I read say the first row of data, "row 1", cell by cell, until I hit an empty cell?

And once I hit that empty cell, how should I go about, programmatically, move onto the next row?

 

Can anyone provide the ExcelReport function calls that will allow me to read in one entire row (just 1 row, not a range of of rows) of data when I have no clue where the last (empty) cell in that row may be?

 

From reading the documentations and looking through the demos, my first thought was to keep a counter for row, then read in each cell across (incrementing the alphabetical column count) that row until I get a null cell. This way I can loop through the row counter from first to the last row (using an empty cell as my terminator).

 

What are the disadvantages of this technique? Are there more efficient ways of using ExcelReport to complete this task?

 

Any help would be greatly appreciated, thank you.

0 Kudos
Message 1 of 3
(3,495 Views)

This technique would be quite slow. Unfortunately, it's the only way I could think of if it's really an Excel file. If it's tab delimited file, you could read a whole thing into 2D array and work on Array instead of reading cell-by-cell.

0 Kudos
Message 2 of 3
(3,483 Views)

Is there a way in the ExcelReport library to read in an entire worksheet into a 2D array? What are the function calls? Any examples out there? Thanks.

0 Kudos
Message 3 of 3
(3,465 Views)