Welcome! Log In Create A New Profile

Advanced

Excel 2007

Posted by Javier.pcs.crosspost 
Javier.pcs.crosspost
Excel 2007
November 21, 2008 12:37PM
Hello.
How can I determine the number of rows in an Excel document of the 2007 version.
The functions of XLS Windev work only for documents on the version of Oficce'97

Message forwarded from pcsoft.us.windev
David Martin
Re: Excel 2007
November 21, 2008 01:54PM
Use COM. Here is some barely tested code ...

// Open Excel via OLE
oExcel is object OLE dynamic
oExcel = new object OLE "Excel.Application"
oExcel>>Visible = OLEFalse

// open the workbook
l_sXLSFile is string = "I:\MyDocs\TheXLSFile.xls"
oExcel>>Workbooks>>Open(l_sXLSFile)

//The CONSTANT con_xlLastCell = 11
oExcel>>ActiveCell>>SpecialCells(con_xlLastCell)>>Select
Info(oExcel>>ActiveCell>>Row)

oExcel>>ActiveWorkbook>>Close
oExcel>>Application>>Quit

David Martin
Ivy League Software LLC



Edited 2 time(s). Last edit at 11/21/2008 01:56PM by David Martin.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: