无法将NPOI.ss.usermodel.isheet转换为Documentformat.openxml.spreadsheet.sheet

im使用NPOI for C#编写程序,但是在尝试从工作簿中获取特定工作表并将其分配给工作表类型变量时出现以下错误。它说存在一个明确的转换,但没有说明该转换是什么,我还没有找到关于如何转换的任何在线信息。

无法将NPOI.ss.usermodel.isheet转换为Documentformat.openxml.spreadsheet.sheet

FileStream excelFile;
FileStream excelFile = System.IO.File.OpenRead(FileName.getFile());

///
///theres other code in between but i dont think its relevant to the question
///

sheetName = workbook.GetSheetName(jj);

                //  assign xlsx sheet variable the corresponding name to the sheet in the
                //  document being read
                sheet = (XSSFSheet)writebook.CreateSheet(sheetName);

                //  assign xlsx sheet variable the corresponding name to the sheet in the
                //  document being read--consolidated file
                consolidatedSheet = (XSSFSheet)this.consolidatedBook.CreateSheet(sheetName);

                //  gets workbook sheet at position jj (int var)
                Sheet datatypeSheet = workbook.GetSheetat(this.jj);
saraxiaoxi 回答:无法将NPOI.ss.usermodel.isheet转换为Documentformat.openxml.spreadsheet.sheet

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2891413.html

大家都在问