且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法将Excel值的类型"double"转换为"string"

更新时间:2023-02-04 09:53:16

Text属性可用于从单元格中检索文本内容.因此,您可以尝试按以下方式使用该属性:

The Text property can be used to retrieve the text contents from a Cell. So, you could try to use the property as follows:

private string getCellValue(Worksheet Sheet, int Row, int Column)
    {            
        string cellValue = Sheet.Cells[Row, Column].Text.ToString();
        return cellValue;
    }