DCCD Posted June 14, 2009 Posted June 14, 2009 (edited) [solved] ; Return the last row # of each page .ActiveSheet.HPageBreaks(1).location.rowoÝ÷ Ù«¢+ØìIÑÕɸѡ!A É̽±±Ñ¥½¸(¹Ñ¥ÙM¡Ð¹!A É̹ ½Õ¹ I want to know the number of the last row of each page, I know its possible but how? One more question?, Somehow can't find the ExcelUDF where to find it? i try to search for it, it doesn't appear Any Help will be highly appreciated, Thanks in advance Edited June 15, 2009 by DCCD [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group
BugFix Posted June 14, 2009 Posted June 14, 2009 (edited) Hi, try this: Local $sFilePath = 'your.xls' Local $oExcel = ObjCreate("Excel.Application") $oExcel.Visible = 1 ; 1=visible / 0=unvisible Local $oBook = $oExcel.WorkBooks.Open($sFilePath, Default, False) Local $oSheet = $oBook.Worksheets.Item(1) ; <=== number/name of sheet you wish Local $maxRows = $oSheet.UsedRange.Rows.Count ConsoleWrite('maxRows: ' & $maxRows & @CRLF) Edited June 14, 2009 by BugFix Best Regards BugFix
Zedna Posted June 14, 2009 Posted June 14, 2009 (edited) One more question?, Somehow can't find the ExcelUDF where to find it? i try to search for it, it doesn't appear From Autoit version 3.3 it's standard include:"C:\Program Files\AutoIt3\Include\Excel.au3" Edited June 14, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
DCCD Posted June 15, 2009 Author Posted June 15, 2009 Hi, try this: Local $sFilePath = 'your.xls' Local $oExcel = ObjCreate("Excel.Application") $oExcel.Visible = 1 ; 1=visible / 0=unvisible Local $oBook = $oExcel.WorkBooks.Open($sFilePath, Default, False) Local $oSheet = $oBook.Worksheets.Item(1) ; <=== number/name of sheet you wish Local $maxRows = $oSheet.UsedRange.Rows.Count ConsoleWrite('maxRows: ' & $maxRows & @CRLF) thanks BugFix, but "UsedRange" it just appears my LastCell number! I want to know the number of the last row of each page? Ex: Page1 :pagebreak1 = row number? Page2 :pagebreak2 = row number? etc.. From Autoit version 3.3 it's standard include: "C:\Program Files\AutoIt3\Include\Excel.au3" Thank you, I upgrade to last version [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now