I use EPPlus to export excel 2007 file. The file can export normally but i have some problem with setting column format. My string column with numeric style (Purchase Order
Yes, EPPlus cannot treat the data as number depending on its value. If your underlying data is in string datatype then you can try to get it in numeric datatype. e.g. If you get data from a stored procedure try to get it as a numeric value. There was a problem we had when we implemented it. We used the same stored procedure for Web and to generate excel. Web UI needed it to be in string datatype for formatting reasons and EPPlus obviously needs it to be in the numeric format so that it can show it as a number. The solution was to convert the required data to numeric when exporting to excel using EPPlus in C# code. So you need to write a conversion function to convert required fields in the DataTable into datatype you require (or implement conversion logic using cast or convert in your Stored Procedure).
In summary: - Write a C# function to convert datatypes of columns in the DataTable you obtain before sending it as excel sheet using EPPlus.