From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I determine dynamically which cells to read in from an excel file?

I have a configuration file which I read in from excel to determine which pins to test, which ports to configure etc. I read in the data from the excel spreadsheet and store it in a 2D array of strings. In the first column of my spreadsheet (included) I have a count value which reads how many pins are in the config file. I use this to determine how large the array will be (e.g. read in the contents of cells A1:A(1+countvalue). this can be seen in the included vi read config file.vi. My problem is that i want to do something similar with the column values (i.e. read in the contents of cells A1:# where # would be a column which would be determined by how many columns inthe spreads
heet actually have data. In my ReturnRangeofXlcellvalues.vi I am using the Worksheet.Range('range') method and range requires a parameter in the form A1:B1. Does anybody know of a way I can not use the A1:B1 notation and instead use only nubers like 1,1:2,1. I've included my vi's and excel file
0 Kudos
Message 1 of 3
(2,402 Views)
As far as I remember it's not possible. Thus, find attached VI and use it to convert line/column to excel cell format. It's working if you are not using more than 26 columns (i.e. column AA, AB, ... if this is the case you have to improve it a little)

Hope this helps
Message 2 of 3
(2,402 Views)
That helps alot LabViewer, exactly what I wanted to do. Thanks!
0 Kudos
Message 3 of 3
(2,402 Views)