rows.com

Merge 100+ CSV Files Without Losing Your Table Format

If you're looking to streamline the process of merging over 100 CSV files using Power Query for your university assignment, you're not alone.

3 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

There's a quiet assumption baked into most spreadsheet advice that complexity is the price of control. This student, staring down 100+ CSV files, already knows that assumption is wrong. They're not asking for a miracle. They're asking for a merge that doesn't destroy the table structure they've already built. And Power Query, for all its power, keeps pushing them toward a transpose that would scramble everything they're trying to preserve. That's not a user error. That's a tool failing to meet the user halfway.

The instinct to transpose is understandable. Power Query loves long, narrow data. But this person's files are wide by design, and their assignment depends on keeping that width intact. They don't want to reshape the data. They want to stack tables side by side, column headers aligned, rows in order, no reformatting required. The fact that they've already tried transforming before combining tells us they're not afraid to dig into the tool. They're just hitting a wall where Power Query's default logic assumes your data should look like its own output rather than your source.

Here's the practical truth: you don't need to transpose anything. The solution is to stop fighting Power Query's combine step and instead take control of the transformation before it merges. Use the "Transform File" sample step to strip away the system columns like Source.Name and keep only the real column headers. Then, when you combine, each file lands as a separate table with identical structure. From there, you can append them vertically if the columns match, or if you truly need them side by side, you can add an index column and pivot the table reference so each file becomes a set of columns without ever flipping rows into columns. It's more steps, but it's honest work that respects the format you started with.

What this student is really asking for is not a workaround. It's a workflow that treats their file structure as intentional. And that's a fair request. Too often, tools like Power Query assume you want your data normalized into a long format because that's what works best for analysis. But not every assignment is an analysis. Some are just a merge, a clean concatenation of files that already make sense as they are. The tool should serve that. When it doesn't, the answer isn't to abandon it, it's to learn where the guardrails are and where you're allowed to push back.

So if you're in this same position, stop transposing. Start by inspecting the auto-generated sample file step, delete the columns you don't need, and make sure your headers are consistent across every CSV. Then combine, and use the resulting table's context menu to choose "Use original column name as prefix" or, better yet, remove the prefix entirely if your headers are already unique. You'll end up with a single table that looks exactly like your source files, just longer. And if you truly need side by side, add an index column before combining, then pivot on that index. It's not glamorous. It's not a hack. It's just the next logical step for someone who's already doing the hard part: asking the right question.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

I'm quite new to power query and have 100+ .csv files I need to merge into excel for a uni assignment. I have done and know how to do it manually, however over 100 is too many and would take me hours, hence why I want to use power query.

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community