Excel.Workbook
Reads an Excel file, given as binary content, and returns a table listing its sheets and tables, from which you pick the data.
Excel.Workbook(workbook, optional useHeaders, optional delayTypes)Returns: A navigation table with the columns Name, Data, Item, Kind and Hidden.
What it does
Excel.Workbook opens an Excel file that has been loaded as binary content (usually with File.Contents or the Content column of Folder.Files) and gives you a list of its sheets and named tables. Each row has a Data column holding that sheet's rows. Use it to load a monthly workbook, or to read each file in a folder in the same way.
Syntax and arguments
workbook: the file content, as binary. For one file, useFile.Contents("C:\...\file.xlsx").useHeaders(optional): when true, the first row of each sheet is used as the column headings. When false, the headings are generic and you promote them later.delayTypes(optional): when true, Power Query does not guess column types when it reads the file. Set it when a column mixes numbers and text, so the guess does not turn values into errors. Types are then set in a later step.
Example
The month-end file has one sheet called Transactions, with headings in the first row. The query loads that sheet.
let
Source = Excel.Workbook(File.Contents("C:\Finance\Close\2026-03.xlsx"), true),
Transactions = Source{[Item = "Transactions", Kind = "Sheet"]}[Data]
in
Transactions
Transactions is the table of rows from that sheet. The [Item] and [Kind] lookup picks the sheet by name, which is safer than picking the first sheet, because a workbook can have a cover sheet before the data.
Example: a second, different use
Picking a named Excel table instead of a sheet: Source{[Item = "tblAccounts", Kind = "Table"]}[Data].
Things to watch
- Use the exact sheet name. A renamed tab stops the query, which is usually what you want, because the file has changed.
- Set types after the headings are right. A header row that is not in row one needs Table.PromoteHeaders or a Skip step first.
- Mixed text and number columns are a common cause of errors. Use
delayTypesand convert deliberately. - Files open in Excel while the query runs can be locked. Close them before a refresh.
In business terms
Month-end schedules, subledger extracts and budget submissions often arrive as Excel files. Loading them with Excel.Workbook, and naming the sheet, makes a monthly refresh repeatable.