NOPI读取Excel
string filePath = "C:/Users/29939/Desktop/当前项目文件/图像资源/test/Result/result_202107271603421888/final_result.major";
string sheet = "Confidence";
HSSFWorkbook wb = new HSSFWorkbook(new FileStream(filePath, FileMode.Open, FileAccess.Read));
HSSFSheet sht = (HSSFSheet)wb.GetSheet(sheet); //如果是2003 则用HSS开头的对象。
FileStream file = new FileStream(filePath, FileMode.Open, FileAccess.Read);
//XSSFWorkbook xworkbook = new XSSFWorkbook(file);
//XSSFSheet xsheet = (XSSFSheet)xworkbook.GetSheet(sheet);
int rowsCount = sht.PhysicalNumberOfRows; //取行Excel的最大行数
int colsCount = sht.GetRow(0).PhysicalNumberOfCells;//取得Excel的列数