LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel ActiveX: Count Rows

Hi, I am trying to simply count the used rows in an excel spreadsheet (which I have done in the past).
Attached is a simple vi which I am trying to get to work.  On my development PC, this works fine, counts the rows etc...on this PC I have Excel 2003.
 
When I create an EXE out of this VI and put it on another PC with Excel 2000, it returns "0" for the number of used rows.
 
Can ANYONE help me here, this is driving me insane.
 
Working in 7.1 (can use 7.0 or 8.0 if it makes it easier)
 
Thanks,
Ryan
Ryan

LV 7.1
0 Kudos
Message 1 of 7
(3,715 Views)

depending on the version of excel you have a slightly changed activeX (nice from MS).

so you have to build an executable for the correct LabVIEW Excel combination.

 

greetings from the Netherlands
0 Kudos
Message 2 of 7
(3,709 Views)

ok so what exactly are you saying?

 

should i try building an executable from 7.0 or what?

Ryan

LV 7.1
0 Kudos
Message 3 of 7
(3,709 Views)
As Albert said, it is the change between versions of Excel that are the problem and nothing to do with LabVIEW. You would have to rewrite your application (in any LabVIEW version you want), with the different version of Excel installed and use the different methods and properties that are in that version of Excel.
0 Kudos
Message 4 of 7
(3,703 Views)

So, in order to use an exe utilizing ActiveX, all PCs that you plan to put the exe on must have the same version of ActiveX/excel????

 

That seems fairly limiting....

 

eeesh!

 

I'll give it a shot....thanks for the help!

Ryan

LV 7.1
0 Kudos
Message 5 of 7
(3,701 Views)
It is limiting but I place the biggest blame on Microsoft for changing the properties and methods so much between different releases. You could put all of your Excel functions in a library that you call dynamically. That way, you don't have to re-build the exe but just distribute the library specific to whatever version of Excel you need to support. Unless you really need some specific Excel formatting, you could also save to comma/tab delimited text files. All versions of Excel can open them and you won't have to make a career out of modifying your application for as long as Excel is going to be around.
0 Kudos
Message 6 of 7
(3,693 Views)
You can query the version of Excel that is on the computer.  Then use the ActiveX components for that version.  You can only do this with LV 8.0 because the other ActiveX calls must be disabled, not just not used.
0 Kudos
Message 7 of 7
(3,686 Views)