How to Keep Line Breaks Inside CSV Fields in Excel Power Query
A survey or inspection export can take up four lines in a text editor and still contain only two submissions. A line break inside a correctly quoted note belongs to that note. If your import starts a new row there, the records below it can shift or end up with blank IDs.
In a public Power Query discussion, someone was editing exported files by hand before every import. A reply points to the setting for quoted line breaks. Before trusting a corrected refresh, compare the imported IDs and the note itself with the source.
Try a two-record CSV before changing the real export
Copy this synthetic example into a UTF-8 plain-text file named field-notes.csv. Keep the line break after no leak. and the double quotes as shown.
Submission_ID,Site,Note
0007,North,"Valve checked, no leak.
Revisit after restart."
0008,South,"Marked ""ready"" in the log."
The first data record spans physical lines 2 and 3. The comma after checked belongs to the note. The doubled quotes on line 4 represent literal quotes around ready. Your control list is 0007 and 0008, once each, with three fields per record.
Change how Power Query reads the file
In Excel, open Data → Get Data → From Text/CSV and choose Transform Data. Confirm the comma delimiter and UTF-8 encoding for this example. In Applied Steps, open the gear beside Source, set Open file as to CSV if needed, and choose Ignore quoted line breaks under Line breaks. The word “ignore” refers to row splitting. The note keeps its newline. See the Microsoft connector instructions.
The corresponding option in Csv.Document is QuoteStyle = QuoteStyle.Csv. Use the delimiter supplied by your export. Remove or edit any automatic Changed Type step that converts the submission ID to a number, so 0007 stays intact.
Check the records after loading
With headers in row 1 and the original order preserved, A2 and A3 contain 0007 and 0008. C2 contains the comma and the line break. C3 contains a single pair of quotes around ready. Compare against the source submission list before using the report. Keep a missing ID, repeated ID, or wrong column assignment open for review even when the overall row count matches.
If a note is missing its closing quote, check the exporter or request a fresh CSV or XLSX from the same snapshot. Deleting blank rows or stripping line breaks can erase evidence of a failed import. A strict CSV parser independently confirmed the two records and rejected a copy of the sample with its final closing quote removed. Power Query settings above follow Microsoft’s documentation.
Reuse the same check on the next export
Save the loaded sheet and the expected IDs in separate tabs of an Excel workbook. In Jolene.pro, ask which IDs are missing or repeated and which cells contain the note for 0007 or another known multiline record. Reuse the same question with next month’s files, then compare the flagged cells with the untouched export.