The lnctoxls web method is used to export data (CSV file) to an Excel model. The lnctoxls method is called using HTTP POST requests because the parameters of the command are sent in the POST message body.
The following URL is used: /launcher/lnctoxls
This is the different parameters :
<command name="LNCTOXLS">
<param1>
<param name="ToXls" default="*New"/>
<param name="ToSheet" default=""/>
<param name="ToName" default="*NONE"/>
<param name="ColPref" default="*NONE"/>
<param name="DataSource" default="" type="string"/>
<param name="RecCnt" default=""/>
<param name="AutoFmt" default="*NONE"/>
<param name="AutoFit" default=""/>
<param name="FmtCells" default=""/>
<param name="AddColH" default="*NONE"/>
<param name="ShowDoc" default="false"/>
<param name="SavDoc" default="" type="string"/>
<param name="SavFmt" default="*XLS"/>
<param name="XlsOpt" default=""/>
<param name="XlsMap" default=""/>
</param1>
</command>
Parameters |
Description |
String ToXls |
Template name Exemple: C:\\temp\\template.xlsx |
String ToSheet |
Excel sheet name |
String ToName |
Area name into Excel sheet |
String XlsOpt |
Can take the following values : • *REPLACE : new data overwrites the old data. • *RESIZE : new data overwrites the old data. Area in the workbook is resized. • *ADD : new data is added to the old data. • *INSERT : rows are inserted to receive new data. The parameter ENTIRER determines whether entire lines are inserted or not. • *MAP : column values from the data source are assigned to cells with the same names in the Excel spreadsheet. Only the first entry of the data source is used.
|
String XlsMap |
Can take the following values : • *MAPNAME : column values from the data source are assigned to cells with the same names in the Excel spreadsheet. • *MAPVALUE : values for columns in the data source are assigned to cells whose initial value is the same |
String ColPref |
Can take the following values : • *NONE : no prefix for columns • Prefix value for columns |
String DataSource |
The full path of the CSV file. |
String RecCnt |
If using a CSV file directly as a source of data, it is mandatory to specify the number of rows in the CSV file. In all other cases, this attribute is not used. |
String AutoFmt |
Can take the following values : • *NONE : no automatic formatting is applied. • Format name : le specified format is applied. |
String AutoFit |
Can take the following values : • True : automatically adjust the column width. • False : no change of the column width |
String FmtCells |
Can take the following values : • True : the cell format is set according to the type Database. • False : the format of the cells is determined by Excel, according to the values. |
String AddColH |
Can take the following values : • True : column names are inserted in the first line. • False : column names are not inserted in the first line. |
String ShowDoc |
Can take the following values : • True : to show the document • False : document not visible |
String SavDoc |
Complete path of the result document Example: C:\\temp\\result.xlsx |
String SavFmt |
Can take the following values : • *NORMAL : format of the template file • *XLS : Excel format • *TXT : text format
|