05-24-2010 09:20 AM
Hello, I'm using Excel Active X calls in LabVIEW 2009 with Microsoft Office 2007 to get a column of data and return it as an array. The vi attached was working perfectly well until I created a new Excel file with dummy data and tried to read it. I got an error because the Find I tried doing never found the value I was searching for. I was trying to find the end of the data so I new how many cells to copy in my loop. After a few hours of trying to find others who had the same issue, no one had this exact problem.
I figured out that the only difference between the two Excel files is that one had borders around the cells and the other did not. The excel file with the borders around the cells worked with my LabVIEW code. It was able to find the empty cell at the bottom of the data. The excel file without the borders did not return a refnum because it couldn't find an empty cell? This must be some wierd Microsoft quirk, I'm assuming.
I answered my own question here, but I wanted to know if anyone else had this problem and if so, what's the best way to solve it?
Solved! Go to Solution.
05-24-2010 12:41 PM
I took a new approach of just reading each excel cell, and determining if there's any data in it. As soon as it reaches the first cell without data, it stops reading data from the file and returns the array. I attached the updated vi.
01-12-2013 12:19 PM
01-12-2013 01:17 PM