You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2015/05/01 19:39:43 UTC

[Bug 57882] New: allow appending to large workbooks without reading

https://bz.apache.org/bugzilla/show_bug.cgi?id=57882

            Bug ID: 57882
           Summary: allow appending to large workbooks without reading
           Product: POI
           Version: 3.10-FINAL
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: geoff.groos@empowerops.com

As a developer and POI user I want to be able to append sheets to an existing
very large workbook as quickly as possible so that I can allow my application
users to update existing workbooks easily

Specifically I am looking for the ability to point POI at a very large workbook
and say 'add these sheets to it' without having to deal with any of the already
existing content in that workbook. If you would humor a little bit of feature
creep and speculative development: I suspect many users would appreciate a mode
whereby they can append rows to an existing sheet.

Currently the only method (given a small heap space) to do this would be to use
the XSSF workbook with a SAX driver and lazy reading scheme, streaming its
content to 'the front' of an SXSSF workbook, such that all the contents of the
existing workbook can be put into the SXSSF instances file buffer. Once that
(long running) task is finished, I can append any new data to the back of that
SXSSF workbook.

Worth noting, that while I'm pretty sure this strategy would work, after a 20
minute implementation I haven't got it working: creating my XSSF workbook with
the package object in READ mode appears to do some amount of fairly aggressive
prefetching, which is causing heap space errors.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57882] allow appending to large workbooks without reading

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57882

--- Comment #5 from Javen O'Neal <on...@apache.org> ---
A more general solution to the memory problem is to lazy load sheets and allow
sheets to be swapped between disk and memory. I'm guessing this is how
Microsoft Excel keeps its memory footprint from exploding on workbooks with
thousands of sheets.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57882] allow appending to large workbooks without reading

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57882

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |enhancement

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57882] allow appending to large workbooks without reading

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57882

Javen O'Neal <on...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #3 from Javen O'Neal <on...@apache.org> ---
Any updates on the JavaFX bug or suggested documentation (or example code
https://svn.apache.org/viewvc/poi/trunk/src/examples/)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57882] allow appending to large workbooks without reading

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57882

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
If you just want to add sheets, then as long as those sheets have no external
references, it should be fairly easy. Open the destination OPCPackage, and read
the workbook stream in via xmlbeans (it's small). Open the OPCPackage holding
your sheets to add, create a part in the destination, then copy the contents
over of the sheet part. Add the relation for the new sheet, and use xmlbeans to
add a reference to the new sheet with that relation. Save!

I'm not sure if this counts as in-scope for SXSSF or not, but I could certainly
see value in writing it up as something for the examples directory for now at
least. If you do get it working, please contribute it back as such!

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57882] allow appending to large workbooks without reading

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57882

--- Comment #2 from geoff.groos@empowerops.com ---
I've never worked with the OPCP package so I'm only understanding your
suggestion vaguely, but I'll see what I can do and if I come up with something
elegant I'll get it back to you guys.

Right now the issue that would implement this feature on my side is blocked by
another feature request I've got with JavaFX
(https://javafx-jira.kenai.com/browse/RT-40703), so I'm not going to make any
forward progress on this for some time.

In the mean time you I'd be happy to turn this issue into a 'add documentation
on how to do appending sheets to large workbooks' and leave it open until I get
around to implementing it, or simply closing it as WONT-FIX.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57882] allow appending to large workbooks without reading

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57882

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #4 from Dominik Stadler <do...@gmx.at> ---
Keeping this on needinfo based on previous comment.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57882] allow appending to large workbooks without reading

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57882

rbidet@ribics.fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org