No, those options only seems to affect the quotes around whole cell
contents, if there is characters inside a cell it doesn't seem to be
affected in any way.
ssconvert -O 'quoting-mode=always quote="\""' test.xlsx out.txt
converts
a b'd" \';" d'd
to
"a" "b'd"" "\';"" "d'd"
I need it to become
!a! "b\'d\"" "\\\';\"" "d\'d"

I hope i posted this in the correct way.

/Björn

On Sun, Nov 1, 2009 at 9:05 PM, Andreas J. Guelzow <aguel...@pyrshep.ca>wrote:

> On Sun, 2009-11-01 at 20:55 +0100, Björn Nilsson wrote:
> > Hi,
> > I want to use ssconvert to convert different types of spreadsheets to
> > csv files for import into a sql database. The problem I have is that
> > when there is fields with a single or double quotes in they turn up
> > unescaped. Also "\" would be an issue. I have started looking for a
> > tool to pre-process the csv files but it would be very nice if
> > ssconvert had an option for doing this in one step. Would it be
> > possible to tell ssconvert which characters to escape?
>
> I didn't try it but shouldn't you be able to set up quoting using the
> options for the configurable text exporter?
>
> >From the ssconvert manual page:
> OPTIONS FOR THE CONFIGURABLE TEXT (*.txt) EXPORTER
>       quote  The  character  or  string  used for quoting fields. Defaults
> to
>              "\"" (quotation mark / double quote).
>
>       quoting-mode
>              When does data need to be quoted?  "never", "auto" (puts
>  quotes
>              where needed), or "always". Defaults to "never".
>
>       quoting-on-whitespace
>              Controls  whether initial or terminal whitespace forces
> quoting.
>              Defaults to TRUE.
>
> Andreas
>
>
> --
> Andreas J. Guelzow <aguel...@pyrshep.ca>
>
> _______________________________________________
> gnumeric-list mailing list
> gnumeric-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gnumeric-list
>
_______________________________________________
gnumeric-list mailing list
gnumeric-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gnumeric-list

Reply via email to