Forum Discussion
CSV Carriage Returns Splitting Data to New Rows in Power Query
- 5 years ago
The issue is to do with the QuoteStyle being used in the query.
For more info, see the Official Documentation:
"QuoteStyle: Specifies how quoted line breaks are handled. QuoteStyle.None (default): All line breaks are treated as the end of the current row, even when they occur inside a quoted value. QuoteStyle.Csv: Quoted line breaks are treated as part of the data, not as the end of the current row."
To resolve it, edit your query as follows :
Csv.Document(file, [Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.Csv])
That is, make sure to have ".Csv" following QuoteStyle, instead of ".None"
Extremely helpful. This solved my issue. But in order to better understand it I also found this article to explain the various Encoding Tpes: TextEncoding.Type - PowerQuery M | Microsoft Learn