Opened 9 years ago

Closed 9 years ago

#5546 closed enhancement (worksforme)

Support non-comma delimited files.

Reported by: max.vorticity@… Owned by: François Granade
Priority: normal Component: TicketImportPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


Tab delimited is needed if the field data itself can contain commas. It appears that using delimiter='\t' would be needed when defining the reader: reader = csv.reader(file, delimiter='\t'). So it would be great if a custom delimiter could be somehow be defined when importing the file. At least some common delimiters like tab, '|', ':', etc.

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by François Granade

Resolution: worksforme
Status: newclosed

Commas *are* supported. Although I haven't tested it for the Import plugin, I have used csv.reader before on other projects that had commas. CSV files must "escape" commas, i.e. put them between double quotes. a CSV with a column with commas will look like this:

123,a description,"a field, containing commas"

Try exporting from Excel: you will see it adds the quotes. And I'm quite sure it'll work with the import plugins.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain François Granade.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.