无法将数据导出为预期格式的Excel [英] Unable export the data to excel in the expected format

查看:115
本文介绍了无法将数据导出为预期格式的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


这篇关于无法将数据导出为预期格式的Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆