Forum Discussion

hxiao's avatar
Occasional Contributor
9 years ago

How to select Excel sheet in python?

Hi, From I have python code to read Excel file:   def ReadDataFromExcel(): Excel = Sys.OleObject["Excel.App...
  • ghuff2's avatar
    9 years ago

    The Sheets collection has to be accessed using Item just like the Cells collection.


    For example, your line of code should change to this:


    sheet =["Sheet1"]

    Hope that helps.