81°

EasyExcel 自定义单元格式的问题。

最近在做一个关于性能测试管理系统,一个新的需求,需要导出测试报告,直接使用了ali的封装的EasyExcel,但是在复杂头与一些样式,就缺少了自定义的灵活性,在官方demo中没有找到很好的解决方法。

不普及基础了,可以直接看官方文档, 直接上解决代码:

 

调用:

        List<ApiStatusVO> apiStatusVOList = new ArrayList<>();
        for(int i=0;i<=15;i++){
            ApiStatusVO apiStatusVO = new ApiStatusVO();
            apiStatusVO.setApiName("Apiname"+i);
            apiStatusVO.setApiRt("RT"+i);
            apiStatusVO.setApiStatus("200");
            apiStatusVO.setId(i);
            apiStatusVO.setTransId(String.valueOf(100+i));
            apiStatusVO.setResponseAssert("true");
            apiStatusVOList.add(apiStatusVO);
        }
    String fileName = URLEncoder.encode(new SimpleDateFormat("yyyy-MM-dd-24h").format(new Date())+".xlsx", "UTF-8");
ExcelKit().parseExcelAndSave(apiStatusVOList,fileName );

 

ExcelKit代码:
package com.kit;

import ……public class ExcelKit { public static void parseExcelAndSave(List<ApiStatusVO> apiStatusVOS,String fileName){

    EasyExcel.write(fileName, TestReportVO.</span><span style="color: #0000ff;">class</span><span style="color: #000000;">)
            .head(head(</span>"我是一个标题头","描述:本次压测针对UXX常用接口进行压力测试;"<span style="color: #000000;">))
            .registerWriteHandler(</span><span style="color: #0000ff;">new</span><span style="color: #000000;"> CustomCellWriteHandler())
            .sheet(</span>"TestReport"<span style="color: #000000;">)
            .doWrite(data(apiStatusVOS));

}
</span><span style="color: #008000;">/**</span><span style="color: #008000;">     * Api 返回内容  数据不全,先自定义赋值
 * </span><span style="color: #808080;">@param</span><span style="color: #008000;"> statusVOS
 * </span><span style="color: #808080;">@return </span>
 <span style="color: #008000;">*/</span>
<span style="color: #0000ff;">private</span> <span style="color: #0000ff;">static</span> List&lt;TestReportVO&gt; data(List&lt;ApiStatusVO&gt;<span style="color: #000000;"> statusVOS){
    List</span>&lt;TestReportVO&gt; dataList = <span style="color: #0000ff;">new</span> ArrayList&lt;&gt;<span style="color: #000000;">();
    statusVOS.forEach(ApiStatusVO</span>-&gt;<span style="color: #000000;">{
        TestReportVO status </span>= <span style="color: #0000ff;">new</span><span style="color: #000000;"> TestReportVO();

// @ExcelProperty("压测接口名称") status.setTestName(ApiStatusVO.getApiName()); // @ExcelProperty("压测时间") status.setTestDate(new Date()); // @ExcelProperty("压测时常(s)") status.setTestDuration("100"); // @ExcelProperty("平均吞吐量(s)") status.setTestHandlingCapacity("101"); // @ExcelProperty("平均响应时间(s)") status.setTestResponseTime(ApiStatusVO.getApiRt()); // @ExcelProperty("最大响应时间(s)") status.setTestMaxResponseTime("102"); // @ExcelProperty("错误率(%)") status.setTestErrorRate("13.18"); // @ExcelProperty("数据库CPU(User)(%)") status.setTestCpuPercentum("15.18"); // @ExcelProperty("数据库TCP连接数") status.setTestTcpLinkNum("105"); // @ExcelProperty("连接池大小") status.setTestLinkPooSize("106"); // @ExcelProperty("网络流量(上传/Mbps)(Min)") status.setTestMinFlow("107"); // @ExcelProperty("网络流量(上传/Mbps)(Max)") status.setTestMaxFlow("108"); dataList.add(status); }); return dataList; }

</span><span style="color: #008000;">/**</span><span style="color: #008000;">
 * 自定义头
 * </span><span style="color: #808080;">@param</span><span style="color: #008000;"> headTitle   统一头
 * </span><span style="color: #808080;">@param</span><span style="color: #008000;"> headDescTitle  描述头
 * </span><span style="color: #808080;">@return</span><span style="color: #008000;">   返回整个头list。 头部相同连续的单元格会自动合并。
 </span><span style="color: #008000;">*/</span>
<span style="color: #0000ff;">private</span> <span style="color: #0000ff;">static</span> List&lt;List&lt;String&gt;&gt;<span style="color: #000000;"> head(String headTitle, String headDescTitle){
    List</span>&lt;List&lt;String&gt;&gt; list = <span style="color: #0000ff;">new</span> ArrayList&lt;List&lt;String&gt;&gt;<span style="color: #000000;">();
    </span><span style="color: #008000;">//</span><span style="color: #008000;">  压测名称    压测时间     压测时常(s)平均吞吐量(s)    平均响应时间(s)    最大响应时间(s) 错误率(%) 数据库CPU(User)(%)    数据库TCP连接数    连接池大小    网络流量(上传/Mbps) 网络流量(下载/Mbps)</span>
    List&lt;String&gt; head1 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head1.add(headTitle);
    head1.add(headDescTitle);
        head1.add(headDescTitle);
        head1.add(headDescTitle);
        head1.add(headDescTitle);
        head1.add(headDescTitle);
        head1.add(headDescTitle);
    head1.add(</span>"压测名称"<span style="color: #000000;">);
    List</span>&lt;String&gt; head2 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head2.add(headTitle);
    head2.add(headDescTitle);
        head2.add(headDescTitle);
        head2.add(headDescTitle);
        head2.add(headDescTitle);
        head2.add(headDescTitle);
        head2.add(headDescTitle);
    head2.add(</span>"压测时间"<span style="color: #000000;">);
    List</span>&lt;String&gt; head3 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head3.add(headTitle);
    head3.add(headDescTitle);
        head3.add(headDescTitle);
        head3.add(headDescTitle);
        head3.add(headDescTitle);
        head3.add(headDescTitle);
        head3.add(headDescTitle);
    head3.add(</span>"压测时常(s)"<span style="color: #000000;">);
    List</span>&lt;String&gt; head4 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head4.add(headTitle);
    head4.add(headDescTitle);
        head4.add(headDescTitle);
        head4.add(headDescTitle);
        head4.add(headDescTitle);
        head4.add(headDescTitle);
        head4.add(headDescTitle);
    head4.add(</span>"平均吞吐量(s)"<span style="color: #000000;">);
    List</span>&lt;String&gt; head5 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head5.add(headTitle);
    head5.add(headDescTitle);
        head5.add(headDescTitle);
        head5.add(headDescTitle);
        head5.add(headDescTitle);
        head5.add(headDescTitle);
        head5.add(headDescTitle);
    head5.add(</span>"平均响应时间(s)"<span style="color: #000000;">);
    List</span>&lt;String&gt; head6 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head6.add(headTitle);
    head6.add(headDescTitle);
        head6.add(headDescTitle);
        head6.add(headDescTitle);
        head6.add(headDescTitle);
        head6.add(headDescTitle);
        head6.add(headDescTitle);
    head6.add(</span>"最大响应时间(s)"<span style="color: #000000;">);
    List</span>&lt;String&gt; head7 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head7.add(headTitle);
    head7.add(headDescTitle);
        head7.add(headDescTitle);
        head7.add(headDescTitle);
        head7.add(headDescTitle);
        head7.add(headDescTitle);
        head7.add(headDescTitle);
    head7.add(</span>"错误率(%)"<span style="color: #000000;">);
    List</span>&lt;String&gt; head8 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head8.add(headTitle);
    head8.add(headDescTitle);
        head8.add(headDescTitle);
        head8.add(headDescTitle);
        head8.add(headDescTitle);
        head8.add(headDescTitle);
        head8.add(headDescTitle);
    head8.add(</span>"数据库CPU(User)(%)"<span style="color: #000000;">);
    List</span>&lt;String&gt; head9 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head9.add(headTitle);
    head9.add(headDescTitle);
        head9.add(headDescTitle);
        head9.add(headDescTitle);
        head9.add(headDescTitle);
        head9.add(headDescTitle);
        head9.add(headDescTitle);
    head9.add(</span>"数据库TCP连接数"<span style="color: #000000;">);
    List</span>&lt;String&gt; head10 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head10.add(headTitle);
    head10.add(</span>"负责人:"<span style="color: #000000;">);
        head10.add(</span>"齐冰洋"<span style="color: #000000;">);
        head10.add(</span>""<span style="color: #000000;">);
        head10.add(</span>""<span style="color: #000000;">);
        head10.add(</span>""<span style="color: #000000;">);
        head10.add(</span>""<span style="color: #000000;">);
    head10.add(</span>"连接池大小"<span style="color: #000000;">);
    List</span>&lt;String&gt; head11 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head11.add(headTitle);
    head11.add(</span>"协助人:"<span style="color: #000000;">);
        head11.add(</span>"石星"<span style="color: #000000;">);
        head11.add(</span>"张刚强"<span style="color: #000000;">);
        head11.add(</span>"秦亚飞"<span style="color: #000000;">);
        head11.add(</span>"王京朝"<span style="color: #000000;">);
        head11.add(</span>"张凯"<span style="color: #000000;">);
    head11.add(</span>"网络流量(上传/Mbps)"<span style="color: #000000;">);
    List</span>&lt;String&gt; head12 = <span style="color: #0000ff;">new</span> ArrayList&lt;String&gt;<span style="color: #000000;">();
    head12.add(headTitle);
    head12.add(</span>""<span style="color: #000000;">);
        head12.add(</span>"黄色:瓶颈"<span style="color: #000000;">);
        head12.add(</span>"橙色:提醒"<span style="color: #000000;">);
        head12.add(</span>"红色:严重"<span style="color: #000000;">);
        head12.add(</span>"测试时间"<span style="color: #000000;">);
        head12.add(</span>"2020-01-01");   <span style="color: #008000;">//</span><span style="color: #008000;">测试时间</span>
    head12.add("网络流量(下载/Mbps)"<span style="color: #000000;">);
    list.add(head1);
    list.add(head2);
    list.add(head3);
    list.add(head4);
    list.add(head5);
    list.add(head6);
    list.add(head7);
    list.add(head8);
    list.add(head9);
    list.add(head10);
    list.add(head11);
    list.add(head12);
    </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> list;
}

}

 

拦截,写入样式、控制列宽:

package com.kit;

import ……public class CustomCellWriteHandler extends AbstractCellStyleStrategy implements CellWriteHandler { private static final Integer width = 18;

Workbook workbooks;
@Override
</span><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">void</span><span style="color: #000000;"> beforeCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Head head, Integer integer, Integer integer1, Boolean aBoolean) {
}
@Override
</span><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">void</span> afterCellDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, List&lt;CellData&gt;<span style="color: #000000;"> list, Cell cell, Head head, Integer integer, Boolean aBoolean) {
}
@Override
</span><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">void</span><span style="color: #000000;"> afterCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Cell cell, Head head, Integer integer, Boolean isHead) {
    </span><span style="color: #0000ff;">this</span><span style="color: #000000;">.initCellStyle(writeSheetHolder.getSheet().getWorkbook());
    writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), width </span>* 256<span style="color: #000000;">);
    </span><span style="color: #0000ff;">this</span><span style="color: #000000;">.setHeadCellStyle(cell,head,integer);
}
@Override
</span><span style="color: #0000ff;">protected</span> <span style="color: #0000ff;">void</span><span style="color: #000000;"> initCellStyle(Workbook workbook) {
    </span><span style="color: #0000ff;">this</span>.workbooks  =<span style="color: #000000;"> workbook;
}
@Override
</span><span style="color: #0000ff;">protected</span> <span style="color: #0000ff;">void</span><span style="color: #000000;"> setHeadCellStyle(Cell cell, Head head, Integer integer) {
    </span><span style="color: #008000;">//</span><span style="color: #008000;">头部Top样式</span>
    <span style="color: #0000ff;">if</span>(cell.getRowIndex()==0<span style="color: #000000;">){
        cell.setCellStyle(PoiUtils.getColumnTopStyle(workbooks,</span>16<span style="color: #000000;">));
    }</span><span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span>((cell.getRowIndex()==1 &amp;&amp; cell.getColumnIndex()&gt;8<span style="color: #000000;">)){
        </span><span style="color: #008000;">//</span><span style="color: #008000;">负责人 、协助人</span>

cell.setCellStyle(PoiUtils.getColumnTopStyle(workbooks,IndexedColors.GREEN)); }else if(cell.getColumnIndex() == 11 && (cell.getRowIndex() == 2 || cell.getRowIndex() == 3 || cell.getRowIndex() == 4 || cell.getRowIndex() == 5)){ //警告 switch (cell.getRowIndex()){ case 2: cell.setCellStyle(PoiUtils.getColumnTopStyle(workbooks,IndexedColors.YELLOW)); break; case 3: cell.setCellStyle(PoiUtils.getColumnTopStyle(workbooks,IndexedColors.ORANGE)); break; case 4: cell.setCellStyle(PoiUtils.getColumnTopStyle(workbooks,IndexedColors.RED)); break; case 5: cell.setCellStyle(PoiUtils.getColumnTopStyle(workbooks,IndexedColors.GREEN)); break; } }else if(cell.getRowIndex() == 7 && cell.getColumnIndex() == 0 ){ //标题底色 cell.setCellStyle(PoiUtils.getColumnTopStyle(workbooks,IndexedColors.GREEN));

    }</span><span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span>(cell.getRowIndex() == 7 &amp;&amp; cell.getColumnIndex() != 0<span style="color: #000000;"> ){
        </span><span style="color: #008000;">//</span><span style="color: #008000;">标题底色</span>

cell.setCellStyle(PoiUtils.getColumnTopStyle(workbooks,IndexedColors.ORANGE)); }else { cell.setCellStyle(PoiUtils.getColumnStyle(workbooks)); } if(cell.getRowIndex() > 7){ cell.setCellStyle(PoiUtils.getColumnStyle(workbooks)); } } @Override protected void setContentCellStyle(Cell cell, Head head, Integer integer) { }

}

 

 



样式设置: 此处代码参考来源:https://blog.csdn.net/qq_15081901/article/details/90202723 (POI封装工具easyexcel导出EXCEL表样式设置)

 

package com.kit;

import……public class PoiUtils {

</span><span style="color: #008000;">/**</span><span style="color: #008000;">
 * 首头单元格
 * </span><span style="color: #808080;">@param</span><span style="color: #008000;"> workbook
 * </span><span style="color: #808080;">@return</span>
 <span style="color: #008000;">*/</span>

<span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> CellStyle getColumnTopStyle(Workbook workbook,<span style="color: #0000ff;">int</span><span style="color: #000000;"> FontSize) {
    </span><span style="color: #0000ff;">if</span>(FontSize == 0<span style="color: #000000;">){
        FontSize</span>=12<span style="color: #000000;">;
    }

    </span><span style="color: #008000;">//</span><span style="color: #008000;"> 设置字体</span>
    Font font =<span style="color: #000000;"> workbook.createFont();
    </span><span style="color: #008000;">//</span><span style="color: #008000;">设置字体大小</span>
    font.setFontHeightInPoints((<span style="color: #0000ff;">short</span><span style="color: #000000;">) FontSize);
    </span><span style="color: #008000;">//</span><span style="color: #008000;">字体加粗</span>
    font.setBold(<span style="color: #0000ff;">true</span><span style="color: #000000;">);
    </span><span style="color: #008000;">//</span><span style="color: #008000;">设置字体名字</span>
    font.setFontName("宋体"<span style="color: #000000;">);
    </span><span style="color: #008000;">//</span><span style="color: #008000;">设置样式;</span>
    CellStyle style =<span style="color: #000000;"> workbook.createCellStyle();
    </span><span style="color: #008000;">//</span><span style="color: #008000;">设置底边框;</span>

style.setBorderBottom(BorderStyle.THIN); //设置底边框颜色; style.setBottomBorderColor((short) 0); //设置左边框; style.setBorderLeft(BorderStyle.THIN); //设置左边框颜色; style.setLeftBorderColor((short) 0); //设置右边框; style.setBorderRight(BorderStyle.THIN); //设置右边框颜色; style.setRightBorderColor((short) 0); //设置顶边框; style.setBorderTop(BorderStyle.THIN); //设置顶边框颜色; style.setTopBorderColor((short) 0); //在样式用应用设置的字体; style.setFont(font); //设置自动换行; style.setWrapText(false); //设置水平对齐的样式为居中对齐; style.setAlignment(HorizontalAlignment.CENTER); //设置垂直对齐的样式为居中对齐; style.setVerticalAlignment(VerticalAlignment.CENTER); return style; }

</span><span style="color: #008000;">/**</span><span style="color: #008000;">
 * 头部自己定义单元格
 * </span><span style="color: #808080;">@param</span><span style="color: #008000;"> workbook
 * </span><span style="color: #808080;">@return</span>
 <span style="color: #008000;">*/</span>
<span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span><span style="color: #000000;"> CellStyle getColumnTopStyle(Workbook workbook, IndexedColors indexedColors) {
    </span><span style="color: #008000;">//</span><span style="color: #008000;"> 设置字体</span>
    Font font =<span style="color: #000000;"> workbook.createFont();
    </span><span style="color: #008000;">//</span><span style="color: #008000;">设置字体大小</span>
    font.setFontHeightInPoints((<span style="color: #0000ff;">short</span>) 12<span style="color: #000000;">);
    </span><span style="color: #008000;">//</span><span style="color: #008000;">字体加粗</span>
    font.setBold(<span style="color: #0000ff;">true</span><span style="color: #000000;">);
    </span><span style="color: #008000;">//</span><span style="color: #008000;">设置字体名字</span>
    font.setFontName("宋体"<span style="color: #000000;">);
    </span><span style="color: #008000;">//</span><span style="color: #008000;">设置样式;</span>
    CellStyle style =<span style="color: #000000;"> workbook.createCellStyle();
    </span><span style="color: #008000;">//</span><span style="color: #008000;">设置底边框;</span>

style.setBorderBottom(BorderStyle.THIN); //设置底边框颜色; style.setBottomBorderColor((short) 0); //设置左边框; style.setBorderLeft(BorderStyle.THIN); //设置左边框颜色; style.setLeftBorderColor((short) 0); //设置右边框; style.setBorderRight(BorderStyle.THIN); //设置右边框颜色; style.setRightBorderColor((short) 0); //设置顶边框; style.setBorderTop(BorderStyle.THIN); //设置顶边框颜色; style.setTopBorderColor((short) 0); //在样式用应用设置的字体; style.setFont(font); //设置自动换行; style.setWrapText(false); //设置水平对齐的样式为居中对齐; style.setAlignment(HorizontalAlignment.CENTER); //设置垂直对齐的样式为居中对齐; style.setVerticalAlignment(VerticalAlignment.CENTER); /** * 背景色 */

    <span style="color: #0000ff;">if</span>(indexedColors != <span style="color: #0000ff;">null</span><span style="color: #000000;">){
        style.setFillForegroundColor(indexedColors.getIndex());</span><span style="color: #008000;">//</span><span style="color: #008000;"> 设置背景色</span>

style.setFillPattern(FillPatternType.SOLID_FOREGROUND); }

    </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> style;
}

</span><span style="color: #008000;">/*</span><span style="color: #008000;">
 * 字段样式
 </span><span style="color: #008000;">*/</span>
<span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span><span style="color: #000000;"> CellStyle getColumnStyle(Workbook workbook) {
    </span><span style="color: #008000;">//</span><span style="color: #008000;"> 设置字体</span>
    Font font =<span style="color: #000000;"> workbook.createFont();
    </span><span style="color: #008000;">//</span><span style="color: #008000;">设置字体大小</span>
    font.setFontHeightInPoints((<span style="color: #0000ff;">short</span>) 10<span style="color: #000000;">);
    </span><span style="color: #008000;">//</span><span style="color: #008000;">字体加粗

// font.setBold(true); //设置字体名字 font.setFontName("宋体"); //设置样式; CellStyle style = workbook.createCellStyle(); //设置底边框; style.setBorderBottom(BorderStyle.THIN); //设置底边框颜色; style.setBottomBorderColor((short) 0); //设置左边框; style.setBorderLeft(BorderStyle.THIN); //设置左边框颜色; style.setLeftBorderColor((short) 0); //设置右边框; style.setBorderRight(BorderStyle.THIN); //设置右边框颜色; style.setRightBorderColor((short) 0); //设置顶边框; style.setBorderTop(BorderStyle.THIN); //设置顶边框颜色; style.setTopBorderColor((short) 0); //在样式用应用设置的字体; style.setFont(font); //设置自动换行; style.setWrapText(true); //设置水平对齐的样式为居中对齐; style.setAlignment(HorizontalAlignment.CENTER); //设置垂直对齐的样式为居中对齐; style.setVerticalAlignment(VerticalAlignment.CENTER); return style;

}

}

TestReportVO 
import ……

@Data public class TestReportVO {

@ExcelProperty(</span>"压测名称"<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> String testName;
@ExcelProperty(</span>"压测时间"<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> Date testDate;
@ExcelProperty(</span>"压测时常(s)"<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> String testDuration;
@ExcelProperty(</span>"平均吞吐量(s)"<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> String testHandlingCapacity;
@ExcelProperty(</span>"平均响应时间(s)"<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> String testResponseTime ;
@ExcelProperty(</span>"最大响应时间(s)"<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> String testMaxResponseTime;
@ExcelProperty(</span>错误率(%)<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> String testErrorRate ;
@ExcelProperty(</span>"数据库CPU(User)(%)<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> String testCpuPercentum ;
@ExcelProperty(</span>"数据库TCP连接数"<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> String testTcpLinkNum;
@ExcelProperty(</span>"连接池大小"<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> String testLinkPooSize;
@ExcelProperty(</span>"网络流量(上传/Mbps)"<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> String testMinFlow ;
@ExcelProperty(</span>"网络流量(上传/Mbps)"<span style="color: #000000;">)
</span><span style="color: #0000ff;">private</span><span style="color: #000000;"> String testMaxFlow;

}

导出效果:

 

 

 

有问题可以联系 邮箱 253049953@qq.com

TestReportVO

本文转载自博客园,原文链接:https://www.cnblogs.com/data1/p/12218728.html

全部评论: 0

    我有话说: