From email: import from CSV

(Dmitry Barashev) #1

This came by email
HI team, I want to import tasks from a CSV file. Is that possible? What’s the file format? Thanks

(Dmitry Barashev) #2

GanttProject expects CSV in the same format as one produced by CSV export. Export the sample project to CSV, open the result in any text editor and you will see the format.

(paul) #3

Import from CSV appears to be broken. I did an export, added some data, then did an import, and nothing happened. An export to CSV creates a file with duplicate headers (coordinator is listed twice), so I got an error, but fixing the error and running again, the import does not add anything to the project.

(Dmitry Barashev) #4

I just have checked in GanttProject 2.8.6. No, export of HouseBuildingSample to CSV does not create duplicate headers, there is only one Coordinator column. It imports back fine.

We can’t say anything certain about your issue without seeing your .gan file and how did you add the data. Please share the original project file and your modified CSV.

(paul) #5

Looking at the XML in the .gan file, I think I found the problem … somehow a custom field was created:

       <taskproperty id="tpd0" name="type" type="default" valuetype="icon"/>
      <taskproperty id="tpd1" name="priority" type="default" valuetype="icon"/>
       <taskproperty id="tpd2" name="info" type="default" valuetype="icon"/>
       <taskproperty id="tpd3" name="name" type="default" valuetype="text"/>
       <taskproperty id="tpd4" name="begindate" type="default" valuetype="date"/>
       <taskproperty id="tpd5" name="enddate" type="default" valuetype="date"/>
       <taskproperty id="tpd6" name="duration" type="default" valuetype="int"/>
       <taskproperty id="tpd7" name="completion" type="default" valuetype="int"/>
       <taskproperty id="tpd8" name="coordinator" type="default" valuetype="text"/>
       <taskproperty id="tpd9" name="predecessorsr" type="default" valuetype="text"/>
       <taskproperty id="tpc0" name="Coordinator" type="custom" valuetype="text"/>

My guess this was done during an import, as I did not create the column myself.

Does the import process create custom columns automatically? If so, should it prevent creating columns with the same name, but different capitalization?

full .gan attached.

test.gan (4.9 KB)

(l) #6

I just tried it and an error ocured “the format and the extension do not match or the file is damage”
Can you help me?


(Dmitry Barashev) #7

What’s this? It doesn’t look as a part of GanttProject UI, we do not show such messages. What did you try? Where this message comes from?

(l) #8

Continuing the discussion from From email: import from CSV:

As soon as i “export” the.cvs .and open it…
If importing a text file it just import the first column,

Thanks for the help…waiting

(l) #9

When I open the exported, file CSV…

(Dmitry Barashev) #10

May I ask you to write a little bit more understandable text? Where do you open this CSV file? As I said, we do not have such messages in GanttProject.

(l) #11

I export the file in csv format. And I open it in excel, and the error occurred.

(Dmitry Barashev) #12

Thanks! Please read this topic.

Please consider searching the forum before posting and consider starting your own topics instead of adding comments to topics started by someone else, unless you are really facing the same issue. You issue is with opening in Excel a CSV file produced by GanttProject. The original message in this topic is about the opposite: importing CSV into GanttProject. I guess that people who are involved into the discussion are not very happy to receive irrelevant messages.

(l) #13

The main issue is that i cannot import a csv file.
And I follow the recommendation: to export see the format.
I cannot import a csv file…

(Dmitry Barashev) #14

So what’s the problem with importing? If your CSV file conforms to GanttProject metadata format then Project > Import > Comma-separated values files works fine. You can export a sample project to CSV from GanttProject and import it back, it works perfectly.

(l) #15

hello, it only import the first column

(Dmitry Barashev) #16

Please read my message once again:
Project > Import > Comma-separated values files

It imports CSV fine. From your messages I guess that you are running Import from text file which indeed imports task names only.

You may also want to take a look at CSV settings in the options dialog.

(l) #17

Hi, I tried both. And non of them works
I’m interested in importing ans csv file.
I’ll keep trying … thanks

(Dmitry Barashev) #18

Please share your CSV file and screenshots of your Application UI and CSV setting pages.

(Daniel Ball) #19

no matter what i do, i cant import .csv files? Please help!

(Dmitry Barashev) #20

Did you try exporting a sample project into CSV and then importing the result back? This will show you what structure is expected in CSV file for successful import.