Csv.Document
This function returns the contents of a CSV document in the form of a table. The columns in the table can have various attributes such as being nullable, having a specific number of columns, a list of...
Csv.Document(source as any, optional columns as any, optional delimiter as any, optional extraValues as nullable number, optional encoding as nullable number) as table.
This function returns the contents of a CSV document in the form of a table. The columns in the table can have various attributes such as being nullable, having a specific number of columns, a list of column names, a defined table type, or an options record. The delimiter used to separate values in the CSV file can either be a single character or a list of characters. The default delimiter is set to ",".
To know the supported values for extra values, please refer to the ExtraValues.Type. The 'encoding' parameter specifies the type of text encoding used in the file. The default encoding is set to 65001 (UTF-8).
If a record is provided for columns (with null values for delimiter, extraValues, and encoding), the following fields may be provided:
- Delimiter: Specifies the column delimiter used in the document. The default delimiter is set to ",".
- Columns: Indicates the number of columns, a list of column names, or a table type. Any additional columns found in the input will be ignored if the specified numbe
Utilize Power Query to process a CSV text file that includes column headers.
The code snippet combines the data in the CSV file with headers for each column. The resulting table displays the data with the appropriate column headers.
The output is a structured table that organizes the data based on the column headers provided in the CSV file.