写excel
FileStream file = new FileStream(@"test.xls",FileMode.Create); hssfworkbook.write(file); file.close();
读excel
FileStream file = new FileStream(@"test.xls",FileMode.Open,FileAccess.Read); HSSFWorkbook hssfworkbook = new HSSFWorkbook(file); HSSFSheet sheet1 = hssfworkbook.GetSheet("Sheet1"); file.Close();