On Thu, Jun 10, 2010 at 5:47 PM, David Fisher <[email protected]> wrote:
>
> On Jun 10, 2010, at 2:03 PM, Will Coleda wrote:
>
>> On Thu, Jun 10, 2010 at 4:12 PM, Will Coleda <[email protected]> wrote:
>>> I'm running into a performance issue using the ss usermodel to modify
>>> an existing XLSX file - I'm poking at potentially using XSLT to do the
>>> conversion I need - I have code that can grab the XML for an existing
>>> spreadsheet (based on the SAX examples on the website, danke.), but am
>>> now looking for a way to replace the existing XML for a spreadsheet
>>> with the transformed version.
>>>
>>> I'm looking through the Package and PackagePart APIs, but don't see
>>> way to replace the existing XML with new XML and then save out the
>>> whole doc.
>>>
>>> Any pointers?
>>> --
>>
>> Looks like if I follow this path, I'm almost better off just exploding
>> the .xslx, using XSLT on the components, and then rezipping. ;)
>
> That makes sense. Let us know how it goes.
>
> Regards,
> Dave

I ended up using a hybrid approach, using POI for some pre-fetching of
data, and then XML manipulation (but not actual XSLT) for generating a
modified .xslx file.

Cold Fusion's <cfxml> provides a decent enough OO interface to an
arbitrary chunk of XML, that I'm tempted to switch to that for the
parts currently using (a very small portion) of POI. I'm already stuck
at this point having to know what the XML looks like, and this would
let me avoid pulling in the POI library (which is a little tricky on
CF servers, as they ship an older version of POI by default.)

-- 
Will "Coke" Coleda

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to