Aspose.Cells单元格转换为数字格式
2016-08-25 16:10
495 查看
原文转自:http://www.cnblogs.com/shenyixin/p/3607769.html
//Adding a numeric value to "A2" cell
string a = "100";
worksheet.Cells["A2"].PutValue(a, true); --①主要是这个,增加一个参数,一般不会用到
//Getting the Style of the A2 Cell
style = worksheet.Cells["A2"].GetStyle();
//Setting the display format to number 9 to show value as percentage
style.Number = 1; -- ②这个Number设置 官方有API可以看到 相应的设置
//Applying the style to the A2 cell
worksheet.Cells["A2"].SetStyle(style);
//Adding a numeric value to "A2" cell
string a = "100";
worksheet.Cells["A2"].PutValue(a, true); --①主要是这个,增加一个参数,一般不会用到
//Getting the Style of the A2 Cell
style = worksheet.Cells["A2"].GetStyle();
//Setting the display format to number 9 to show value as percentage
style.Number = 1; -- ②这个Number设置 官方有API可以看到 相应的设置
//Applying the style to the A2 cell
worksheet.Cells["A2"].SetStyle(style);
相关文章推荐
- ireport5.6+jasperreport6.3开发(五)--以javabean为基准的报表开发(action关联)
- ASP.NET MVC——Razor视图引擎
- 学习ASP.NET Core,你必须了解无处不在的“依赖注入”
- asp.net EF 处理模型更改
- ASPxGridView中DetailRow的使用
- ASP.NET Core 中文文档 第三章 原理(17)为你的服务器选择合适版本的.NET框架
- ASP.NET Core 1.0基础之依赖注入
- ireport5.6+jasperreport6.3开发(四)--以javabean为基准的报表开发(ireport)
- ASP.NET Core 运行原理剖析2:Startup 和 Middleware(中间件)
- ireport5.6+jasperreport6.3开发(三)--以javabean为基准的报表开发(javabean)
- ireport5.6+jasperreport6.3开发(二)--web开发的配置
- asp.net解析请求报文
- ireport5.6+jasperreport6.3开发(一)--中文环境配置在
- ASPNET CORE初探
- ASP.NET Core 开发 - Entity Framework (EF) Core
- asp.net sqlite unable to open database file的解决方案
- Jsonp asp.net的应用
- asp.net core 使用EF7 Code First 创建数据库,同时使用命令创建数据库
- asp.net Core 中间件Hello world
- asp.net mvc 上传文件