我目前正在更新Excel模板中的值,并且我不断获取我的货币字段以在顶角有绿色三角形和“存储为文本的数字”消息。如何让Excel识别单元格是一个数字,我希望它以这种方式对待它,因为我已经将单元格格式化为货币? (就像我在Excel中的单元格中所发生的那样,点击F2,然后点击回车)
以下是我目前正在做的简化版本:
UInt32Value moneyFormat = report.createCellFormat(report.Stylesheet, fontIndex, backgroundIndex, borderIndex, 168);
report.UpdateValue("Workbook", "I29", "1234.56", moneyFormat, true, String.Empty);
这是我的细胞看起来像的图像
答案 0 :(得分:2)