Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Mon May 05, 2008 11:54 am


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.


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

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.

2. Numberformatlocal property can't be support in current release.
User avatar

Posts: 56
Joined: Thu Jun 29, 2006 2:34 pm

Return to Spire.XLS