I did not expect such situation. Usually people have 1 account for each currency. Then dividends are imported correctly.
Or do you have account with one currency but the dividend is paid in a different currency? I think it does not have to be difficult to update the script.
The problem with error can be fixed. I have figured that out recently - choose “Type of data” as “Portfolio Transactions”. Then it can work with exchange reates. But I don’t know if this breaks something else ![]()
I have retirement account (in Poland called IKE) which have currency in PLN and dividends from US stocks are converted to PLN. Currency is converted by XTB from USD to PLN.
Ok, I will update it when I have some free time ![]()
the ImportExcel in powershell download went good, but i am not sure it has installed
After running (with admin) .bat file is a problem - for a sec comes a black window and nothing after happens. I am not able to choose the xlsx file
Edit the .bat file and leave just “@pause” at the last line. Then the window does not close automatically and you can see the error if there is any.
@hubga i get some errors after i ran the script like: Import-Excel : The term ‘Import-Excel’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
And yes i ran Install-Module -Name ImportExcel in powerShell
Any suggestions?
@Edg I found this topic. You probably did not install it with admin rights. Just run the 2 lines mentioned there and I hope it will work
https://stackoverflow.com/questions/41192536/cannot-install-importexcel-powershell-module
Thank you, it didn’t worked for me. I asked chatGpt to help and i added at top of the script a few line of code which force-loaded ImportExcel from known path. Now it works.
does it work with “XTB investment plans”? when I follow the steps to import csv to PP I dont know how to correctly map transfers made by investment plans
the transaction look like this:“906593305”;“transfer”;“18.08.2025 10:10:00”;“”;“Transfer from 51704923 to 52083206”;“-200”;“USD”;“18.08.2025”;“10:10:00”;“”;“”;“USD”;“XTB USD”
“906593311”;“transfer”;“18.08.2025 10:10:00”;“”;“Transfer from 51704923 to 52083206”;“200”;“USD”;“18.08.2025”;“10:10:00”;“”;“”;“USD”;“XTB USD”
“51704923” is my USD account, “52083206” is probably some subaccount created for the investment plan? not sure.
it always creates 2 transactions subtracting and adding the same value. both are of type “transfer”.
so what should it be mapped to? Transfer (Inbound) or Transfer (Outbound)? how?
or should it be dropped?
I am trying the PP for the first time so I am probably missing something so appologies if I am not making sense:)
I don’t use ivnestment plans so I don’t know.
It looks like just money transfer. You should search for some export from the investment plan.
Here is a small update. XTB splits sold position into 2 lines (sell and profit) - joined together as “Stock sale”. The “close trade” part is ignored.
XTB_convert_run.zip (2.9 kB)
Hi, the cvs creation works for me. But I can’t assign columns in the export XTB is not the ISIN of the stock name. I’m also solving how to proceed when buying a stock on the London Stock Exchange (there are several fees here but in the PP there is only one item for fees). Thank you very much

