Trying to use Excel::Reader::XLSX

103 views
Skip to first unread message

Ian Daysh

unread,
Aug 21, 2013, 1:17:56 PM8/21/13
to spreadsheet...@googlegroups.com
Hi,
Probably not the place to ask this, but here goes ayway.

I know this package has not had much development, and I'm trying to get my head around the internals and see if I can use it in my application. I might be stretching your memory as it seems the last checkin was over a year ago!

Is it possible to set a cell object to a particular row/column as in Spreadsheet::ParseExcel?

If not, I can see my only option is to create an array of $row->values() and use $cells[row][col] instead. That would be currently up to 120x5 cells.

I see that if a next_cell() call hits an empty cell (the first cells in the first few rows are empty in my spreadsheet) then it doesn't carry on to the next cell in that row.

I understand you have other priorities, and I would like to contribute to this (beyond help with documentation for Spreadsheet::WriteExcel that I have done in the past). If you can point me to a place to start understanding the code so I can contribute I'll see what I can do.

Thanks
Ian.

jmcnamara

unread,
Aug 21, 2013, 2:49:44 PM8/21/13
to spreadsheet...@googlegroups.com
On Wednesday, 21 August 2013 18:17:56 UTC+1, Ian Daysh wrote:
Hi,
Probably not the place to ask this, but here goes ayway.

I know this package has not had much development, and I'm trying to get my head around the internals and see if I can use it in my application. I might be stretching your memory as it seems the last checkin was over a year ago!


Hi,

One of my goals when I started Excel::Reader::XLSX was to have a fast and memory efficient solution and avoid the flaws in Spreadsheet::ParseExcel. As such the basic design was to read a row at a time and to only store that row in memory. I figured that once the basic framework was in place I could create a ParseExcel style wrapper around it (but only as an option, the main interface was going to be different).

My first pass was a "sparse" reader when next_row() got the next row that had data (and skipped any non-existent rows in between). And the same for cells within the row.

While this was useful as a back-end parser I realised after it was finished that this wasn't a good interface to expose to the end-user and started writing a "sequential" reader where next_row() returned the next sequential row whether it had data or not (up until the last row). I got some of the way through that when one or more real life activities intervened to soak up my free time and I had to drop it.

So that is where it is at the moment. A deconstructed engine in pieces on the floor waiting to be rebuilt.

However, I've lost interest. I have about 10 repos on Github (as well as some forks) of which  2 or 3 of them are reasonably active and take up any free time I have.

All I can suggest is to take any useful parts and start your own module. The efficient use of XML::LibXML took a while to figure out and might be helpful. I'd suggest using a similar test suite but to avoid the JSON step (that was to make the tests shareable if I wanted to rewrite it in another language but they were a pain to generate and maintain and I as going to revert to something simpler).

Apart from that the test suite is probably the best place to start to understand what is going on.

Regards,

John

Ian Daysh

unread,
Aug 22, 2013, 7:57:53 AM8/22/13
to spreadsheet...@googlegroups.com
Hi John,

Thanks for the info. I can understand the losing interest part, and I'm not going to rant on about how you can leave something in this kind of state! ;-)

I've managed to get my application working as per my array of arrays idea, and don't expect too much of a problem as the datasets are quite small.

I might look at taking what you've done as a starting point and enhancing from there, but then again as I have a working system it's not likely in the short term :-D. If things start getting slow, then enhancement may be necessary.

Thanks for all your work on all these modules.

Regards
Ian.


--
You received this message because you are subscribed to the Google Groups "Spreadsheet::WriteExcel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spreadsheet-write...@googlegroups.com.
To post to this group, send email to spreadsheet...@googlegroups.com.
Visit this group at http://groups.google.com/group/spreadsheet-writeexcel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages