NumberFormat examples, please!

Technical support for Spire.XLS

Moderators: iceblue support, Flash, Manager

NumberFormat examples, please!

Postby newtoncd » Mon May 05, 2008 11:54 am

Hello,

I have a DataTable with a "string" column (zipCode) with value "09510300". Using style.NumberFormat = "@" this column is exported with value like "9510300" of type number. How can I store the value "09510300" as a Text type without use style.NumberFormat="00000000" ?

Please send examples of style.NumberFormatLocal too.

Regards
newtoncd
 
Posts: 1
Joined: Mon May 05, 2008 11:24 am

Postby Flash » Mon May 19, 2008 2:23 pm

Thank you for interesting our products.

1. You can set transTypes parameter to true when you call InsertDataTable method, so
it will preserve type when insert data into worksheet.
try to using following source code.
sheet.InsertDataTable((DataTable)this.dataGrid1.DataSource,true,2,1,-1,-1,true);

2. Numberformatlocal property can't be support in current release.
User avatar
Flash
 
Posts: 56
Joined: Thu Jun 29, 2006 2:34 pm


Return to Spire.XLS

Who is online

Users browsing this forum: No registered users and 0 guests