package com.sw.mes.fb.utils;

import javax.servlet.http.HttpServletResponse;

/**
 * @Author yq
 * @Date 2021年12月14日 13:59
 */
public class EasyExcelUtil {

    /**
     * @Author yq
     * @Description 前置设置导出response,避免导出zip问题
     * @Date 2021/12/13 13:39
     * @Param [response]
     * @Return void
     **/
    public static void setResponse(HttpServletResponse response) {
        response.setContentType("application/vnd.ms-excel");
        response.setCharacterEncoding("utf8");
        response.setHeader("Pragma", "public");
        response.setHeader("Cache-Control", "no-store");
        response.addHeader("Cache-Control", "max-age=0");
    }
}
