I believe you had the correct statement in your original post to get the number of sheets.
Have you ever used the FOR EACH statement? It will loop through each object in a collection, in this case each sheet in the Sheets collection. You specify the object name you want to use after the FOR EACH statement, in this case lo_Sheet. In each iteration through the loop, lo_Sheet will be a reference to the current sheet.
Here are a couple different ways to do the same thing:
lo_Excel = CREATEOBJECT("Excel.Application")
lo_Excel.Workbooks.ADD()
FOR EACH lo_Sheet IN lo_Excel.Sheets
? lo_Sheet.NAME
ENDFOR
lo_Excel.ActiveWorkbook.CLOSE()
lo_Excel.QUIT()
lo_Excel = CREATEOBJECT("Excel.Application")
lo_Excel.Workbooks.ADD()
FOR ln_Loop = 1 TO lo_Excel.Sheets.Count
lo_Sheet = lo_Excel.Sheets[ln_Loop]
? lo_Sheet.NAME
ENDFOR
lo_Excel.ActiveWorkbook.CLOSE()
lo_Excel.QUIT()
>In your reply to my excel question you had a for loop with lo_sheet. What is the actual propertie name after for each
>ex:
>FOR each sheet in lo_Excel.sheets?
>
>
>Also, do you know what propertie gets me the sheet count?