
正文
Aspose.Cells单元格转换为数字格式
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
需要在两个地方设置
//Adding a numeric value to "A2" cell
string a = "";
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 = ; -- ②这个Number设置 官方有API可以看到 相应的设置 //Applying the style to the A2 cell
worksheet.Cells["A2"].SetStyle(style);







