我使用Excel COM Interop在电子表格中设置单元格的值:
public void SetValue(double value, string sheetName, int cellRow, int cellColumn)
{
var cell = GetCell(sheetName, cellRow, cellColumn);
cell.Value2 = value;
}
GetCell()
是一个返回Range对象的方法。
根据系统文化设置,此方法无法正常工作:
这些值:
如果Excel的文化是德语,则编写如下:
我的问题:
Value2
" typesafe"?