IWorkbook wk = null;
if (filePath.ToLower() == ".xls")
{
wk = new HSSFWorkbook(fs);
}
else
{
wk = new XSSFWorkbook(fs);
}
ps:对象HSSFWorkbook支持excel2003
对象HSSFWorkbook支持excel2007
2023-12-13 16:58:27
IWorkbook wk = null;
if (filePath.ToLower() == ".xls")
{
wk = new HSSFWorkbook(fs);
}
else
{
wk = new XSSFWorkbook(fs);
}
ps:对象HSSFWorkbook支持excel2003
对象HSSFWorkbook支持excel2007