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