This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to change field separator with report export?

Tags: None
(comma "," separated)
grntbn
Registered Member
Posts
22
Karma
0
OS
Performing an export using File/Export/CSV… offers the option to select a File Separator, e.g. “;”.

Exporting a report this option is not offered and the File Separator is always a “,”.

With a German setup one has to change the File Separator from “,” to “;” but without changing the Decimal Character, as this in German setup is also a “,”. It would be far simpler if the File Separator could be selected before the export.

Is there a way to change the File Separator for report exports?
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
This is known limitation of MS-Excel in its German incarnation when loading CSV files directly via e.g. double click on the file in a file manager or even File/Open. After all, the file written by KMyMoney is a valid CSV file (all fields are quoted for that purpose). Here are some alternatives:

Alternative 1:
  1. Start MS-Excel
  2. Select the menu/ribbon Daten/Aus Text
  3. Select the CSV file
  4. Go through the pages of the import wizard
  5. Select UTF-8 as encoding

Alternative 2:
you could add the text SEP=, as the first line to the CSV file. This instructs MS-Excel (and only that tool) to use the comma as separator but it is stupid and uses the wrong encoding in this case.

Alternative 3:
use LibreOffice which works without problems and opens the import wizard even if you use File/Open to access the CSV file.

Alternative 4:
  1. rename the file from *.csv to *.txt (or instruct KMyMoney to store it with that extension)
  2. Start MS-Excel
  3. Use Datei/Öffnen to open the *.txt file which will start the CSV import wizard right away
  4. Go through the pages of the import wizard
  5. Select UTF-8 as encoding

You may wonder why I know all this: I had to deal with such scenarios more often than I wanted to but all of them were not KMyMoney related.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
grntbn
Registered Member
Posts
22
Karma
0
OS
Thanks for the quick replay!

I know all the possible ways to open/ convert a CSV file into Excel/ Access. The problem is the fact that in the German configuration the Decimal Separator is a comma and therefore equal to the Field Separator, (fixed) used by the export module for reports in KMM. In my view it’s not a problem of Excel, it’s the problem not being able to change the Field Separator in this module of KMM to match the regional settings in Windows. Otherwise it would not be a problem.

With a CSV file there are several possibilities for the Field Separator, e.g. comma, semicolon, tabulator, … It seems that KMM is taking consideration in this regard in the export module accessible through the menu “File/Export/CSV…” but not in the export module for reports.

Because of these differences in the regional settings of Windows other applications, like the online banking application of my bank, are also offering the option to change the Field Separator when exporting to CSV.

So my question is: Can I change/ where can I change the Field Separator in the Export Module for reports as I can in the other Export Module of KMM?
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
With a CSV file there are several possibilities for the Field Separator, e.g. comma, semicolon, tabulator, … It seems that KMM is taking consideration in this regard in the export module accessible through the menu “File/Export/CSV…” but not in the export module for reports.

Yes. These are two different pieces of software within KMyMoney written by two different authors in two different locales.

The problem is the fact that in the German configuration the Decimal Separator is a comma and therefore equal to the Field Separator

Yes, that is why all field values are quoted. And it is MS-Excel that cannot deal with these quotes without additional instructions. Why does LibreOffice has no problem with the file?

So my question is: Can I change/where can I change the Field Separator in the Export Module for reports as I can in the other Export Module of KMM?

You can't change it as of now because the report module does not support that feature. It needs to be added. Patches are certainly welcome. Adding a wish-list item to the bug-tracker helps so that developers do not forget it.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
grntbn
Registered Member
Posts
22
Karma
0
OS
Yes, that is why all field values are quoted. And it is MS-Excel that cannot deal with these quotes without additional instructions.


Yes, that's in fact a problem of Excel.

I'll try LibreOffice.

Thanks!


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], q.ignora, watchstar