表映射配置类
publicclassExcelToTableConfig{ privateintstartRow; privateintmaxSheetRows;//excel单sheet最大记录数 privateStringtableName; privateList<Column>columnList; privateStringchineseName; publicintgetStartRow(){ returnstartRow; } publicvoidsetStartRow(intstartRow){ this.startRow=startRow; } publicintgetMaxSheetRows(){ returnmaxSheetRows; } publicvoidsetMaxSheetRows(intmaxSheetRows){ this.maxSheetRows=maxSheetRows; } publicStringgetTableName(){ returntableName; } publicvoidsetTableName(StringtableName){ this.tableName=tableName; } publicList<Column>getColumnList(){ returncolumnList; } publicvoidsetColumnList(List<Column>columnList){ this.columnList=columnList; } publicStringgetChineseName(){ returnchineseName; } publicvoidsetChineseName(StringchineseName){ this.chineseName=chineseName; } }
列映射配置类
publicclassColumn{ privateintindex; privateStringfieldName; privateStringcolName; privateStringcolType; privateStringisHidden; privateStringisWhere; privateStringchineseName; privateintlength; privateStringreadOnly; publicintgetIndex(){ returnindex; } publicvoidsetIndex(intindex){ this.index=index; } publicStringgetFieldName(){ returnfieldName; } publicvoidsetFieldName(StringfieldName){ this.fieldName=fieldName; } publicStringgetColName(){ returncolName; } publicvoidsetColName(StringcolName){ this.colName=colName; } publicStringgetColType(){ returncolType; } publicvoidsetColType(StringcolType){ this.colType=colType; } publicStringgetIsHidden(){ returnisHidden; } publicvoidsetIsHidden(StringisHidden){ this.isHidden=isHidden; } publicStringgetIsWhere(){ returnisWhere; } publicvoidsetIsWhere(StringisWhere){ this.isWhere=isWhere; } publicStringgetChineseName(){ returnchineseName; } publicvoidsetChineseName(StringchineseName){ this.chineseName=chineseName; } publicintgetLength(){ returnlength; } publicvoidsetLength(intlength){ this.length=length; } publicStringgetReadOnly(){ returnreadOnly; } publicvoidsetReadOnly(StringreadOnly){ this.readOnly=readOnly; } }
xml配置
<?xmlversion="1.0"encoding="UTF-8"?> <tabletableName="ytby_hd_act_order"startRow="1"chineseName="奖品记录"> <columnindex="0"colName="ID"chineseName="内码"length="12"colType="long"isHidden="Yes"isWhere="Yes"></column> <columnindex="1"colName="PRIZE_CODE"chineseName="兑奖码"length="16"colType="String"isHidden="No"isWhere="No"></column> </table>原文链接:https://www.f2er.com/xml/295780.html