Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
Use Power Query to combine the CSV files into one table instead of trying to append rows inside a single CSV file.
Recommended approach in Power BI Desktop:
- Put all CSV files that have the same structure into one folder.
- In Power BI Desktop, select Get data > File > Folder > Connect.
- Enter the folder path, select OK, then choose Transform data.
- In Power Query Editor, select Combine or Combine Files.
- In the Combine files dialog, keep the default settings if the files have the same format, then select Transform data.
- Power Query creates helper queries and combines the files into one output query.
- If the files contain extra header rows before the real column names, open Transform Sample file and apply the cleanup there. For example, if each file has four non-data rows at the top, use Remove top rows and enter 4. That transformation is then applied to every file before combining.
- After combining, set the correct data types for each column, then load the data.
Important points:
- This works best when all files have the same file type and the same column structure.
- The combined output includes the source file name as a column, which helps verify that all files were included.
- To confirm all files were merged, check the Source.Name column filter and use Load more if the list looks incomplete.
- In the Power BI service, CSV files can be imported, but for combining multiple CSV files into one model, Power BI Desktop with Power Query is the supported path shown here.
This avoids the worksheet row limit problem because the data is combined during import rather than pasted into one file.