hello,
I am developing an application that modifies an Excel file.
To position itself on the last line used the excel sheet, I use this code:
Delphi-Quellcode:
var
ExcelApp : Variant;
Sheet :OLEVariant;
begin
ExcelApp := CreateOleObject('Excel.Application');
ExcelApp.Workbooks.Open('c:\MY FILE.xls');
Sheet := ExcelApp.Workbooks['c:\MY FILE.xls')].WorkSheets[1];
Sheet.Cells.SpecialCells(xlCellTypeLastCell, EmptyParam).Activate;
How to locate the last used cell on any row?
example : last cell Row Number => 5
thanks