<?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.Formulas0006CustomerTierReportService">

    <!-- 导出：客户分层报表 -->
    <excel name="exportCustomerTier" returnClass="void">
        <![CDATA[
            EXPORT WITH SHEET="客户分层报表", HEADER=true,
                MAPPING={"a":"客户编码","b":"客户名称","c":"客户等级","d":"年度成交额","e":"贡献占比"},
                FORMAT={"d":"#,##0.00","e":"0.00%"},
                FORMULAS={
                    E2:'D2/SUM(D2:D6)',E3:'D3/SUM(D2:D6)',E4:'D4/SUM(D2:D6)',
                    E5:'D5/SUM(D2:D6)',E6:'D6/SUM(D2:D6)',
                    D7:'SUM(D2:D6)',E7:'SUM(E2:E6)'
                },
                STYLE={ROW 7:{bold:true,fillPattern:solid_foreground,fillForegroundColor:lightYellow,alignment:right,verticalAlignment:center}}
        ]]>
    </excel>

    <!-- 导入解析：读取导出的客户分层报表 -->
    <excel name="importCustomerTier" returnClass="java.util.List">
        <![CDATA[
            IMPORT WITH SHEET="客户分层报表", HEADER=true,
                MAPPING={"客户编码":"code","客户名称":"name","客户等级":"tier","年度成交额":"amount","贡献占比":"ratio"}
        ]]>
    </excel>

</excels>
