Excel.Workbook
This function retrieves the data from an Excel workbook. The parameter useHeaders can be set to either true or false, indicating whether the first row of each returned table should be considered as a ...
Excel.Workbook(workbook as binary, optional useHeaders as any, optional delayTypes as nullable logical) as table.
This function retrieves the data from an Excel workbook. The parameter useHeaders can be set to either true or false, indicating whether the first row of each returned table should be considered as a header. By default, this parameter is set to false.
The parameter delayTypes can also be set to either true or false, indicating whether the columns of each returned table should remain untyped. By default, this parameter is set to false.
If a record is provided for the useHeaders parameter (and delayTypes parameter is null), the following fields can be included:
- useHeaders: Determines if the first row of each returned table should be treated as a header. Default value is false.
- delayTypes: Determines if the columns of each returned table should be left untyped. Default value is false.
- InferSheetDimensions: Determines whether the area of a worksheet containing data should be determined by reading the worksheet itself, rather than using dimensions metadata from the file. This option is only applicab
Retrieve the data stored in Sheet1 of an Excel workbook using Power Query M.
Syntax:
MExcel.Workbook(File.Contents("C:\Book1.xlsx"), null, true){[Item="Sheet1"]}[Data]
Output:
A table will be generated in Power Query M displaying the contents of Sheet1 from the Excel workbook. The table will have columns named ID, Name, and Phone, with rows containing the data for each entry. For example, the table may include entries such as ID 1, Name Bob, Phone 123-4567 and ID 3, Name Pam, Phone 543-7890.