HOME / COMMUNITY Switch to knowledge base

Detailed Nominal Ledger csv has line breaks within an item

Found this issue while looking at How to download in Pdf or print a monthly statement with all transactions from all accounts?

Downloaded a CSV but cannot import successfully due to the CSV generated having line breaks within lines.

Steps to reproduce

  1. Generate Detailed Nominal Ledger Report as per Run a Detailed Nominal Ledger Report
  2. First open a text editor such as Notepad+ + (this is good as shows the line numbers so shows genuine lines rather than just wrapped lines)
  3. Ensure word wrap is off
  4. Open the CSV before doing anything else with it
  5. Examine the text

Expected result
The summary data at the top of the CSV is not ideal from a data import perspective but can be worked around. Each line of the main nominal ledger should begin with the date, followed by comma separated values for each subsequent field.

Actual result
‘Items for purchase’ and ‘Items for invoice’ lines are split between Supplier/Client and Description into 2 lines. This is apparent in a text editor and simply messes up in the import into Excel. I’ve tried changing in Notepad ++ from Windows (CR LF) to Unix (LF) but no effect.

Hi @martinprice

Carriage returns that are wrapped in quotes shouldn’t cause any problems when importing into Excel. This is defined in the standard.

A field that contains embedded line-breaks MUST be surrounded by double-quotes

This is what I see when directly opening in Excel:

I have seen differences in behaviour in the past between just opening a CSV file with Excel vs creating a blank workbook and then using the “import” function.

@Glenn
Interesting. On opening directly in Excel it handles it. Trying to import as data, which is what I would do if trying to automate it causes it to break. Sounds like it may be an Excel issue

Thanks
Martin

1 Like

This topic was automatically closed after 6 days. New replies are no longer allowed.