Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Counting rows of an Excel 97 worksheet
Message
From
23/12/2000 11:47:57
Charles Richard
Nvo Management Systems
Boisbriand, Quebec, Canada
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00456575
Message ID:
00456592
Views:
27
Thanks very much for your reply. I tried this and this is what I got:

--------------------------------------------
cFile = GETFILE()
oExcel = CREATEOBJECT('Excel.Application')
oExcel.WorkBooks.Open(cFile)
oExcel.Worksheets(1).Activate
oExcel.SendKeys ("^+{END}",-1)
?oExcel.ActiveWindow.RangeSelection.Address
--------------------------------------------

Result: $A$1

When I manually open the workbook, CTRL + END brings me to $R$44

oExcel.ActiveWindow.ActiveCell.Value returns the value of the cell $A$1

oExcel.ActiveWindow.ActiveSheet.Name returns the name of the correct sheet
(there are 31 sheets in this workbook and I have to process all of them)

--------------------------------------------

Am I referencing the object correctly?

TIA
Charles Richard
Charles Richard
NVO Management Systems
crichard@nvo.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform