![]() |
Excel:locate the last used cell
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:
How to locate the last used cell on any row?
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; example : last cell Row Number => 5 thanks |
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:15 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz