Here is how I figure out how to implement things:

1. create Test1.xls

(same as Test2.xls except none of the property I'm interested in
implementing)

2. save.

3. modify to exhibit interesting behavior

4. save as Test2.xls

5. java org.apache.poi.hssf.dev.BiffViewer test1.xls >foo1

6. java org.apache.poi.hssf.dev.BiffViewer test2.xls >foo2

7. diff foo1 foo2 > foo3

8. vi foo3

In this manner you can detect new records "UNKNOWN RECORD" see where
known records are added and see where properties are changed.

Makes it pretty easy.  So if you had two versions of Excel:  English and
Country X you could figure out the format differences quite easily.

-Andy

On Fri, 2002-04-05 at 04:55, Lorenzo Resta wrote:
> Hi Lo�c,
> 
> Thanks for your answer. Is there a way in POI to get the format string that
> Excel is using? The trouble is also, that i do not have under my control
> what Version of Excel the customer is using. Since the customer is a large
> international company, they use all different  localized Excel versions you
> can imagine :-(....
> 
> Best regards
> 
> Lorenzo
> 
> -----Original Message-----
> From: Lo�c Lef�vre [mailto:[EMAIL PROTECTED]]
> Sent: Freitag, 5. April 2002 11:55
> To: [EMAIL PROTECTED]
> Subject: RE: Dates in Excel
> 
> 
> Hi,
> Well I can tell you that I've the same problems as you:
> -1- I can't use French formats (eg: 'j' intead of 'd' for day)
> -2- I can't use / create my own format like mmmm\-yyyy for example
> 
> AFAIK, it's related to the localization of POI that is not internationalised
> yet.
> For the first problem, you can use the english formats (though they can not
> give you satisfaction)
> but for the second problem, you'll need to wait (perhaps) for the next
> version of POI :(
> 
> Hope this helps.
> Loic
> 
> -----Message d'origine-----
> De : Lorenzo Resta [mailto:[EMAIL PROTECTED]]
> Envoy� : vendredi 5 avril 2002 11:36
> � : 'Poi-User (E-mail)
> Objet : Dates in Excel
> 
> 
> Hi,
> 
> Just a question on Dates in Excel. Since dates are not properly supported
> yet (in POI 1.20) , i have to check the format number with
> getCellStyle().getDataFormat(). This works fine, as long as people use the
> Date specific formatttings in Excel. But whenever someone uses a custom
> format like 'JJJJMM', where as 'J' stands for 'Year' and 'M' stands for
> 'Month', things get very unreliable, since the format number that Excel uses
> in this case varies from 169 -178. Additionally Excel seems to use the same
> format numbers also for non-date related custom formats, so things get very
> nasty at this point, since i can' t properly figure out what is a date and
> what not. Has someone an idea, how to handle such custom formatted dates
> correctly in POI?
> 
> Thanks a lot
> 
> Lorenzo
> 
-- 
http://www.superlinksoftware.com
http://jakarta.apache.org/poi - port of Excel/Word/OLE 2 Compound
Document 
                            format to java
http://developer.java.sun.com/developer/bugParade/bugs/4487555.html 
                        - fix java generics!
The avalanche has already started. It is too late for the pebbles to
vote.
-Ambassador Kosh

Reply via email to