Skip to content

OpenSource 1000ASA.com

Sections
Personal tools
You are here: Home » Support forum » Change Delimiter

Forum Post : Change Delimiter

Up one level
Posted by at 2006-09-19 00:51 (2 replies)
Is it possible to change the delimiter for the imports? Currently the delimiter is set to a comma, but there are many commas in the text that I am importing. Thanks, Shem

Re: Change Delimiter

Posted by lorty at 2006-09-19 15:57

I am using the python csv module,

to change delimiters you should refer to its documentation.

Anyway its a good practice to quote the text you are going to import,

e.g.

id, text, field1

1,"this text is quoted, so this comma is not a problem","abcd"



Please let me know if this solves your problem.



Thanks,

Lorenzo Musizza



Re: Re: Change Delimiter

Posted by at 2006-09-19 18:25
Thank you for the quick response and the reference to the CSV module. It turns out I didn't need to make any changes to the Importer.py file. I needed to set the delimiter in the header of the upload file in the Plone interface in Step 2. The example header provided was: ID,Title,Description,Text By replacing the commas with my desired delimiter (e.g. ~) I could successfully map the fields: ID~Title~Description~Text In this case I am attempting a mass html import, where commas and quote characters are extremely common, which would truncate my imports. The new delimited characters are working very well. Thanks for your help, Shem
« January 2009 »
Su Mo Tu We Th Fr Sa
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
 
 

Powered by Plone

This site conforms to the following standards: