Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution of importing excel File to deal with process Node

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Import excel file to deal with the solution of the process node, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

When the management system is not in use, many enterprises will save some production or assembly line operation data in excel files and form multiple excel tabular data by name or by sheet page.

When the workflow management system is used, the operations of these production or assembly lines will be recorded as nodes of the process, and the data that the process needs to record will also be applied to the management system. It is usually to set up a database and create database tables to store these records.

The data originally recorded in the paper or excel file needs to go through the workflow management system, execute the process node, open the form interface on the node, enter the data, and save it to the database table.

In this way, there will be some changes in the operation habits of enterprise users, and those who originally saved excel files now need to be entered through the form interface.

For more convenience, users will propose that we still record it in the excel file in the original way, that is to say, if we have recorded the excel file, can we select the excel file, upload it, and then show the data from the form interface of the process, which can be edited and maintained, and then continue the flow of the process.

In order to accommodate this function, we must add the ability to upload excel files to the form of the process node.

In our eform custom form, there are controls for uploading attachments, but there is a slight difference from this requirement: for controls for uploading attachments by eform, files will be uploaded to the directory of the web server, and files will not be opened to import data into database tables. In fact, it is more convenient to open the excel file and import the data into the database table with custom code.

Here is the process of implementing this requirement:

Add the function button for uploading attachments to the process node form, and click the mode to open the selection page for uploading attachments.

Select the attachment you want to upload, click upload, upload the attachment page is using the basic type=file standard controls. Action points to the backend class. When you select a file and click upload, the backend class intercepts the uploaded file stream.

Is a j2ee project, the use of poi package, analysis of excel file rows, columns, cells, take out the data, the data into insert into sql statements, the data will be written to the database table.

It is a project of dotnet, which uses the dll of analyzing excel files to analyze the rows, columns and cells of the files, assembles the data into insert into statements, and writes them into database tables.

After the upload is completed, close the upload page, return to the process node form input interface, and refresh the page. What is displayed in the page table is the content just uploaded in the excel file.

Users can edit the contents of the modification form, click execute, submit the modified record again, and execute the flow of the process.

Because the background analysis of the excel file is directly analyzed by the input stream, there is no direct file stored in the web server.

Package the upload attachment button function into a common js function to open a specific page for uploading attachments. Receive the process instance id on the page where the attachment is uploaded, identifying the parameters stored in that business table.

The format of each excel file must be fixed, and each column needs to be bound to the fields of the database table.

In this way, in the business form attached to the process node, if you need to upload the attachment function, define the button to upload the attachment, call the encapsulated js function, and write to the database table according to the ID. In this way, we can quickly integrate the function of importing excel files into the form of the process node.

After reading the above, have you mastered the solution to import the excel file to deal with the process node? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report