Gossamer Forum
Home : General : Perl Programming :

rows to table in perl?

Quote Reply
rows to table in perl?
Hi,

I've got 100's of word documents. I have to convert these to xml using perl after saving them to text format. The problem is that each file contains multi column, multi row tables which resemble this format:

column1 column2 column3

row1 a b

row2 a b c

Each row and column can contain different size, multiword entries. When saved to text format, the tables look like this:

column1

column2

column3

row1

a

b

row2

a

b c



How do I use perl to put these back into the original format where it is a table of information separated by either tabs or a special character?

Thanks,

Mike
Quote Reply
Re: [mwall] rows to table in perl? In reply to
Hi Mike,

We can recover if we know a mark which begins or ends the column part and a mark which begins or ends a row. Or if we know the number of fields, we can do this

Cheers,

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] rows to table in perl? In reply to
Ok, Lets assume each table starts with the word table (as in "Table 1") and goes to the next table ("table 2", etc) except for the last table that will always be followed by a section heading such as section 1. Can you give me some specific examples.

Thanks, Jeff Smile
Quote Reply
Re: [mwall] rows to table in perl? In reply to
Sorry to bug you, but I was wondering if you found a solution to this problem, since I have something very similar to deal with.

Thanks,

Rux