I. Overview
1. Application scenarios
When you import a report with indefinite rows into excel and data entry, you can match it according to the title by default, that is, as long as the title in the designer report is the same as that in Excel, it can be imported, regardless of the column position.
2. Function introduction
1) The imported Excel data will be automatically matched according to the column header (vertical expansion, horizontal expansion is row header).
2) If the title is different, it will be displayed as blank, that is, the title must be consistent.
3) According to the title matching, it is location independent, and the location of columns can be interchanged.
4) When importing an indefinite line, the title is matched first. If the title is not matched successfully, the title is matched by location.
II. Example
1. Template Preparation
You can use the same templaye in matched by location. Just modify the title names as shown below:
Note: if you don't add widgets, you can only view the data after importing, and you can't enter data. But here is to import the indefinite line, no matter whether it is imported according to the control or not, we must ensure that the left parent cell is extensible.
2. Report data entry attribute setting
Click template > data entry attributes, select smart submit type, intelligently add the corresponding fields of the product table in FRdemo, and intelligently add the corresponding cells. The steps are as follows:
3. Effect preview
Save the report, click data entry preview, click Import excel on the toolbar, and select the Excel data file excelimport2.xls, data with modified column header name cannot be imported. The effect is as follows:
When the title names are consistent, the effect is as follows:
III. Template download
For completed templates and excel file, please refer to:
%fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\DataEntry\DataEntryApplication\Excel_title_match.cpt
%fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Reference\excelimport2.xls
Click to download the template: Excel_title_match.cpt
Click to download the excel: excelimport2.xls
IV. Precautions
the same title column only matches the previous column
If there are two columns with the same title in the table designed by the designer, and there is only one column of data with the same title in the excel file, as shown in the figure below:
When importing excel, only the data of the previous column is matched, and the data of the following column is empty, as shown in the figure below:
If you want both columns to match, only one column can be copied in Excel, regardless of the location of the copied column. However, the column with the same title is only applicable to the front-end display, and only one field can be used in data entry.