Class ExcelExportUtils

java.lang.Object
icu.easyj.web.poi.excel.ExcelExportUtils

public abstract class ExcelExportUtils extends Object
Excel导出工具类
Author:
wangliang181230
  • Constructor Details

    • ExcelExportUtils

      public ExcelExportUtils()
  • Method Details

    • exportExcel

      public static void exportExcel(jakarta.servlet.http.HttpServletResponse response, org.apache.poi.ss.usermodel.Workbook book, String fileName) throws IOException
      导出Excel文件
      Parameters:
      response - 响应对象
      book - the workbook
      fileName - the file name
      Throws:
      IOException - the IO exception
    • setExcelExportResponse

      public static void setExcelExportResponse(jakarta.servlet.http.HttpServletResponse response, String fileName) throws IOException
      设置导出Excel文件所需的响应信息
      Parameters:
      fileName - 文件名
      response - 响应对象
      Throws:
      IOException - IO异常
    • saveToFile

      public static void saveToFile(org.apache.poi.ss.usermodel.Workbook book, String targetFilePath) throws IOException
      将excel保存到文件中
      Parameters:
      book - excel对象
      targetFilePath - 目标文件路径
      Throws:
      IOException - IO异常