Hi guys,
I am preparing a CSV file according to the bank's specs (exporting sheet with a list of transfers).
2 issues here:
1/
I cannot find any way to have ; (semicolon) at the end of every line.
Semicolon is the field delimiter here - and obviously divides every cell - but doesnt show up after the last cell of each line.
Is there any way to fix it? Or add ; in every line in some other way?
(there are too many lines and too many files to make it by hand)
2/
I need to have every cell quoted - I do have "Quote every cell" checked at export panel.
But there are 2 columns that are empty - no string nor value in these cells - and Calc doesnt qoutes them
In the csv file as a result for this cols I need: ;""; but have only: ;;
I cannot have space there.
Is there any way to force Calc to add the quotations marks for empty cell?
[Solved] Export to CSV - Add ; at the end of each line
[Solved] Export to CSV - Add ; at the end of each line
Last edited by MrProgrammer on Thu Dec 02, 2021 4:34 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
Reason: Tagged ✓ [Solved]
Apache Open Office 4.1.5 / WIN10
Re: Export to CSV - how to add ; at the end of each line
If your csv has a header row on top, append an additional header which appends another column of empty cells represented by a trailing semicolon in each row.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Export to CSV - how to add ; at the end of each line
And formula ="" creates an empty string.
Code: Select all
"ID";"PID";"CID";"D";"V";"X"
0;4;4;06.11.2005;303,63;""
1;2;1;07.04.2008;586,93;""
2;6;2;19.05.2007;80,3;""
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
- MrProgrammer
- Moderator
- Posts: 4905
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Export to CSV - how to add ; at the end of each line
First File → Save As → File type → ODF Spreadsheet → ✓ Automatic file name extension → Save (to preserve the original content)pyo wrote:I am preparing a CSV file according to the bank's specs (exporting sheet with a list of transfers
After that, File → Save As → File type → Text CSV → ✓ Automatic file name extension → Save then File → Close
Using Writer, create a new, empty text document then Insert → File → «your saved CSV file» → Open
Edit → Find & Replace → More options, check Regular Expressions, Search for .+ (period, plus), Replace with &; (ampersand, semicolon), Replace All. I recommend unchecking Regular expressions, before clicking Close.pyo wrote:I cannot find any way to have ; (semicolon) at the end of every line.
Edit → Find & Replace → More options, uncheck Regular Expressions, Search for ;; (semicolon, semicolon), Replace with ;""; (semicolon, quote, quote, semicolon), Replace All, Close.pyo wrote:But there are 2 columns that are empty - no string nor value in these cells - and Calc doesnt qoutes them In the csv file as a result for this cols I need: ;""; but have only: ;;
Save the repaired CSV file with Writer, File → Save As → Type type → Text. If you need any additional assistance attach a document demonstrating the difficulty (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself).
If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).