We've had to do similar in the past, we did use ansi C mind you, but the 'method' may be of use to you.

We exported the xls files to csv with headers (ensuring all the headers were the same text/name, reguardless of order.) Then we made a 'hash' table of arrays for each column. We then processed each file in turn, adding each row's of data into the correct 'hash->array', at the end we then simply wrote out a new csv file with all the combined data. It worked well and was only an hour or so of coding and testing.

In C we used a structure and had to manage all our memory etc. Thankfully this is not necessary in Perl!

I hope the method we've used successfully numerous times in the past gives you a lead on how to do it yourself. Good luck! (btw I did see this cvs parser on cpan and it looks as if it might work for you as well. http://search.cpan.org/~makamaka/Text-CSV-1.21/lib/Text/CSV.pm). We didn't access the xls directly as it was on our unix servers, but the client was pleased with the simple 2 step solution (export csv, upload csv to the cgi that processed it and returned a downloadable csv back to the client). I know there are modules to access Excel and it's files, but I've never worked with them and not sure if they will work for you.

In reply to Re: Joininig excel columns from many files by itsscott
in thread Joininig excel columns from many files by dtm81

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.