I. Overview
1. Version update
Report version | JAR package | Function change |
---|---|---|
10.0.12 | 2020-12-28 | Before this version, only the preview of the newly data entry can use the multiple import function. Starting from this version, the general report preview also supports multiple imports. |
2. Application scenarios
Excel multiple import includes three forms: clear import, overwrite import, and incremental import.
Clear import: suitable for scenarios where the original page data needs to be cleared before importing.
Overwrite import: suitable for scenarios where you want the imported data to cover the same location data without affecting other data.
Incremental import: suitable for scenarios where you want to import data under the original data.
3. Functional logic
1) Overwrite import
When importing data in Excel, the page data in the same position will be overwritten according to the position. If the page has more data rows than Excel, the extra data on the page will be retained after Excel is imported and will not be cleared.
2) Clear import
Every time you import, the existing data on the filling page is cleared, and at the end only the content imported in Excel is retained. It should be noted that the clear import only clears the import area data, and the contents of other areas will not be cleared.
Note: This clearing is only clearing the page data, and will not clear the database data based on the reported attributes. If you have this requirement, you can refer to Clear the database table before importing into Excel to achieve.
3) Incremental import
Every time you import Excel, the content imported by Excel will be expanded at the end of the line. If there is no data when the page is initialized, and there is only a blank line, the blank line will remain after importing.
II. Examples
1. Excel data preparation
1) Click to download the Excel file: Excel_ template 1.xlsx
2) Click to download the Excel file: Excel_ template 2.xlsx
2. Template preparation
Design the table as shown below, and add text widgets to cells A2~K2.
Note: If a data column is inserted in the cell where the text widget is located, you need to change the data setting to a list, as shown in the figure below:
3. Add multiple import button
Click "Template>Web Attributes" on the menu bar of the designer, and add the "Multiple Import excel" button to the toolbar as shown in the following figure:
4. Effect preview
Save the report, click "Data Entry Preview" or "New Data Entry Preview", the "Multiple Import excel" button in the toolbar of the Web end will drop down to display 4 Excel import methods.
The effects of the 4 import methods are shown in the figure below:
III. Template download
For the completed template, see: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\SpecialSubject\ExcelImport\Excel_import_multiple_times.cpt
Click to download the template: Excel_import_multiple_times.cpt
Click to download the Excel data file: Excel_ template 1.xlsx Excel_ template 2.xlsx