在NPOI导出DLL年份列未正确显示。如何设置显示数据的单元格格式。 [英] In NPOI export DLL year column is not showing properly.how to set the cell format for displaying the data.

查看:151
本文介绍了在NPOI导出DLL年份列未正确显示。如何设置显示数据的单元格格式。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在NPOI导出中,dll年份列未正确显示。如何设置显示数据的单元格格式。





谢谢提前



我尝试过:



年份列不是显示在MS Excel文件中(对于Eg:2018,2017),如... .. div class =h2_lin>解决方案

当将单元格设置为像2017或2018这样的普通数字时,Excel应显示就这样。对于标准类型,您还可以使用 SetCellType 显式设置格式;对于用户定义的格式,您可以使用 SetCellStyle 显式设置格式(请参阅Cell(POI API文档) [ ^ ])。



为了获得更好的帮助,您应该向我们展示设置单元格内容的代码。


In NPOI export dll year column is not showing properly.How to set the cell format for displaying the data.


Thanks in Advance

What I have tried:

Year column is not showing in MS Excel file (for Eg:2018,2017) like that..

解决方案

When setting a cell to a plain number like 2017 or 2018, Excel should show it as such. You may also set the format explicitly with SetCellType for standard types or SetCellStyle for user defined formats (see Cell (POI API Documentation)[^]).

For better help you should show us your code setting the cell content.


这篇关于在NPOI导出DLL年份列未正确显示。如何设置显示数据的单元格格式。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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