How to Import CSV with Commas Inside Brackets into Excel
Question details
The user needs to import a CSV file into Excel without the software splitting values that contain internal commas enclosed in brackets (e.g., [1,2,3]).

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Importing non-standard CSV data into a spreadsheet for analysis.
- Observed behavior
- When opening the CSV directly, Excel interprets every comma as a delimiter, incorrectly splitting single bracketed values across multiple columns.
Ensure you have the CSV file saved locally on your computer and close it if it is currently open in Excel or another text editor.
Use Power Query to Import and Transform the CSV File
Power Query allows you to bypass default Excel behaviors by defining custom text qualifiers and parsing rules, ensuring your bracketed data remains intact.
Opening a CSV file directly by double-clicking forces Excel to use its default parsing settings, which treat every comma as a hard column separator. By using Power Query, you gain full control over how the text is read and processed before it ever touches your spreadsheet.
Launch Excel, navigate to the 'Data' tab on the top ribbon, and select 'Get Data' > 'From File' > 'From Text/CSV'.
Locate the problematic CSV file on your computer, select it, and click 'Import'.
A preview window will appear. Do not click Load. Instead, click 'Transform Data' to open the Power Query Editor.
If your file does not use standard quotation marks as text qualifiers, use the 'Replace Values' feature to change brackets to double quotes, or adjust the delimiter settings so the comma inside the brackets is ignored during the split.
Once the data preview shows the bracketed values perfectly contained within a single column, click 'Close & Load' in the top left corner to import the corrected data into your worksheet.

Import Complex CSV Files Easily with WPS Spreadsheet
WPS Spreadsheet features an intuitive Text Import Wizard that provides precise control over delimiters and text qualifiers, making it simple to accurately import complex data like bracketed commas without advanced coding or query knowledge.
- 1. Launch WPS Spreadsheet: Open WPS Office and create a new blank spreadsheet.
- 2. Initiate data import: Navigate to the 'Data' tab and click on 'Import Data', then select your CSV file.
- 3. Configure the wizard: In the Text Import Wizard, select the 'Delimited' option and click Next.
- 4. Set delimiters and qualifiers: Check the 'Comma' box for your delimiter and choose the appropriate Text Qualifier from the dropdown to ensure your bracketed or quoted text is protected.
- 5. Finish the import: Preview your columns in the window at the bottom, then click 'Finish' to successfully load your intact data.

Frequently Asked Questions
Why does Excel split my CSV data at every comma?
By default, Excel treats the comma character as a hard column separator for CSV (Comma-Separated Values) files. Unless the text containing the comma is wrapped in standard text qualifiers like double quotes, Excel assumes it is supposed to start a new column.
Can I change the default CSV delimiter in Excel?
Yes, Excel's default list separator is tied to your Windows Regional Settings. You can change this in the Windows Control Panel under 'Region' > 'Additional settings' > 'List separator'. However, changing this affects all of Windows, so using Power Query or a Text Import Wizard is usually much safer.
How do I format my CSV so Excel opens it correctly by default?
If you are generating the CSV from a script, database, or API, make sure any field that contains a comma is wrapped entirely in double quotation marks. For example: bob, "[1,2,3]", red. Excel automatically recognizes quotes as text qualifiers and keeps the contents in one cell.




