Mail Archives: cygwin/2010/02/07/04:26:53
Dear all,
I did not manage to get the perl codes running properly, but then
again, I did not invest too much time in it and I am not familiar with
perl.
I did come across a xls2csv executable, which runs smoothly under
cygwin and can be easily lined up with (g)awk and sed to get to what I
wanted.
Thanks for your suggestions !
With best regards / Vennlig hilsen
Maarten
On Fri, Feb 5, 2010 at 12:59 PM, Ehud Karni <ehud AT unix DOT mvs DOT co DOT il> wrote:
> On Thu, 4 Feb 2010 19:55:36 Maarten Vanneste wrote:
>>
>> Dear all,
>> I was wondering whether there is a cygwin tool/program which converts
>> microsoft excel files to text. Any suggestions ?
>
> I use xlhtml, source at: =A0http://chicago.sourceforge.net/xlhtml/
>
> I applied the following patch:
>
> diff -c ~/xlhtml-0.5/xlhtml/xlhtml.h-org ~/xlhtml-0.5/xlhtml/xlhtml.h
> *** ~/xlhtml-0.5/xlhtml/xlhtml.h-org =A0 =A0Thu Apr 11 03:23:51 2002
> --- ~/xlhtml-0.5/xlhtml/xlhtml.h =A0 =A0 =A0 =A0Thu Dec 24 18:16:51 2009
> ***************
> *** 20,28 ****
> =A0#include "version.h"
>
> =A0/* Used by packed string array Opcode: 0xFC */
> ! #define HARD_MAX_ROWS_97 =A0 =A0 =A00x7FFE =A0 =A0/*!< Used in add_wb_a=
rray to prevent OOM */
> ! #define HARD_MAX_ROWS_95 =A0 =A0 =A00x3FFF =A0 =A0/*!< Used in add_wb_a=
rray to prevent OOM */
> ! #define HARD_MAX_COLS =A0 =A0 =A0 =A0 256 =A0 =A0 =A0 =A0 =A0 /*!< Used=
in add_wb_array to prevent OOM */
>
> =A0static U16 HARD_MAX_ROWS =3D HARD_MAX_ROWS_97;
> =A0/**********************************
> --- 20,28 ----
> =A0#include "version.h"
>
> =A0/* Used by packed string array Opcode: 0xFC */
> ! #define HARD_MAX_ROWS_97 =A0 =A0 =A00x0FFFF =A0 /*!< Used in add_wb_arr=
ay to prevent OOM */
> ! #define HARD_MAX_ROWS_95 =A0 =A0 =A00x07FFF =A0 /*!< Used in add_wb_arr=
ay to prevent OOM */
> ! #define HARD_MAX_COLS =A0 =A0 =A0 =A0 256 =A0 =A0 =A0 /*!< Used in add_=
wb_array to prevent OOM */
>
> =A0static U16 HARD_MAX_ROWS =3D HARD_MAX_ROWS_97;
> =A0/**********************************
> ***************
> *** 57,63 ****
> =A0 =A0 =A0 =A0U16 type; =A0 =A0 =A0 /*!< This will record the record typ=
e that generated the cell */
> =A0 =A0 =A0 =A0U16 spanned; =A0 =A0 =A0 =A0 =A0 =A0/*!< If 1 don't output=
*/
> =A0 =A0 =A0 =A0uni_string ustr; =A0 =A0 =A0 =A0/*!< The cell's displayed =
contents */
> ! =A0 =A0 =A0 U16 rowspan; =A0 =A0 =A0 =A0 =A0 =A0/*!< rows to span */
> =A0 =A0 =A0 =A0U16 colspan; =A0 =A0 =A0 =A0 =A0 =A0/*!< columns to span */
> =A0 =A0 =A0 =A0uni_string h_link; =A0 =A0 =A0/*!< If a hyperlinked cell, =
this is the link*/
> =A0}cell;
> --- 57,63 ----
> =A0 =A0 =A0 =A0U16 type; =A0 =A0 =A0 /*!< This will record the record typ=
e that generated the cell */
> =A0 =A0 =A0 =A0U16 spanned; =A0 =A0 =A0 =A0 =A0 =A0/*!< If 1 don't output=
*/
> =A0 =A0 =A0 =A0uni_string ustr; =A0 =A0 =A0 =A0/*!< The cell's displayed =
contents */
> ! =A0 =A0 =A0 U32 rowspan; =A0 =A0 =A0 =A0 =A0 =A0/*!< rows to span */
> =A0 =A0 =A0 =A0U16 colspan; =A0 =A0 =A0 =A0 =A0 =A0/*!< columns to span */
> =A0 =A0 =A0 =A0uni_string h_link; =A0 =A0 =A0/*!< If a hyperlinked cell, =
this is the link*/
> =A0}cell;
>
>
> I did it on GNU/Linux but I think it'll work well on Cygwin.
>
> It worked for several years in our company without the patch, but
> lately we started receiving Excel files with 65535 lines in one sheet,
> so I had to change the hard coded line limit.
>
> Ehud.
>
>
> --
> =A0Ehud Karni =A0 =A0 =A0 =A0 =A0 Tel: +972-3-7966-561 =A0/"\
> =A0Mivtach - Simon =A0 =A0 =A0Fax: +972-3-7976-561 =A0\ / =A0ASCII Ribbon=
Campaign
> =A0Insurance agencies =A0 (USA) voice mail and =A0 X =A0 Against =A0 HTML=
=A0 Mail
> =A0http://www.mvs.co.il =A0FAX: =A01-815-5509341 =A0/ \
> =A0GnuPG: 98EA398D <http://www.keyserver.net/> =A0 =A0Better Safe Than So=
rry
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -