Recent chats
ASKGEEZ Q&A GUIDETechnology & devices

How can I import a folder of inventory files without mixing up their column headings?

Quick answer

Before combining files, list the expected fields and compare each file’s headings against that list. Mark missing, extra, renamed, or ambiguous headings as exceptions; resolve or set aside those files instead of assuming they match. In Excel Power Query, you can inspect folder contents, filter to the intended files, and combine them, but review the transformed query and results: Power Query’s sample-file analysis does not promise to detect every heading mismatch. [S1]

LET’S WORK THROUGH IT

The question, the details, the next step.

Question

I have a folder of inventory files from different staff. What should I do before importing them together so a heading difference doesn’t put values in the wrong field?

Geez

Start with a small schema checklist: the approved heading for each field, what the field means, and whether it is required. For example, your inventory list might expect Item ID, Description, Location, and Quantity. Treat a heading as a potential mismatch even if it seems close: Qty might mean the same thing as Quantity, but that needs an explicit decision rather than a guess.

Make a file inventory before combining anything. Give each file a simple status such as “matches,” “needs mapping,” or “hold.” Compare headings, not just the number or order of columns. A file can have the right number of columns and still use different names or meanings. Keep the original files unchanged while you review them, and record how any approved rename or mapping was handled.

Follow-up question

How does that fit into Excel Power Query if all the files are in one folder?

Geez

In Excel, use Data > Get Data > From File > From Folder. Inspect the listed files, choose Transform Data, and filter to the intended files—for example, exclude unrelated file types or files in an unintended path. Then use Combine Files. Power Query analyzes an example file to identify matching columns, and you can choose a different sample if the first one is not representative. The documented folder-combine route is intended for files with the same file type and schema. Review the transformed query and results before loading. [S1]

That review matters: sample-file analysis is not a guarantee that every inconsistent heading will be found or safely resolved. If your pre-check finds a mismatch, decide how to map it or keep that file out of the combined set until the discrepancy is settled. Don’t treat a successful-looking import as proof that the headings were equivalent.

Follow-up question

Could you show me what an exception log might look like for a file with a slightly different heading?

Geez

Here is a copyable outline. These are illustrative placeholders, not findings about your files:

File: [filename] Observed heading: Qty Expected heading: Quantity Issue: Different heading; meaning not yet confirmed Decision: [map to Quantity / hold file / other approved action] Reason or confirmation: [brief note] Reviewed by: [role or initials] Date: [date]

For another example, if a file has Bin where the approved field is Location, log it as a possible rename, not an automatic match. The key question is whether both headings represent the same information. If you cannot establish that from the file and your own records, leave the decision open and keep the file separate rather than merging on assumption.

Follow-up question

Once I’ve resolved the differences, what final checks should I make before loading the combined inventory?

Geez

Confirm that every included file has an approved status and that each heading is either an expected field or has a documented mapping. Check the transformed column names and a sample of rows from files that had exceptions; compare their values against the original files to confirm that values landed under the intended fields. Also look for unexpected extra or missing columns and verify that held files were not included. Keep the exception log with the import notes so someone reviewing a later batch can see which decisions were made.

Power Query’s documented workflow supports inspecting, transforming, combining, and reviewing the results; the cited guidance does not establish that it automatically flags every heading mismatch. Your checklist and exception decisions are therefore part of the review, not something to skip because the files were combined. [S1]

A practical checklist

  • Write down the approved field names and meanings before reviewing the folder.

  • List intended files and filter out unrelated files before combining.

  • Compare each file’s headings for missing, extra, renamed, or ambiguous fields.

  • Record each discrepancy and its approved resolution; hold unresolved files out.

  • Review transformed headings and sample values against the original files before loading.

A few more useful answers

Can I rely on Power Query to flag every heading mismatch?

No. The cited Microsoft guidance says Power Query analyzes an example file to identify matching columns, but does not promise automatic detection or flagging of every heading mismatch. Review the transformed query and results yourself. [S1]

What if one file has extra columns that the others do not?

Record the extra headings in the exception log and decide whether they are expected fields, irrelevant fields, or a sign that the file uses a different schema. Don’t silently discard or map them without documenting the decision.

Should I combine files when their headings are similar but not identical?

Only after you confirm that the headings mean the same thing and record the mapping. If the meaning is uncertain, hold that file out until it can be checked.

Sources

References used for this guide.

  1. [S1] Import data from a folder with multiple files (Power Query) — Microsoft Support
    support.microsoft.com · Checked

YOUR QUESTION. YOUR DETAILS.

Let’s work through your situation.

Get a tailored answer or help with your next task. Starts at $1, with a quote before you pay.

Ask your own question
← Back to Geez at Work