framework 2.0 版本的用法 using (FileStream sr = new FileStream("test.xls", FileMode.OpenOrCreate)) { //根据路径通过已存在的excel来创建HSSFWorkbook,即整个excel文档 HSSFWorkbook workbook = new HSSFWorkbook(sr); int x = workbook.Workbook.NumSheets; ListsheetNames = new List(); for (int i = 0; i x; i++) { sheetNames.Add(workbook.Workbook.GetSheetName(i)); } }