Implementation method and device for accessing online table to third-party data
By adding menus and configuration items to ONLYOFFICE, the connection between online forms and third-party data is realized, which solves the highly customized needs of large enterprises for linked data, reduces costs, and improves the accuracy and efficiency of data filling.
Patent Information
- Application Number
- CN202410601891.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-23
AI Technical Summary
Large enterprises require highly customized linkage data functions when using online document editors. However, existing solutions are costly and difficult to meet complex business needs, and existing technology cannot effectively reduce manual entry and improve work efficiency.
Add menus and configuration items to ONLYOFFICE, request third-party data through HTTP interfaces, support automatic or manual triggering to fill data into tables, use JSONPATH to parse return values, and bind data to tables.
It realizes flexible access to online forms and third-party data, reduces user workload, improves the accuracy and efficiency of data filling, and meets high customization needs.
Smart Images

Figure CN118536489A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and specifically provides a method and a device for implementing online form access to third-party data. Background Art
[0002] Currently, online document editing is very popular. Tencent, Kingsoft, and Microsoft OFFICE all have their own online document editors. Compared with traditional local OFFICE documents, online documents realize multi-person collaboration, cloud storage, and are more suitable for the general trend of mobile development.
[0003] However, for large enterprises and other organizations, due to the complexity of their business, they have higher requirements for product customization. However, the cost of purchasing customized online documents from companies such as Tencent and Kingsoft is high. Most customized documents on the market are based on open source technology, and ONLYOFFICE is one of them. Its low development cost makes it popular among enterprises and developers.
[0004] Among the many requirements for online document editors, linking with existing data is a very urgent need. On the one hand, it ensures data accuracy, and on the other hand, it reduces manual input and improves work efficiency. Summary of the invention
[0005] The present invention aims at the above-mentioned deficiencies of the prior art and provides a highly practical method for implementing online table access to third-party data.
[0006] A further technical task of the present invention is to provide a reasonably designed, safe and applicable implementation device for accessing third-party data through an online form.
[0007] The technical solution adopted by the present invention to solve its technical problem is:
[0008] A method for implementing online forms to access third-party data. In the existing open source version of ONLYOFFICE, a menu is added, a configuration item is added, and an HTTP interface is used to request an interface to obtain external data. After obtaining the data, the data is filled into the form based on an optional data list.
[0009] There are two ways to obtain external data: one is to obtain it through a third-party interface, and the other is to obtain it by connecting to an existing database table.
[0010] Furthermore, add a new menu in ONLYOFFICE, tentatively named Data Linkage, and add configurations in the linkage configuration. There are two types of configurations here, either configuring a third-party interface or configuring a data source library table. Data can be obtained through these two methods.
[0011] Furthermore, after acquiring the data, the data configuration includes interface configuration, authentication parameters, interface return values, and data binding;
[0012] Among them, the interface address and request method are configured in the interface configuration, the authentication parameter configuration supports the json format, and after parsing, it is put into the request header to request the third-party interface and obtain the authentication data from the interface; the JSONPATH is configured in the interface return value data binding to parse the return data in the interface data.
[0013] Furthermore, after obtaining the data, the data is linked to the spreadsheet. The linkage method is to fill the data into the table and bind the data obtained from the outside to the table cells. Here, the identification field in the external data is bound to the cell. The cell binding identifier is the standard cell coordinates in ONLYOFFICE. Any cell is bound to the identification field of the data through the standard cell locator.
[0014] Furthermore, when configuring data linkage, the data linkage methods are divided into automatic triggering and manual triggering. The automatic triggering method uses the binding cell event as the triggering condition. By binding the event to the cell, the external data is automatically triggered.
[0015] The second method is manual triggering. Add a "Fill Data" menu to the system right-click menu and use the manual triggering mode to fill in the data in the spreadsheet.
[0016] Furthermore, when filling in data, an agreed return value format is used or JSONPATH is used to parse the data, and the data is subsequently filled directly into the table.
[0017] Furthermore, after acquiring the data, the data is first displayed in a pop-up window, and then the required data is manually selected. After the data is selected, the data is echoed to the table through the existing configuration, and the complete table linkage with external data is completed.
[0018] A device for implementing online form access to third-party data, comprising: at least one memory and at least one processor;
[0019] The at least one memory is used to store a machine-readable program;
[0020] The at least one processor is used to call the machine-readable program to execute a method for implementing online form access to third-party data.
[0021] Compared with the prior art, the method and device for implementing online form access to third-party data of the present invention have the following outstanding beneficial effects:
[0022] The present invention adds new features on the basis of the original functions, so as to better meet the actual use needs of users and reduce the workload of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Attached Figure 1 It is a schematic diagram of data configuration in a method for implementing an online form to access third-party data;
[0025] Attached Figure 2 It is a schematic diagram of data linkage in a method for implementing an online form access to third-party data;
[0026] Attached Figure 3 It is a data binding effect diagram in the implementation method of online table access to third-party data. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] A best embodiment is given below:
[0029] In this embodiment, a method for implementing online form access to third-party data is to add a menu and configuration items to the existing open source version of ONLYOFFICE, obtain external data based on the HTTP interface request interface, and after obtaining the data, fill the data into the form based on the optional data list;
[0030] There are two ways to obtain external data: one is to obtain it through a third-party interface, and the other is to obtain it by connecting to an existing database table.
[0031] like Figure 1 As shown in the figure, add a new menu in ONLYOFFICE, tentatively named Data Linkage, add configuration in Linkage Configuration. There are two types of configuration here, which support both configuration of third-party interfaces and configuration of data source tables. These two methods are also the two most commonly used methods for obtaining data within an enterprise.
[0032] After acquiring the data, data configuration includes interface configuration, authentication parameters, interface return value and data binding;
[0033] The interface address and request method are configured in the interface configuration. The authentication parameter configuration supports the json format, which is parsed and put into the request header to request the third-party interface, and supports obtaining authentication data from the interface; the return value binding configures JSONPATH to parse the return data in the interface data.
[0034] After obtaining the data, the data needs to be linked with the spreadsheet. The way to link is to fill the data into the table, so as to achieve the purpose of reducing workload.
[0035] The data obtained from the outside needs to be bound to the table cells. Here, the identification field in the external data is bound to the cell. The cell binding identifier is the standard cell coordinates in ONLYOFFICE, such as Sheet1! $A$1 (representing the cell in the first row of the first sheet, column A). Any cell can be bound to the identification field of the data through the standard cell locator.
[0036] The difficulty lies in being familiar with the ONLYOFFICE development model and code, and developing APIs to obtain and save relevant information of tables. This requires source code development, which is difficult to achieve from a technical point of view, but it is completely feasible.
[0037] like Figure 2 As shown, the data linkage methods are divided into automatic triggering and manual triggering. The automatic triggering method uses the binding cell event as the trigger condition, and automatically triggers the acquisition of external data by binding the cell event. The second is the manual triggering method, which adds the "Fill Data" menu in the system right-click menu and uses the manual triggering mode to fill the data in the spreadsheet.
[0038] like Figure 3 As shown, it is necessary to agree on the return value format or use JSONPATH to parse the data. The purpose is to obtain the key-value identifier and set the corresponding relationship between the table after the data is parsed, and then fill the data directly into the table.
[0039] After acquiring the data, first display the data in a pop-up window, then manually select the required data, and after selecting the data, echo the data to the table through the above existing configuration. At this point, the complete table linkage with external data is completed.
[0040] Based on the above method, a device for implementing online form access to third-party data in this embodiment includes: at least one memory and at least one processor;
[0041] The at least one memory is used to store a machine-readable program;
[0042] The at least one processor is used to call the machine-readable program to execute a method for implementing online form access to third-party data.
[0043] The present invention reduces the workload of filling in electronic spreadsheet documents and improves the accuracy of filled-in content through simple configuration in a linkage mode of external data.
[0044] The above-mentioned specific implementations are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementations. Any technical solutions that comply with the claims of the present invention and any appropriate changes or substitutions made by ordinary technicians in the relevant technical field shall fall within the patent protection scope of the present invention.
[0045] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for implementing online form access to third-party data, characterized in that: In the existing open source version of ONLYOFFICE, add menus, add configuration items, obtain external data based on the HTTP interface request interface, and after obtaining the data, fill the data into the table based on the optional data list; There are two ways to obtain external data: one is to obtain it through a third-party interface, and the other is to obtain it by connecting to an existing database table.
2. The method for implementing online form access to third-party data according to claim 1, characterized in that: Add a new menu in ONLYOFFICE. The tentative name is Data Linkage. Add configuration in the linkage configuration. There are two types of configurations here: configure the third-party interface or configure the data source library table. Use these two methods to obtain data.
3. The method for implementing online form access to third-party data according to claim 2, characterized in that: After acquiring the data, data configuration includes interface configuration, authentication parameters, interface return value and data binding; Among them, the interface address and request method are configured in the interface configuration, the authentication parameter configuration supports the json format, and after parsing, it is put into the request header to request the third-party interface and obtain the authentication data from the interface; the JSONPATH is configured in the interface return value data binding to parse the return data in the interface data.
4. The method for implementing online form access to third-party data according to claim 3, characterized in that: After acquiring the data, the data is linked to the spreadsheet. The linkage method is to fill the data into the table and bind the data acquired from the outside to the table cells. Here, the identification field in the external data is bound to the cell. The cell binding identifier is the standard cell coordinates in ONLYOFFICE. Any cell is bound to the identification field of the data through the standard cell locator.
5. The method for implementing online form access to third-party data according to claim 4, characterized in that: When configuring data linkage, the data linkage methods are divided into automatic triggering and manual triggering. The automatic triggering method uses the binding cell event as the trigger condition. By binding the event to the cell, the external data is automatically triggered. The second method is manual triggering. Add a "Fill Data" menu to the system right-click menu and use the manual triggering mode to fill in the data in the spreadsheet.
6. The method for implementing online form access to third-party data according to claim 5, characterized in that: When filling data, agree on the return value format or use JSONPATH to parse the data, and then fill the data directly into the table.
7. The method for implementing online form access to third-party data according to claim 6, characterized in that: After acquiring the data, first display the data in a pop-up window, then manually select the required data, and after selecting the data, echo the data to the table through the existing configuration, and the complete table linkage with external data is completed.
8. A device for implementing online form access to third-party data, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to call the machine-readable program to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Business data processing method and device based on online table
CN121257500A
Method and apparatus for processing business data based on online form
CN121257500B
