Power Query Problems

How to Clean Weekly QuickBooks CSV Files Using Excel Power Query

Huda QurayshiHuda Qurayshi Nov 4, 2026 869 views

Question details

The user needs to automate the cleaning of weekly QuickBooks timesheet CSV files by dropping specific columns and renaming fields upon import.

How to Clean Weekly QuickBooks CSV Files Using Excel Power Query
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.
Before you start

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.

Solution 1Recommended

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.

1
Import the CSV File

Open Excel, navigate to the Data tab, click on 'Get Data' > 'From File' > 'From Text/CSV', and select your downloaded QuickBooks CSV file.

2
Open Power Query Editor

In the preview window that appears, click 'Transform Data' (or 'Edit') to launch the Power Query Editor.

3
Remove Unwanted Columns

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'.

4
Rename the Fields

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.

5
Load and Refresh

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.

Automate CSV Cleaning with Power Query
Automation Setup Complete: Your data transformation steps are now saved. You no longer need to manually delete columns or rename headers for future timesheet exports.
Free Microsoft Office alternative

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.

Fully compatible with Microsoft Excel formats, including .xlsx and .csvFree and lightweight alternative to Microsoft OfficeFamiliar user interface ensuring zero learning curve and seamless migrationPowerful built-in data filtering, sorting, and formatting capabilities
QA img-9

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.