Skip to main content

GUIDE TO CHECKING CSV FILES USED IN EXCEL

CSV columns shifted in Excel: how to find and fix misaligned rows safely

Check CSV problemsLearn how to repair CSV problems

If only some rows shift when you open a CSV in Excel, or an import system rejects the file, it may contain inconsistent column counts, blank rows, or broken quotes. LocaCSV checks the CSV in your browser without uploading it, keeps the original file unchanged, and creates a separate CSV using only the fixes you select.

Published:

Updated:

Related tool: Repair CSV problems

How to check CSV problems before opening the file in Excel

Instead of searching row by row, use Repair CSV problems to see each problem, its original data, the suggested fix, and the reason. The input must be a CSV file, not an Excel workbook.

  1. Choose a CSV: export Excel data as CSV first, then select that file.
  2. Check for problems: find blank rows, inconsistent column counts, and exact duplicate candidates.
  3. Review fixes: compare the original and proposed fix with nearby rows, then select what to apply.
  4. Save: review selected and unresolved counts, then create a CSV separate from the original.
Check CSV problems

Why CSV columns become shifted in Excel

Misaligned CSV columns usually come from delimiters, quoting, row widths, or Excel import settings. Start from what you see on screen and inspect the corresponding part of the CSV.

For a small file, import it through Excel and confirm the delimiter and encoding in the preview. For a large file, use the check results to narrow down affected rows instead of scanning the whole file manually.

Match the symptom in Excel to what you should inspect
What you see in ExcelLikely causeWhat to inspect
Only some rows shift rightComma, quote, or column-count problemCommas and quotes in affected rows
The whole CSV appears in one columnWrong delimiter detectionComma, semicolon, or tab
Text appears garbledCharacter encodingUTF-8 or a regional encoding
Some values changeExcel automatic conversionLeading zeros, dates, and long numbers
  • Only some rows shift right

    Likely cause
    Comma, quote, or column-count problem
    What to inspect
    Commas and quotes in affected rows
  • The whole CSV appears in one column

    Likely cause
    Wrong delimiter detection
    What to inspect
    Comma, semicolon, or tab
  • Text appears garbled

    Likely cause
    Character encoding
    What to inspect
    UTF-8 or a regional encoding
  • Some values change

    Likely cause
    Excel automatic conversion
    What to inspect
    Leading zeros, dates, and long numbers

Why you should not remove a trailing comma blindly

A trailing comma can mean that the last field is intentionally empty. Both lines below contain three columns.

A valid three-column CSV with an empty final field
Product,Amount,Notes
Product A,100,

Problems LocaCSV can check and how fixes are applied

Repair CSV problems uses the first row as the header, compares every row's column count with it, and shows why a row was flagged. It does not guess from the most common row width or from the values themselves.

It finds completely blank rows, rows longer or shorter than the header, clearly extra empty cells, and duplicate rows whose column count and every parsed cell value match exactly. You can compare the original with the proposed fix and view up to two surrounding rows on each side.

Each CSV can be up to 50 MiB. Major encodings such as UTF-8 and Shift_JIS are supported, along with comma, semicolon, tab, and pipe delimiters.

  • Product A,100, has the same three columns as the header, so it is not a problem.
  • Product B,200,Note,Extra value has four columns and is a review item that starts unselected.
  • The completely blank row is a suggested fix selected by default, and you can clear it.
  • The second Product C,300, is an exact duplicate candidate and remains unchanged until you select it.
Example with a blank row, a wide row, and an exact duplicate
Product,Amount,Notes
Product A,100,
Product B,200,Note,Extra value

Product C,300,
Product C,300,

Automatic fixes versus problems that need review

A completely blank row starts selected. A row also starts selected when every cell beyond the first row's column count is empty. Short rows, extra values, and exact duplicates do not.

Check result and default state
CategoryExampleDefault
Automatically fixableCompletely blank row; clearly extra empty cellSelected; can be cleared
Needs reviewColumn-count mismatch; exact duplicate rowNot selected
  • Automatically fixable

    Example
    Completely blank row; clearly extra empty cell
    Default
    Selected; can be cleared
  • Needs review

    Example
    Column-count mismatch; exact duplicate row
    Default
    Not selected

Check the corrected CSV in Excel

The output is a UTF-8 CSV with a BOM, which Excel commonly recognizes. Excel may still convert values on opening, so check the following before importing the file elsewhere.

  • Confirm that every row aligns with the header.
  • Check that leading zeros, dates, phone numbers, and long identifiers were not auto-converted.
  • Test a small batch before importing into a business system.
  • Keep the original file until verification is complete.

What to check before using the corrected CSV

LocaCSV checks column counts, blank rows, and identical rows. It does not decide whether the values are correct or whether the first row contains the right column names.

  • The values are correct.
  • The CSV follows the destination system's rules.
  • Each suggested duplicate is safe to remove.