- Print
- PDF
Introduction
The XLSX format is an output format used to create an output. The Form Engine retrieves data from the input file, processes it, and adds defined fields to the output along with static elements and text added by a user while modifying the output in the Editor.
As an input, the DataSet format is always used.
You can use a Microsoft Excel-type interface to deal with an output of the XLSX format.
In this exercise, you are proposed to create an output in the XLSX format.
Exercise
Download and import the attached configuration called 08. Create XLSX Output in Lasernet Developer 9. Afterward, navigate to the Forms section and open the Sample form.
To create an output of the XLSX format, follow these steps:
Open a grab file named Sample. To this end, first, on the Form menu, click Select Grab File(s).
In the Select Grab File(s) dialog that opens, select the Sample file, and then click Open.
Open a template based on which you want to create the output. To this end, click Open Template, select the one from the list, and then click Open.
Start creating your output document by specifying a template range. To this end, select a cell range to outline a region to which all cells of the template belong, and then click the Detail button on the Mail Merge Extended toolbar.
On the Mail Merge Extended toolbar, click the Select Data Member button.
With the Select Data Member dialog displayed, select a mail merge table as a data member for the worksheet data set.
Once you are done, click OK.
Add a nested level to the Detail range to display the detail-level data from the child table. To this end, select the required cell range in the output to outline a region of the Detail range, then click Master-Detail, and then click Detail Level.
As a result, the DetailLevel0 range is created.
To specify a nested data member for DetailLevel0, on the Mail Merge Extended toolbar, click Master-Detail, and then click Data Member.
It is now time to insert mail merge fields. To this end, select a cell in the template, and then double-click a field in the input which value you want to insert to the selected cell. Fill in the cells of the Detail range with field values of the master detail table.
Repeat the same action for each cell to fill it in with the required field value.
Start with adding fields for the first column in the following order:
contactname
shipname
shipaddress
shipcity
shipcountry
Afterwards, add fields for the second column in the following order:
orderid
freight
orderdate
requireddate
shippeddate
As you can see, the formatting specified for the current template is automatically applied to the inserted fields.
Fill in now cells of DetailLevel0 with field values of the nested table. Do it as it shown on the picture below.
To make sure that all the required elements are added to the template, preview it by clicking the Preview button on the toolbar.