web设计
string strname = HttpUtility.UrlEncode("导出execl.xls");
Context.Response.AddHeader("Content-Disposition","attachment;filename="+strname);
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet =workbook.CreateSheet();
HSSFRow row = sheet.CreateRow(0);
HSSFCell cell = row.CreateCell(0);
cell.SetCellValue("hello!");
row.CreateCell(1).SetCellValue(3.14);
workbook.Write(Context.Response.OutputStream);
这段代码为啥不对?那出错了?