Enjoy!
#Define xlLastCell 11
Local lcFile, loExcel As Excel.Application, lnLastRow,
lnloop
lcFile = Getfile("xls,xlsx")
If !Empty(m.lcFile)   && check if not cancelled
      loExcel = Createobject("excel.application")
      With loExcel
            .Workbooks.Open(m.lcFile)
            For lnloop = 1 To .sheets.Count
                  .Worksheets(m.lnloop).Select
                  .ActiveCell.SpecialCells(xlLastCell).Select
                  lnLastRow =
.ActiveCell.Row
                  Messagebox('Sheet'+Transform(m.lnloop)+'
last Row'+;
Transform(m.lnLastRow))
Transform(m.lnLastRow))
            Next
            * Visually Check
            .Visible = .T.
      Endwith
Else
      Messagebox("Aborted
by user!",0+64,"Oppppssss!")
Endif
No comments:
Post a Comment