Closed etsoft closed 1 week ago
It's tested on versions 15.2 - 19.12. Are you getting an error? If so, can you copy the error into this issue?
Also, the last line of the script should be reader.to_csv("d:\temp\temp2")
Hi they error is 👍
Traceback (most recent call last):
File "D:\temp\csv\csv.py", line 1, in
Change the name of your script file from csv.py to something like xer_to_csv.py.
Since the xer_reader imports csv from the standard library, I think your script being named csv.py is causing the error.
I have renamed it , still got an error 👍
D:\temp\csv>python rcsv.py
Traceback (most recent call last):
File "D:\temp\csv\rcsv.py", line 4, in
I could send you the XER file
Looks like there is a new table in the newer versions of P6. I will work on adding the table.
Thank you
It will be a while before I can upload the new version. In the meantime you can add a line of code to the script to delete the FINTMPL table before running to_csv. See below.
from xer_reader import XerReader file = r"d:\temp\csv\TACS-NL.xer" reader = XerReader(file) reader.data = reader.delete_tables("FINTMPL") reader.to_csv("d:\temp\temp2")
Oke, no problem, I working under windows and now I'm getting 👍 Invalid argument: 'd:\temp\temp2\TACS-NL_CURRTYPE.csv' with the double \
Thank you for the effort.
Hmmm. Make sure the temp2 folder exists within the temp folder, and change the last line to reader.to_csv(r"d:\temp\temp2")
Or change the last line to reader.to_csv() The files will be saved in your csv folder.
Yes is working Thank you
A nice feature would be to be able to only get some of the tables, please think about this.
Issue closed with version 0.4.0. Added feature to only export certain tables to CSV.
Hi, with what versions of XER is this tested? I have version 23 now.
This is the script I'm trying to run ::
from xer_reader import XerReader file = r"d:\temp\csv\TACS-NL.xer" reader = XerReader(file) to_csv("d:\temp\temp2")