Re: Handling of quote characters in ssconvert

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
a b'd" \';" d'd
"a" "b'd"" "\';"" "d'd"
I need it to become
!a! "b\'d\"" "\\\';\"" "d\'d"

I hope i posted this in the correct way.


On Sun, Nov 1, 2009 at 9:05 PM, Andreas J. Guelzow <aguelzow 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:
      quote  The  character  or  string  used for quoting fields. Defaults to
             "\"" (quotation mark / double quote).

             When does data need to be quoted?  "never", "auto" (puts  quotes
             where needed), or "always". Defaults to "never".

             Controls  whether initial or terminal whitespace forces quoting.
             Defaults to TRUE.


Andreas J. Guelzow <aguelzow pyrshep ca>

gnumeric-list mailing list
gnumeric-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]