× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Peter,

Interesting reading.... will follow the thread.

Think you're moving towards the low end of the pool :-)

Leif
----- Original Message ----- 
From: "Peter Dow (ML)" <maillist@xxxxxxxxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: 20. juli 2005 18:50
Subject: RE: POI/HSSF default cell formatting


> Hi John,
> 
> Thanks for the link.  Actually a couple of the POI/HSSF developers have
> responded -- it's a bug (issue# 35799).  Apparently when you create a new
> cell object, they are setting the cell style.  If they do NOT set the cell
> style, Excel will use the proper default.
> 
> The column formats are stored in global records (i.e. part of the workbook,
> not the worksheet), and are referred to by an index (more like a key than an
> array index -- each format record has the index value in it and it has
> nothing to do with their position within the substream).  The ColumnInfo
> records contain a starting and ending column#, plus the format record index,
> so yes,  they do apply to the entire column.  However, according to the
> documentation
> 
> "Default formatting is applied to all cells which are not described by a
> cell record. In this case the default format of the row or column may be
> used (if defined). If an undefined cell contains a row and a column default
> format, the row format will overwrite the column format. If there are no row
> and column default formats available, the worksheet/workbook default cell
> format will be used."
> 
> Or in the words of one developer:
> 
> "IIRC: Columns have styles, rows override column styles, cell styles
> override both.  We're setting  a cell style on every cell we create...bad
> us!"
> 
> He also echoed your sentiment ("ugh") of my solution, but agreed it would
> work, although the idea of setting a particular cell style for each new cell
> didn't quite seem right, since it basically continues their error of
> assigning a cell style when none is needed.  And I can't use the formatting
> from a previous row, since none exists at the time I'm adding cells.
> 
> I'm going to try getting the source, applying the patch and seeing if I can
> build this thing since it looks like they didn't do a build last night.
> 
> Peter Dow




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.