Xlsx

Description

Task to process xlsx microsoft files. Available functionnalities are :

  • Clone
    Clone sheet including defined rows and columns, and merge some columns.

Xlsx task parameters

Attribute Description Value Required
file the xlsx file yes
Element Description Value Required
clone the clone element no

Clone parameters

Attribute Description Value Required
sheet the sheet name yes
rows the row to clone n-n+x (exemple: 1-100,4-74,...) no
Element Description Value Required
column the column to clone yes

Column parameters

Attribute Description Value Required
name the column name A | B | C | ... yes
mergewithnext merge or not with next column true | false* (by default) no
Element Description Value Required
prefix the prefix of the cloned column no

Prefix parameters

Attribute Description Value Required
value the prefix value any text, EOL to goto line yes

Examples


<project name="xlsx task"> 

  <taskdef name="xlsx" 
     classname="net.sourceforge.ant4x.biz.ms.XlsxTask" 
     classpath="PATH/TO/ant4x.jar"/> 

  <target name="xlsx"> 
    <xlsx file="/path/to/file.xlsx">
        <clone sheet="The_Sheet_To_Clone" rows="1-10">
            <column name="C" mergewithnext="true">
                <prefix value="[COLUMN C]EOL"/>
            </column>
            <column name="D">
                <prefix value="EOL[COLUMN D]EOL"/>
            </column>
            <column name="E"/>
        </clone>
    </xlsx>
  </target> 

                    </project>