Ok, good idea! So I did the following:

- I created a new file, entered just the number "55" in cell A1. 
- Then saved the file to "without.xlsx".
- Set the data type for column 1 to string.
- Saved the result to "with.xlsx".

.. and the main differences seem to be the following:

1. styles.xml gets a new entry:

   <cellXfs count="2">
     <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />
     <xf numFmtId="49" fontId="0" fillId="0" borderId="0" xfId="0"
        applyNumberFormat="1" />
   </cellXfs>

2. sheet1.xml gets a new entry:

   <cols>
     <col min="1" max="1" width="11.42578125" style="1" />
   </cols>

3. sheet1.xml gets a new attribute "s" on the "c" element:

   <c r="A1" s="1">
     <v>55</v>
   </c>

I'm not exactly sure, what all of this does (I can only guess a little bit) ...



-------- Original-Nachricht --------
> Datum: Tue, 5 Jul 2011 15:08:43 +0100 (BST)
> Von: Nick Burch <[email protected]>
> An: POI Users List <[email protected]>
> Betreff: Re: Setting the cell type to "text" for an entire column (.xls)
 
> Can you try setting the type on a column in excel, and seeing what gets 
> written to the file for that? (Unzip the .xlsx file and compare the xml 
> between a file with and without the setting).
> 
> If it isn't done with a style, then I don't personally know how it'd be 
> done, but luckily we can use excel as an oracle for the file format :)
> 
> Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

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

Reply via email to