in reply to Joininig excel columns from many files
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.
|
---|