<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE excels PUBLIC "-//PAOHAIJIAO//DTD API EXCEL 1.0//EN"
        "classpath:paohaijiao/dtd/Jquick-excel.dtd">
<excels namespace="com.github.paohaijiao.biz.formulas.Formulas0001SalesDailyReportService">

    <!-- 导出：销售日报 -->
    <excel name="exportSalesDailyReport" returnClass="void">
        <![CDATA[
            EXPORT WITH SHEET="销售日报", HEADER=true,
                MAPPING={"a":"日期","b":"商品","c":"数量","d":"单价","e":"金额"},
                FORMAT={"a":"yyyy-MM-dd","c":"0","d":"#,##0.00","e":"#,##0.00"},
                FORMULAS={E2:'C2*D2',E3:'C3*D3',E4:'C4*D4',C5:'SUM(C2:C4)',E5:'SUM(E2:E4)'},
                STYLE={ROW 5:{bold:true,fillPattern:solid_foreground,fillForegroundColor:lightYellow,alignment:right,verticalAlignment:center}}
        ]]>
    </excel>

    <!-- 导入解析：读取导出的 Excel，按表头映射回字段 -->
    <excel name="importSalesDailyReport" returnClass="java.util.List">
        <![CDATA[
            IMPORT WITH SHEET="销售日报", HEADER=true,
                MAPPING={"日期":"date","商品":"product","数量":"qty","单价":"price","金额":"amount"}
        ]]>
    </excel>

</excels>
