Successfully!

Error!

Excel Batch Import Plugin

  • Last update:  2024-04-19
  • Overview

    Application Scenario

    When you need to import an Excel file to a template and submit the file data to a database on the template preview page, a large data volume can significantly burden the browser, possibly causing page crashes.

    The Excel Batch Import plugin allows you to import multiple Excel files to a template and submit the data of files to a database without previewing the template, making it suitable for the scenario where there is no requirement to modify data on the preview page.

    iconNote:
    The function is not supported on mobile terminals.

    Function Description

    1.  Importing Excel files and submitting data of files to the database coincide, without the need to preview the template.

    2. The entry of the Batch Import function is set on the decision-making platform, so permission assignment is supported.

    3. Importing multiple Excel files is supported.

    4. Validate Data in Data Entry Attribute is supported, but Event Setting in Web Attribute is not supported.

    Example

    Plugin Installation

    You can obtain the plugin at Excel Batch Import.

    For details about installing the plugin in the designer, see Designer Plugin Management.

    For details about installing the plugin on the server, see Server Plugin Management.

    Adding the Link Node

    Log in to the decision-making platform as the admin. Choose System Management > Directory Management >Directory Management Data Entry, and click Add Link.

    Set Name of the link to Batch Importset Link Path to /webroot/decision/url/excel/submit, and tick PC as Terminal.

    5d718c93a1220b4c3bf2e6ea5eebb93.png

    Assigning the Link Permission

    Choose System Management > Permission Management, select Director in Human resources, and grant the director the View permission of Batch Import.

    cea0c166269944b90a881bb99cbdb47.png

    Adding the Batch Import Task

    1. Choose Directory > Data Entry > Batch Import. Click Add Task, set Task Name to Task 1, and select the template %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\SpecialSubject|\ExcelImport\Excel_import_multiple_times.cpt from the drop-down list of Template.

    iconNote:
    Sub-admins cannot add or delete tasks.

    3e378232c8da64ae947236721310ea2.png

    2. Import, edit, or delete the task in Task List after you have added a task, as shown in the following figure.

    08fd1233a2c8800d57f82dbed9259c1.png

    3. Click the Task Permission tab, select Director in Human resources, and grant the director the View permission of Task 1.

    4c72fc63e52954d2ae2ecbcd9277f63.png

    Effect Display

    Click and download the excelimport.xls file: excelimport.xls

    Use the account of Lily (the director of human resources) to log in to the data-decision platform. (The default password for all users in FineReport is 123456.)

    Choose Data Entry > Batch Import, and there is only Task 1 in Task List. Click the import icon and select the Excel file to import, as shown in the following figure.

    0546e3cd666a55728b9dfd14d0d208b.png

    Error Check

    When you encounter an issue during the execution of the Batch Import function, the process will be aborted, and an error prompt. There are two common errors: the data validation error and the data submission error.

    Data Validation Error

    1. Set data validation to the template. The value of cell E3 falls within the range of 0 to 1000, and if not, an error message will be displayed, as shown in the following figure.

    c7878d8fb76179b8a79e15a3811d4ab.png

    2. Modify the value of the Cost_price field in excelimport.xls to violate the data validation rule, as shown in the following figure.

    5ada0b020a32e0bc38cd68b528d4022.png

    3. Re-import the modified Excel file to the template, and then "Validation Error" will be displayed.

    2cbf70d93c7e443261516ce12882817.png

    4. Click the prompt message button to check the error, as shown in the following figure.

    e420df682b158b822486eae04223650.png

    5. Click Download Error File to automatically download the Wrong.xls file. Open the file, and you will see the error cell marked with a red background, as shown in the following figure.

    0391d7e23f51725eaf196c8db3c1139.png

    Data Submission Error

    If the error shown in the figure below occurs, it means that something is wrong when submitting the data to the database. At this time, you can check whether there is a setting problem with the corresponding template.

    1541052291YpuLkGhA.png

    Notes

    Although Batch Import eliminates the process of previewing the template, the performance of the function still has certain limitations. You are advised to import the Excel file with the total amount of data (rows multiplied by columns) below two million to avoid excessive server resource usage and longer import time. When the import time exceeds 25 minutes, the process will be eliminated and an error message of "process is null/timeout" will be returned.

    Attachment List


    Theme: Decision-making Platform
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback