pandas.ExcelFile.book#

property ExcelFile.book[source]#

Gets the Excel workbook.

Workbook is the top-level container for all document information.

Returns:
Excel Workbook

The workbook object of the type defined by the engine being used.

See also

read_excel

Read an Excel file into a pandas DataFrame.

Examples

>>> file = pd.ExcelFile("myfile.xlsx")  
>>> file.book  
<openpyxl.workbook.workbook.Workbook object at 0x11eb5ad70>
>>> file.book.path  
'/xl/workbook.xml'
>>> file.book.active  
<openpyxl.worksheet._read_only.ReadOnlyWorksheet object at 0x11eb5b370>
>>> file.book.sheetnames  
['Sheet1', 'Sheet2']