首页 > Web开发 > 详细

Aspose.Cells单元格转换为数字格式

时间:2014-03-19 12:05:40      阅读:1014      评论:0      收藏:0      [点我收藏+]

bubuko.com,布布扣

需要在两个地方设置

bubuko.com,布布扣
           //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);
  
bubuko.com,布布扣

Aspose.Cells单元格转换为数字格式,布布扣,bubuko.com

Aspose.Cells单元格转换为数字格式

原文:http://www.cnblogs.com/shenyixin/p/3607769.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!