How to Clean Weekly QuickBooks CSV Files Using Excel Power Query
Question details
The user needs to automate the cleaning of weekly QuickBooks timesheet CSV files by dropping specific columns and renaming fields upon import.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Importing a weekly timesheet downloaded from QuickBooks as a CSV file into a spreadsheet for analysis.
- Observed behavior
- The exported CSV contains unnecessary data like usernames and time values, and uses unclear column headers like 'fname' and 'flast', requiring manual cleanup every week.
Ensure that your weekly QuickBooks CSV exports maintain the exact same column structure and header names, as Power Query relies on a consistent layout to apply automated steps.
Automate CSV Cleaning with Power Query
Use the Power Query Editor in Excel to build a repeatable data transformation sequence that automatically removes unwanted columns and renames fields.
By setting up a Power Query connection to your weekly CSV file, you only have to define your cleaning steps once. When you generate a new timesheet next week, you can replace the old file and simply refresh the query to apply all transformations instantly.
Open Excel, navigate to the Data tab, click on 'Get Data' > 'From File' > 'From Text/CSV', and select your downloaded QuickBooks CSV file.
In the preview window that appears, click 'Transform Data' (or 'Edit') to launch the Power Query Editor.
Hold the Ctrl key and click the headers of the columns you want to keep. Right-click any of the selected headers and choose 'Remove Other Columns'. Alternatively, select the columns you do not need (like usernames and time values), right-click, and choose 'Remove'.
Double-click the column headers that need renaming (for example, double-click 'fname' and type 'First Name', then do the same for 'flast' to 'Last Name'). Press Enter to confirm each change.
Click 'Close & Load' on the Home tab to export the cleaned data to your Excel sheet. For future weeks, save the new CSV over the old file with the same name, then click 'Refresh All' on the Data tab to automatically clean the new data.

Manage and Analyze Spreadsheet Data with WPS Office
If you are looking for a reliable, fast, and highly compatible tool for managing CSV files and spreadsheet data, WPS Office is an excellent free alternative. It seamlessly handles data operations without the heavy resource usage of Microsoft Office.

Frequently Asked Questions
Can I connect Excel Power Query directly to QuickBooks instead of downloading a CSV?
Directly connecting to QuickBooks typically requires a specialized third-party connector or an API integration, as native direct connections may vary depending on whether you use QuickBooks Online or Desktop. Using a CSV export is often the simplest, most reliable method without additional software.
What happens if the column names change in my next QuickBooks export?
If the source column names or structures change, your Power Query refresh will fail because the recorded steps will look for the exact previous header names. You will need to reopen the Power Query Editor and adjust the steps to match the new format.
How can I merge 'fname' and 'flast' into a single 'Full Name' column in Power Query?
In the Power Query Editor, hold Ctrl and select both the 'fname' and 'flast' columns. Go to the Add Column tab and click 'Merge Columns'. Select 'Space' as the separator, name the new column 'Full Name', and click OK.




