Thanks for your answer. Problem with most of the Excel stuff on CPAN, it is (as far as I could see) based upon Spreadsheet::ParseExcel. As Stephen pointed out, there is Spreadsheet::ParseExcel_xlhtml which uses an xlhtml as external parser. This is then quite similar to your 'wrapper' solutions.

I'm still not sure which way to go, but at least, I have now more ways to look at.

Heiko

Patrick Leboutillier wrote:
Heiko,

The reason you are having performance problems is that Inline::Java does
not actually transfer
the array over to Perl. It actually sends a 'reference' to it an calls
Java each time you want to access an element. In your case you have 4000 *
50 = 200000 elements, so that's why it's slow.

Here are things your could try:

- More Perl-Excel stuff: http://search.cpan.org/search?m=all&q=Excel&s=1

- Create a Java wrapper class that will return each row (as a tab
separated String), instead of each cell. That way you can reduce your
number of Perl-Java trips by 50.

- Use a temporary ASCII file that Perl can parse easily afterwards.





Reply via email to