poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MSB <markbrd...@tiscali.co.uk>
Subject Re: Populating EXCEL Templates using configuration files
Date Tue, 02 Mar 2010 17:50:07 GMT

It sounds as though you may be looking at the older xml format then. This is
equally easy to test; you should be able to open the file using a simple
text ediot - notepad for example if you are running under Windows.

The best bet for working directly with the xml if this is the case would be
something like Xerces which would offer you the choice between a stream or
serial parser such as SAX and the document object model or DOM.


Mark B

PS Your best source of information about this file format - if it is indeed
the earlier version - will be Microsoft. They have a gooly number of
articles available at MSDN.

Richard Holmes-2 wrote:
> Hi Mark,
> Thank you for your help, I had a quick try of your method but could not
> open
> the sheet at all so I think we must be using a different format.
> Looking at the properties using the POI filesystem I see XML but it is an
> unsupported property.
> For the time limit I am going to look at the other suggestion using
> velocity.
> Many thanks
> Richard
> On 1 March 2010 16:11, MSB <markbrdsly@tiscali.co.uk> wrote:
>> Richard, I just re-read your post and wanted to ask whether you knew that
>> there were two different 'versions' of Excel's xml file format. The
>> earlier
>> format was introduced for, I think, version 2003 and so you need to be
>> careful to identify just which 'version' of the xml file format you are
>> using. The one I am familiar with, and which is supported by POI, is the
>> format that is documented in ECMA376 and, as my earlier post indicates,
>> is
>> a
>> zipped archive consisting of several related files and folders. The
>> earlier
>> version uses a much simpler format and it is possible to identify which
>> one
>> you have by opening the file using a simple text editor. If the file
>> conforms to the earlier format then you will be able to open the file
>> with
>> a
>> text editor and view the raw xml directly; obviously this will not be the
>> case if you are dealing with the later - version 2007 and later - version
>> of
>> the file format.
>> Yours
>> Mark B
>> PS The code I included in my last post will NOT work for the earlier file
>> format.
>> Richard Holmes-2 wrote:
>> >
>> > Hi All,
>> >
>> > A client of mine is looking to export a java object model to various
>> > sheets.  These sheets are not of any particular format or layout and
>> they
>> > would like to be able to use some form of configuration files to
>> populate
>> > the sheets how they wish, the EXCEL version being used is 2003.
>> >
>> > The options I am looking into are:
>> > 1) Use the XML features in EXCEL to populate the workbook - but in this
>> > case
>> > I can not find a way of updating the XML source in Java, in .net is it
>> > ImportXML.
>> > 2) Use some sort of configuration take the java or XML object and
>> populate
>> > the sheets/cells in Excel, I have tried jxls but this does not have the
>> > flexibility other than this I have come up short.  (I am looking into
>> > using
>> > mono but I don't believe this is possible either).
>> > 3) Use EXCEL macros to re-format the data once in the sheet, but again
>> > this
>> > requires the users to perform actions, such as allowing macros to be
>> run.
>> > Some of our users find this a complex proceedure :)
>> >
>> > I have thought of writing my own engine but the deadlines are too
>> short.
>> >
>> > If anyone has any ideas I would be very greatful, the easiest for me
>> would
>> > be to find a way of updating XML or find an engine that uses a
>> > configuration
>> > file to populate EXCEL.
>> >
>> > Many thanks
>> > Richard
>> >
>> >
>> --
>> View this message in context:
>> http://old.nabble.com/Populating-EXCEL-Templates-using-configuration-files-tp27741955p27745536.html
>>  Sent from the POI - User mailing list archive at Nabble.com.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org

View this message in context: http://old.nabble.com/Populating-EXCEL-Templates-using-configuration-files-tp27741955p27758922.html
Sent from the POI - User mailing list archive at Nabble.com.

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

View raw message