poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Lott <mai...@invest-faq.com>
Subject Re: XLSX2CSV example using XSSF Date Question
Date Mon, 18 May 2009 22:42:51 GMT
Thanks for the test case.  I did not have any examples of cells with 
s="1"; in my tests, dates in cells were written with s="2".  This is a 
minor fix to the version I posted last week, which is somewhat updated 
compared to the version that appears in your version.  I can send it 
directly to you if that's easier.

I know, I really need to look thru the openoffice XML documents 
carefully for all the variations on s="something".

chris...

Dale Monti wrote:
> Hi,
> I was trying this example. My spreadsheet has a date. I just typed in 
> 5/18/09 and Excel automatically formated it. It is cell B2. But there 
> doesn't seem to be anything to indicate it is a date field. How can I 
> know it is a date field?
> 
> - <row r="2" spans="1:2">
> - <c r="A2">
>  <v>1.43</v>
>  </c>
> - <c r="B2" s="1">
>  <v>39951</v>
>  </c>
>  </row>
> 
> Thanks
> 
> 
> Chris Lott wrote:
>> The XLS2CSVmra example that uses HSSF was extremely helpful, so I 
>> tried to find
>> something similar for XSSF, but without any luck.  So I offer this as 
>> a first draft.  It's rudimentary.  I don't really trust the parsing of 
>> dates and times.  It should use OPCPackage instead of just Package, 
>> but that was not in 3.5-beta5.  Further  this uses basic java XML 
>> calls to get a SAX-based XML reader, not the direct request
>> to get a Xerces parser shown in the XSSF and SAX (Event API) FromHowTo 
>> example.
>>
>> Anyhow I offer this in the hope that someone will improve it to the 
>> point that
>> it's worth contributing to the POI XSSF examples area.  HTH and thanks 
>> for POI.
>>
>> chris...
>>
>> ---
>>
>> package something.or.other;
>>..

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


Mime
View raw message