[Gllug] xls2csv spreadsheet conversion

t.clarke tim at seacon.co.uk
Fri Jul 27 10:25:30 UTC 2001


---------------------------------------
Message from:-
Tim Clarke  (tim at seacon.co.uk)
Seacon Holdings plc Group, London, U.K.
Telephone: +44 (0)1474 320000
      Fax: +44 (0)1474 329946
---------------------------------------

Hi all

Firstly, thanks for the pointers regarding Excel spreadsheet conversion.
I downloaded the catdoc sources and xls2csv was not included, so I downloaded
the xls2csv package (version 0.0.1) separately and compiled it.

It extracts the data, but unfortunately it is unusable in the form presented,
as you can see from the specimen below.  I am afraid I never got much beyond
the "if Jane has two apples and John had three 4 apples, how many apples has
Peter got" stage at school, which makes me a bit of failure on that front
(and probably emglish grammar too !);  but the weird numbers I guess must be
something to do with excel holding its numbers internally as 'floating point',
though why I can't imagine. How one converts what is shown in the XLS2CSV
extraction to real numbers, I cannot begin to guess, and in any event it appears
that in the last two lines, tghe same magic number equates to two different
numbers (albeit 1 digit apart) in the excel version.

Can anyone suggest a hack to the xls2csv code to resolve this ?

Many thanks

Tim Clarke


XLS2CSV extraction:
,,,,,,1.94664792e-307,1.82297433e-307,1.81982359e-307,1.843671428e-307
,,,,,,1.946647932e-307,1.82297433e-307,1.81982359e-307,1.84353562e-307
,,,,,,1.946647935e-307,1.82297433e-307,1.81982359e-307,1.843522039e-307
,,,,,,1.946647935e-307,1.82297433e-307,1.81982359e-307,1.84353562e-307
,,,,,,1.946647936e-307,1.82297433e-307,1.81982359e-307,1.84353562e-307
,,,,,,1.946647936e-307,1.82297433e-307,1.81982359e-307,1.843522039e-307

Opening the file with Excel and 'saving as' CSV format file:
,,,,,,32850596,150.00,110,"1,176.00",
,,,,,,32850625,150.00,110,"1,156.00",
,,,,,,32850632,150.00,110,"1,154.00",
,,,,,,32850634,150.00,110,"1,156.00",
,,,,,,32850635,150.00,110,"1,156.00",
,,,,,,32850636,150.00,110,"1,154.00",

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list