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

Import CSV file issue

Tags: None
(comma "," separated)
Rene_Paul
Registered Member
Posts
7
Karma
0

Import CSV file issue

Tue Mar 07, 2023 1:33 pm
Hi everybody,

I am facing an issue I don't understand concerning the import of CSV files of stocks operations. I have created two CSV files containing stocks Buy and Sell operations. Data are different but structures appear to me to be similar. With one of them the import works well and every operation is correctly recorded in the KMM data base. On operation the opposit, for the other other CSV file, all Sell are converted to Buy.

I am using KMymoney 5.1.3 under Opensus Tumbleweed since 2014 with no problem.

Here is an extract of the CSV file that works fine:
;no;date;stock;isin;amount;quantity;quote;cat;compte;commission
0;0;2023-02-14;INV EURO EQTY FD A;LU1240328812;2710,02;17,311;156,55;Sell;Technique:Opérations SG Sequoia;0
1;1;2023-02-14;BLACKROCK FLEXI ISR;FR00140009Z9;846,32;9,337;90,64;Sell;Technique:Opérations SG Sequoia;0
2;2;2023-02-14;BLACKRCK ACT US ISR;FR0050000100;313,76;2,685;116,87;Sell;Technique:Opérations SG Sequoia;0
3;3;2023-02-14;AAF- PARNAS US ST E;LU1481505755;295,88;1,615;183,17;Sell;Technique:Opérations SG Sequoia;0
4;4;2023-02-14;COMGEST RENAIS EURP;FR0000295230;249,39;1,063;234,71;Sell;Technique:Opérations SG Sequoia;0
5;5;2023-02-14;AF EUR EQ VALUE A C;LU1883314244;-1965,73;13,314;147,64;Buy;Technique:Opérations SG Sequoia;0
6;6;2023-02-14;MOOR SUST EM EQT RE;LU1958314913;-692,77;2,708;255,85;Buy;Technique:Opérations SG Sequoia;0


Here is an extract of the CSV file that does not work: Sell operations are converted into a Buy operation

;date;stock;isin;action;parts;cours;montant;compte
28;2022-07-13;OSTRUM SOUVERAIN EU;FR0000003196;Buy;4,705;508,44;-2392,19;Technique:Opérations SG Sequoia
23;2022-09-07;OSTRUM SOUVERAIN EU;FR0000003196;Buy;0,5;494,27;-247,25;Technique:Opérations SG Sequoia
10;2023-02-14;OSTRUM SOUVERAIN EU;FR0000003196;Buy;0,529;471,16;-249,47;Technique:Opérations SG Sequoia
19;2022-11-30;COMGEST RENAIS. Euro;FR0000295230;Buy;1,194;222,3;-265,37;Technique:Opérations SG Sequoia
4;2023-02-14;COMGEST RENAIS. Euro;FR0000295230;Sell;-1,063;234,71;249,39;Technique:Opérations SG Sequoia
18;2022-11-30;SG TRESO 6 M P;FR0011192285;Buy;34,689;96,29;-3340,16;Technique:Opérations SG Sequoia

I have tried a number of options by changing the sign of montant (i.e. amount), separately or together with changing the sign of parts (i.e. quantity).

I did the same in an existing KMM database of a new one (i.e. empty)

I seek your help to understand what is happening.
Many thanks in advance

René
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: Import CSV file issue

Tue Mar 07, 2023 2:02 pm
Here's what I spot as difference

Working file:
Code: Select all
Action;Shares/Parts;Amount/Montant
Buy;    positive;        negative
Sell;   negative;        positive

Failing file:
Code: Select all
Action;Shares/Parts;Amount/Montant
Buy;    positive;        negative
Sell;   positive;        positive


I see a difference in signs for the Sell action which may make a difference. I have to admit, that I did not try any of the data against the application. Does that help?


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
Rene_Paul
Registered Member
Posts
7
Karma
0

Re: Import CSV file issue

Tue Mar 07, 2023 2:10 pm
Many thanks for your reply. I'm going to check it, and I'll keep you informed.

René
Rene_Paul
Registered Member
Posts
7
Karma
0

Re: Import CSV file issue

Tue Mar 07, 2023 10:18 pm
Hi,

Thank you so much for your advice and your help. It works perfectly.

René


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]