1
用這種方法我讀了單元格的內容:Excel-C#:如何從單元格中讀取公式?
Range range = (Range)sheet.Cells[i, j];
if ((range == null) || (range.Value2 == null)) return "";
return range.Value2.ToString();
但我怎麼能讀從單元格的公式?
用這種方法我讀了單元格的內容:Excel-C#:如何從單元格中讀取公式?
Range range = (Range)sheet.Cells[i, j];
if ((range == null) || (range.Value2 == null)) return "";
return range.Value2.ToString();
但我怎麼能讀從單元格的公式?
使用.Formula
或.FormulaR1C1
性能上返回的細胞,如:
return range.Formula