您的位置:首页 > 编程语言 > ASP

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);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: