Split Database Export Data into Separate Excel Rows
Question details
Separate database records stored in one spreadsheet cell into individual rows.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A database export contains multiple records in one cell, separated by line breaks.
- Observed behavior
- Text to Columns does not place each record in its own row.
Check that each record in the source cell is separated by a line break, rather than a comma or another delimiter. If the export contains multiple columns, identify the column that needs to be split.
Split the column into rows with Excel Power Query
Use Power Query when you want to split line-separated records into rows and refresh the result after the source data changes.
Select the cell or range containing the export, then choose Data > From Table/Range. Confirm the table range if prompted.
In Power Query Editor, select the column and choose Home > Split Column > By Delimiter. Select a custom delimiter, enable splitting using special characters, and enter #(lf) for a line feed.
Expand Advanced options, select Rows under Split into, and click OK.
Choose Home > Close & Load to place the separated records in an Excel worksheet.

Separate line-break records with WPS Spreadsheet formulas
Use helper cells in WPS Spreadsheet to find each line break and extract the records into separate rows.
- 1. Open the export: Open the file in WPS Spreadsheet and place the cell containing the line-separated records in A1. Use empty columns B, C, and D for the helper formulas.
- 2. Normalize the line endings: In D1, enter =SUBSTITUTE(A1,CHAR(13),"") to remove carriage returns while retaining line feeds.
- 3. Find each line break: Enter 0 in B1. In B2, enter =IF(B1="","",IFERROR(FIND(CHAR(10),$D$1,B1+1),"")), then drag the fill handle down far enough to cover the expected records.
- 4. Extract the records: In C1, enter =IF(B1="","",MID($D$1,B1+1,IFERROR(FIND(CHAR(10),$D$1,B1+1),LEN($D$1)+1)-B1-1)). Drag the fill handle down alongside column B; each record appears in a separate row in column C.
- 5. Keep the results: Select the populated cells in column C, copy them, and use Paste Special > Values in the destination range if you need independent text instead of formulas.

Frequently Asked Questions
Why does Text to Columns not create separate rows?
Text to Columns distributes split values across columns. To create rows in Excel, use Data > From Table/Range and select Rows under the Power Query Split Column advanced options.
What delimiter represents a line break in Power Query?
For a line feed, choose a custom delimiter, enable splitting using special characters, and enter #(lf). If the source also contains carriage returns, trim the resulting values.
Can I refresh the split data after the export changes?
Yes. If the source table changes, select the loaded query result in Excel and use Data > Refresh All to run the Power Query steps again.
How do I keep the WPS formula results as plain text?
Copy the extracted cells in column C, then use Paste Special > Values in the destination range. The pasted records will no longer depend on the helper formulas.




