无法将数据导出为预期格式的Excel

问题描述:

我想将数据从asp.net页面导出到excel,我已经使用特定格式导出数据,例如00110,但是当我将特定格式导出为ex​​cel时。默认情况下它将被转换为数字,例如110,但我想要原始格式的数据。



任何关于此的建议都会非常感谢!!



提前感谢

I wanted to export data from asp.net page to excel, where i have export the data with particular format eg 00110, But when i export the specific format to excel. By default it will be converted to number eg 110, but I wanted to have the data in original format.

Any suggestions around this will really appreciated!!

Thank in advance

查看示例

将Excel列(或单元格)格式化为C#中的文本 [ ^ ]



使用c#中的Microsoft.Office.Interop.Excel设置excel列中的数字,文本和日期等数据类型[ ^ ]



干杯,

Edo
See examples
Format an Excel column (or cell) as Text in C#[^]
and
Set data type like number, text and date in excel column using Microsoft.Office.Interop.Excel in c#[^]

Cheers,
Edo


use = 0100获得预期输出
use ="0100" to get the expected output