08-02-2023 04:57 AM - edited 08-02-2023 05:00 AM
I am trying to write a VI that reads a specific cell from the last row of an excel spreadsheet (.xlsx). I have written the VI shown in the screenshot. It is able to pull the row number of the last row in the spreadsheet. I then bundle this back into a cluster with the column number set to 3, i.e. column D. This should be a 16 digit string.
When I use this cluster as the 'start' input of the 'get data' vi, it doesn't return anything. I have tried changing the data type input to empty strings or different string constants, but it still returns nothing.
The only example for this that I could find online uses an old version of labview (I believe 2012) and the 'get data' vi has two coordinate inputs - one for start position and one for end position. But the latest version only has start.
Can anyone explain why I'm unable to return the data I want here?
08-02-2023 07:36 AM - edited 08-02-2023 08:14 AM
Decrement the row by one coming from get last row it will work.
08-02-2023 07:50 AM
The problems is because the function MS Office Parameters Out the last row of the excel file (In my example it has three rows, returns 3). However the function GET Excel Data requires the INDEX of the cell starting from ZERO. So when you run GET Excel Data it will return the content of the cell line index =3 (fouth line) that is empty, and it returns empty string.
To correct this you need to add a decrement.