| | |
| | | import java.util.UUID; |
| | | import java.util.stream.Collectors; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.apache.commons.lang3.RegExUtils; |
| | | import org.apache.commons.lang3.reflect.FieldUtils; |
| | |
| | | { |
| | | this.clazz = clazz; |
| | | } |
| | | public void byteOutputStreamExcel(ByteOutputStream byteOutputStream, List<T> list, String sheetName, String title) { |
| | | this.init(list, sheetName, title,Type.EXPORT); |
| | | try { |
| | | writeSheet(); |
| | | wb.write(byteOutputStream); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | log.error("导出Excel异常{}", e.getMessage()); |
| | | } finally { |
| | | IOUtils.closeQuietly(wb); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 仅在Excel中显示列属性 |