Method, device, electronic device and storage medium for pasting electronic form content
By reading the spreadsheet content from the clipboard, determining and formatting the type of data in each column, and directly pasting it into the office system table, the problem of low copy and pasting spreadsheet content is solved, and the ease of use and data of the office system is improved. Entering efficiency.
Patent Information
- Application Number
- CN202111217450.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-19
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2041-10-19
AI Technical Summary
The prior art cannot directly copy and paste the contents in the spreadsheet into the tables of the office system, resulting in users having to manually enter data one by one when batch input, which is time-consuming and labor-intensive, affecting the ease of use of the office system.
By reading the table content from the clipboard, determining the type of data in each column and formatting the text, pasting the target data into the corresponding column according to the entry rules of the office system, automatically pasting it.
It improves the efficiency of pasting spreadsheet content, simplifies the data entry process of the office system, improves the ease of use of the system, and reduces manual operations.
Smart Images

Figure CN113962205B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for pasting electronic spreadsheet content. Background Art
[0002] Due to the differences in data formats, interfaces, and parsing logic between office systems such as ERP and OA and spreadsheet software such as Excel and WPS, it is impossible to directly copy the contents of a spreadsheet to a table in an office system.
[0003] In actual application, there is a need to use both spreadsheets and office systems for data recording and processing. When users need to enter data in batches in documents, because the office system does not support direct copying and pasting of data content in spreadsheets for use, they can only enter data manually one by one, which is time-consuming and laborious.
[0004] Therefore, how to improve the pasting efficiency of electronic spreadsheet content and improve the usability of office systems is a technical problem that those skilled in the art currently need to solve. Summary of the invention
[0005] The purpose of the present application is to provide a method and device for pasting electronic spreadsheet contents, an electronic device and a storage medium, which can improve the pasting efficiency of electronic spreadsheet contents and improve the usability of office systems.
[0006] In order to solve the above technical problems, the present application provides a method for pasting electronic table contents, which is applied to an office system. The method for pasting electronic table contents includes:
[0007] Reading table contents from a clipboard; wherein the table contents are obtained by copying data in an electronic table column by column;
[0008] Determine the data type corresponding to the column where the table content is located, and perform corresponding text formatting processing on the table content according to the data type to obtain target data;
[0009] The target data is pasted into a corresponding column in a target table according to the data type; wherein the target table is a table in the office system for entering data.
[0010] Optionally, if the table content includes multiple columns of data in the electronic table, determining the data type corresponding to the column where the table content is located includes:
[0011] Determine the field arrangement rules corresponding to each data type;
[0012] Select the table data of the current column from the table content;
[0013] Matching the table data of the current column with a plurality of field arrangement rules, and setting the data type corresponding to the matching field arrangement rule as the data type corresponding to the table data of the current column;
[0014] Determine whether the data types of the table data in all columns in the table content have been set;
[0015] If not, the process proceeds to the step of selecting the table data of the current column from the table content.
[0016] Optionally, matching the table data of the current column with a plurality of field arrangement rules, and setting the data type corresponding to the matched field arrangement rule as the data type corresponding to the table data of the current column, includes:
[0017] Setting a rule comparison order; wherein the rule comparison order is used to describe the comparison order between the table data of the current column and a plurality of field arrangement rules;
[0018] The table data of the current column is matched with a plurality of field arrangement rules in sequence according to the rule comparison order, and the data type corresponding to the matched field arrangement rule is set as the data type corresponding to the table data of the current column.
[0019] Optionally, the setting of the rule comparison order includes:
[0020] An original comparison order is set according to the field arrangement rules corresponding to all data types, and the field arrangement rules that match the original comparison order are removed to obtain the rule comparison order.
[0021] Optionally, after pasting the target data into a corresponding column in a target table according to the data type, the method further includes:
[0022] Determining whether the target data passes the legality check according to the verification logic of the office system;
[0023] If the target data fails the legality check, the target data is deleted from the target table.
[0024] Optionally, after judging whether the target data passes the legality check according to the check logic of the office system, the method further includes:
[0025] If the target data passes the legality check, then the associated attribute field of the target data is added to the corresponding column in the target table;
[0026] Determining whether the associated attribute field of the target data passes the legality check according to the verification logic of the office system;
[0027] If the associated attribute field of the target data fails to pass the legality check, the target data and the associated attribute field of the target data are deleted in the target table.
[0028] Optionally, after deleting the target data in the target table, the method further includes:
[0029] Generate paste failure information corresponding to the target data; wherein the paste failure information includes location information of the target data in the electronic form.
[0030] The present application also provides a device for pasting electronic table contents, the device comprising:
[0031] A content reading module, used for reading table contents from a clipboard; wherein the table contents are obtained by copying the data in the electronic table column by column;
[0032] A formatting processing module, used to determine the data type corresponding to the column where the table content is located, and perform corresponding text formatting processing on the table content according to the data type to obtain target data;
[0033] A pasting module is used to paste the target data into a corresponding column in a target table according to the data type; wherein the target table is a table in an office system for entering data.
[0034] The present application also provides a storage medium on which a computer program is stored. When the computer program is executed, the steps of the method for pasting the electronic table content are implemented.
[0035] The present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the steps of executing the above-mentioned method for pasting electronic table contents are implemented.
[0036] The present application provides a method for pasting electronic table contents, which is applied to an office system, and the method comprises: reading table contents from a clipboard; wherein the table contents are obtained by copying data in an electronic table by column; determining the data type corresponding to the column where the table contents are located, and performing corresponding text formatting processing on the table contents according to the data type to obtain target data; and pasting the target data into a corresponding column in a target table according to the data type; wherein the target table is a table used for entering data in the office system.
[0037] The present application reads the table content from the clipboard. Different columns in the electronic table correspond to different data types. The present application determines the data type corresponding to the column where the table content is located and performs text formatting processing operations corresponding to the data type on the table content to obtain target data that can be directly pasted into the table of the office system. After obtaining the target data, the present application pastes the target data into the corresponding column in the target table according to the data type, and completes the operation of copying the content from the electronic table and pasting it into the target table of the office system. The present application performs text formatting processing according to the data type of the table data to obtain target data that complies with the entry rules of the office system, and can realize automatic pasting of electronic table content without manual participation in processing. Therefore, the present application can improve the pasting efficiency of electronic table content and improve the usability of the office system. The present application also provides a device for pasting electronic table content, an electronic device and a storage medium, which have the above-mentioned beneficial effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0039] Figure 1 A flowchart of a method for pasting electronic table contents provided in an embodiment of the present application;
[0040] Figure 2 A flowchart of a method for determining a data type provided in an embodiment of the present application;
[0041] Figure 3 A schematic diagram of the principle of a solution for pasting electronic spreadsheet contents into an ERP system in batches provided in an embodiment of the present application;
[0042] Figure 4 A schematic diagram of the structure of a device for pasting electronic spreadsheet content provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] See below Figure 1 , Figure 1 A flowchart of a method for pasting electronic table contents provided in an embodiment of the present application.
[0045] Specific steps may include:
[0046] S101: Read table contents from the clipboard;
[0047] This embodiment can be applied to an office system, which may include an ERP (Enterprise Resources Planning) system or an OA (Office Automation) system. An ERP system refers to a management platform based on information technology that provides enterprise decision-making and employee decision-making operation means with a systematic management concept, and can provide cross-regional, cross-departmental, and even cross-company integrated real-time information management.
[0048] Before this step, there may be an operation in which the user copies data from the spreadsheet by column to obtain the table content, and the copied table content is stored in the clipboard. A spreadsheet, also known as an electronic data sheet, is a type of computer program that simulates a calculation table on paper. A spreadsheet displays a grid consisting of a series of rows and columns, and cells can store values, calculation formulas or text. The spreadsheet software mentioned in this embodiment includes WPS Office, Microsoft Office Excel, etc. The office system in this embodiment is an office system different from the target information of the spreadsheet, and the above parameters include any one or a combination of any several of the data format, interface and parsing logic.
[0049] S102: Determine the data type corresponding to the column where the table content is located, and perform corresponding text formatting processing on the table content according to the data type to obtain target data;
[0050] The data in each column of the electronic table are of the same type, and each data type has its corresponding field arrangement rule. Therefore, the data in the table content can be matched according to the field arrangement rule to determine the data type corresponding to the column where the cell content is located.
[0051] Each data type in the office system has its corresponding text formatting processing method, so on the basis of determining the data type of each column of the table content, the target data can be obtained by performing text formatting processing corresponding to the data type on the table content. The above target data conforms to the input rules of the office system, so the target data can be directly pasted into the office system.
[0052] S103: Pasting the target data into a corresponding column in a target table according to the data type;
[0053] On the basis of obtaining the target data, the target data can be pasted into the target table of the office system. The target table is a table used to enter data in the office system. Specifically, the target table includes multiple columns, and the columns of the target table have corresponding data types. Therefore, the target data can be pasted into the target table of the office system according to the data types corresponding to the target data.
[0054] This embodiment reads the table content from the clipboard. Different columns in the electronic table correspond to different data types. This embodiment determines the data type corresponding to the column where the table content is located, and performs text formatting processing operations corresponding to the data type on the table content to obtain target data that can be directly pasted into the table of the office system. After obtaining the target data, this embodiment pastes the target data into the corresponding column in the target table according to the data type, and completes the operation of copying the content from the electronic table and pasting it into the target table of the office system. This embodiment performs text formatting processing according to the data type of the table data to obtain target data that complies with the entry rules of the office system, and can realize automatic pasting of electronic table content without manual participation in the processing. Therefore, this embodiment can improve the pasting efficiency of electronic table content and improve the usability of the office system.
[0055] See also Figure 2 , Figure 2 A flowchart of a method for determining a data type provided in an embodiment of the present application. Figure 1 The further introduction of the S102 process in the corresponding embodiment can be compared with the present embodiment. Figure 1 Corresponding embodiments are combined to obtain a further implementation method. If the table content includes multiple columns of data in the electronic table, the process of determining the data type corresponding to the column where the table content is located includes:
[0056] S201: Determine the field arrangement rule corresponding to each data type;
[0057] Each data type has its corresponding field arrangement rules. The following provides field arrangement rules for several data types:
[0058] (1) If the data type is a commodity code, the commodity code shall have at least the following four field arrangement rules: ① numbers; ② numbers + letters; ③ numbers + symbols; ④ numbers + letters + symbols.
[0059] (2) If the data type is auxiliary attributes, the auxiliary attributes have at least the following four field arrangement rules: ① letters; ② Chinese; ③ Chinese + letters + symbols; ④ English + symbols. Auxiliary attributes are information describing the attributes of the product. If the product is a mobile phone, the product attributes of the mobile phone include memory size, color, etc.
[0060] (3) If the data type is quantity, the corresponding field arrangement rule can be: number (integer, decimal).
[0061] (4) If the data type is unit price, the corresponding field arrangement rule can be: number (integer, decimal).
[0062] (5) If the data type is tax rate, the corresponding field arrangement rule can be: percentage.
[0063] S202: Selecting table data of the current column from the table content;
[0064] If the table content in the clipboard includes multiple columns of table data, the table data of the current column can be selected from the table content so as to detect the data types in the table content column by column.
[0065] S203: matching the table data of the current column with a plurality of field arrangement rules, and setting the data type corresponding to the matched field arrangement rule as the data type corresponding to the table data of the current column;
[0066] This embodiment can match the table data of the current column with the above-mentioned field arrangement rules, and set the data type corresponding to the matching field arrangement rules as the data type corresponding to the table data of the current column. Take the field arrangement rules of the 5 types of data listed above as an example to illustrate the above process: if the table data of the current column is "36AB+", the corresponding data type is the commodity code; if the table data of the current column is "red", the corresponding data type is the auxiliary attribute; if the table data of the current column is "20%", the corresponding data type is the tax rate.
[0067] S204: Determine whether the data types of the table data in all columns of the table content have been set; if so, end the process; if not, proceed to S202;
[0068] Among them, since the table content includes multiple columns of data in the electronic table, after determining the data type of the table data in the current column, it can be determined whether the data types of the table data in all columns in the table content have been determined. If so, it can enter Figure 1 In the corresponding embodiment, the corresponding text formatting processing is performed on the table content according to the data type to obtain the target data; if not, the table data of the current column is re-determined.
[0069] As for Figure 2Further introduction to the corresponding embodiment, the table data of the current column can be compared with multiple field arrangement rules one by one, specifically: the rule comparison order can be set; wherein the rule comparison order is used to describe the comparison order of the table data of the current column with multiple field arrangement rules; the table data of the current column is matched with multiple field arrangement rules in sequence according to the rule comparison order, and the data type corresponding to the matching field arrangement rule is set as the data type corresponding to the table data of the current column. The above rule comparison order can be: product code, auxiliary attribute, quantity, unit price, tax rate.
[0070] Furthermore, the data types corresponding to any two columns in the table are not the same. Therefore, after determining the data type of the table data in the current column, the data type of the table data in other columns whose data types have not been determined is not the data type of the table data in the current column. Specifically, the process of setting the rule comparison order includes: setting the original comparison order according to the field arrangement rules corresponding to all data types, and removing the matching field arrangement rules in the original comparison order to obtain the rule comparison order. For example, the original comparison order is commodity code, auxiliary attribute, quantity, unit price, and tax rate; after determining that the data type of the table data in the current column is quantity, the rule comparison order used to determine the data type of the table data in the next column is commodity code, auxiliary attribute, unit price, and tax rate; after determining that the data type of the table data in the current column is commodity code, the rule comparison order used to determine the data type of the table data in the next column is auxiliary attribute, unit price, and tax rate.
[0071] As for Figure 1 Further introduction to the corresponding embodiment, after pasting the target data to the corresponding column in the target table according to the data type in S103, it is also possible to determine whether the target data passes the legality check according to the verification logic of the office system; if the target data does not pass the legality check, the target data is deleted from the target table.
[0072] Among them, there are verification rules for each type of data in the verification logic of the office system, and the verification rules include the value range of the data or the content that can be pasted. For example, the value range corresponding to the quantity is 0-30%. If the target data is 50%, it is determined that the target data does not pass the legality check. Specifically, the process of deleting the target data is: delete all the data in the column where the target data is located in the table content.
[0073] Furthermore, after judging whether the target data has passed the legality check according to the verification logic of the office system, if the target data has passed the legality check, the associated attribute field of the target data is added to the corresponding column in the target table; judging whether the associated attribute field of the target data has passed the legality check according to the verification logic of the office system; if the associated attribute field of the target data has not passed the legality check, the target data and the associated attribute field of the target data are deleted in the target table. The associated attribute field of the target data can be preset in the office system, and after the target data is added to the target table and passes the legality check, the associated attribute field can be added to the target table. For example, the product model is a mobile phone of a certain brand, and the color of the mobile phone is only black. Therefore, after the product model of the mobile phone of a certain brand is added to the target table, the data "red" can be added to the color column of the same row of the product model.
[0074] As a feasible implementation, after deleting the target data in the target table, paste failure information corresponding to the target data can also be generated to prompt the user that the content in the electronic table failed to be pasted; wherein the paste failure information includes the location information of the target data in the electronic table.
[0075] In the related art, there is a method of processing by deriving a document Excel template, filling in data and then introducing it. Whether the processing logic is introduced through API field correspondence or direct SQL insertion, the prerequisite is that the user must first maintain the data of each field in Excel before importing it into the system. For the user, the above operation is basically the same as the complexity of entering a document into the system once. Not only has the manual workload not been reduced much, but Excel does not have the data legitimacy verification logic of the ERP system, and cannot identify and correct errors when entering data; at the same time, the template introduced in the scheme of the related technology has too much information content for verification, the performance is very low, and the experience is very poor, and it is impossible to achieve intelligent, fast and accurate batch processing of business. In view of the various defects existing in the above-mentioned related technologies, this embodiment provides a solution for pasting the contents of a spreadsheet into the ERP system in batches. This solution directly batch copies the EXCEL content and pastes it into the document details in the ERP system to reduce manual operations, improve product usability, and improve personnel work efficiency.
[0076] The following is an example of an actual application to illustrate the process described in the above embodiment. Figure 3 , Figure 3 A schematic diagram of the principle of a solution for pasting spreadsheet contents into an ERP system in batches provided in an embodiment of the present application, wherein the process includes data copying, data pasting, data parsing and formatting, data verification and matching to fill in ERP fields and return for use.
[0077] During the data copying process, users can select and copy material data (code, quantity, auxiliary attributes, etc.) in the spreadsheet by column. The above selective copying process supports batch copying of multiple columns. After the data is pasted to the clipboard, the copied data can be parsed according to the content of the clipboard and the text formatting can be performed on the data. In the case of a single column, the user has confirmed that the corresponding situation does not need to be parsed. In the case of copying multiple columns of data, formatting and parsing (such as key fields such as code, quantity, auxiliary attributes, etc.) need to be performed in the order of rule comparison. The rule comparison order is as follows: product code, auxiliary attributes, quantity, unit price, tax rate.
[0078] During the formatting of copied data, if the data of the copied column does not conform to the Nth field arrangement rule, the N+1th field arrangement rule will be matched for the column during formatting, and formatting will be performed if the match is in the name. For example: the user copies three columns, and the column contents are (numbers + letters), numbers, and percentages. During formatting, since there is no column data that conforms to the "auxiliary attribute" column parsing rule, the second column data is sequentially formatted as "quantity", and so on. If none of the corresponding columns conform to the parsing rules, the column fails to be copied and is not added to the clipboard.
[0079] Paste the formatted data into the corresponding fields in the ERP system; for data in multiple columns, automatically split it according to the above parsing rules and fill it into the corresponding fields of each column. After the data is filled into the table of the ERP system, the data legitimacy is checked in sequence according to the verification logic of the ERP system. If the verification passes, the details of the row are retained, and other related attribute fields are returned for filling. Fill by column first, then by row, and check after filling. If the verification fails, delete it directly to check the next column or row data. If the previous column data passes the verification, but the related attribute field verification fails, the previous column data and its corresponding previous column data must also be deleted to ensure the legitimacy and accuracy of the data.
[0080] The above embodiment can directly paste the data in EXCEL into the ERP system for use by directly batch copying the data in EXCEL, converting the data in the spreadsheet into data that conforms to the ERP system entry rules, and can automatically enter the data that needs to be filled in, thereby improving work efficiency and the ease of operation of the ERP system.
[0081] See also Figure 4 , Figure 4 A schematic diagram of the structure of a device for pasting electronic table contents provided in an embodiment of the present application, the device may include:
[0082] The content reading module 401 is used to read the table content from the clipboard; wherein the table content is obtained by copying the data in the electronic table column by column;
[0083] The formatting processing module 402 is used to determine the data type corresponding to the column where the table content is located, and perform corresponding text formatting processing on the table content according to the data type to obtain target data;
[0084] The pasting module 403 is used to paste the target data into a corresponding column in a target table according to the data type; wherein the target table is a table in an office system for inputting data.
[0085] This embodiment reads the table content from the clipboard. Different columns in the electronic table correspond to different data types. This embodiment determines the data type corresponding to the column where the table content is located, and performs text formatting processing operations corresponding to the data type on the table content to obtain target data that can be directly pasted into the table of the office system. After obtaining the target data, this embodiment pastes the target data into the corresponding column in the target table according to the data type, and completes the operation of copying the content from the electronic table and pasting it into the target table of the office system. This embodiment performs text formatting processing according to the data type of the table data to obtain target data that complies with the entry rules of the office system, and can realize automatic pasting of electronic table content without manual participation in the processing. Therefore, this embodiment can improve the pasting efficiency of electronic table content and improve the usability of the office system.
[0086] Furthermore, the formatting processing module 402 includes:
[0087] An arrangement rule determination unit, used to determine a field arrangement rule corresponding to each data type;
[0088] A data selection unit, used for selecting table data of a current column from the table content;
[0089] A type setting unit, used for matching the table data of the current column with a plurality of field arrangement rules, and setting the data type corresponding to the matched field arrangement rule as the data type corresponding to the table data of the current column;
[0090] The judging unit is used to judge whether the data types of the table data of all columns in the table content have been set; if not, entering the step of selecting the table data of the current column from the table content.
[0091] Furthermore, the type setting unit is used to set a rule comparison order; wherein the rule comparison order is used to describe the comparison order between the table data of the current column and multiple field arrangement rules; and is also used to match the table data of the current column with multiple field arrangement rules in sequence according to the rule comparison order, and set the data type corresponding to the matching field arrangement rule to the data type corresponding to the table data of the current column.
[0092] Furthermore, the process of setting the rule comparison order by the category setting unit includes: setting the original comparison order according to the field arrangement rules corresponding to all data categories, and removing the matching field arrangement rules in the original comparison order to obtain the rule comparison order.
[0093] Furthermore, it also includes:
[0094] A verification module is used to determine whether the target data passes the legality check according to the verification logic of the office system after pasting the target data into the corresponding column in the target table according to the data type; and is also used to delete the target data in the target table if the target data fails the legality check.
[0095] Furthermore, it also includes:
[0096] The associated attribute field filling module is used to determine whether the target data has passed the legality check according to the verification logic of the office system. If the target data has passed the legality check, the associated attribute field of the target data is added to the corresponding column in the target table; it is also used to determine whether the associated attribute field of the target data has passed the legality check according to the verification logic of the office system; it is also used to delete the target data and the associated attribute field of the target data in the target table if the associated attribute field of the target data has not passed the legality check.
[0097] Furthermore, it also includes:
[0098] A prompt module is used to generate paste failure information corresponding to the target data after deleting the target data in the target table; wherein the paste failure information includes the location information of the target data in the electronic table.
[0099] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.
[0100] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0101] The present application also provides an electronic device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.
[0102] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
[0103] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for pasting electronic table contents, characterized in that: Applied to an office system, the method comprises: Reading table contents from a clipboard; wherein the table contents are obtained by copying data in an electronic table column by column; Determine the data type corresponding to the column where the table content is located, and perform corresponding text formatting processing on the table content according to the data type to obtain target data; wherein the parameters of the office system and the electronic form are different, and the parameters include any one or a combination of any several items of data format, interface and parsing logic; there is a text formatting processing method corresponding to each data type in the office system, and the target data conforms to the input rules of the office system; the types of each column of data in the electronic form are the same, and each data type has its corresponding field arrangement rule; The target data is pasted into a corresponding column in a target table according to the data type; wherein the target table is a table in the office system for entering data.
2. The method for pasting electronic table contents according to claim 1, characterized in that: If the table content includes multiple columns of data in the electronic table, determining the data type corresponding to the column where the table content is located includes: Determine the field arrangement rules corresponding to each data type; Select the table data of the current column from the table content; Matching the table data of the current column with a plurality of field arrangement rules, and setting the data type corresponding to the matching field arrangement rule as the data type corresponding to the table data of the current column; Determine whether the data types of the table data in all columns in the table content have been set; If not, the process proceeds to the step of selecting the table data of the current column from the table content.
3. The method for pasting electronic table contents according to claim 2, characterized in that: Matching the table data of the current column with a plurality of field arrangement rules, and setting the data type corresponding to the matched field arrangement rule as the data type corresponding to the table data of the current column, includes: Setting a rule comparison order; wherein the rule comparison order is used to describe the comparison order between the table data of the current column and a plurality of field arrangement rules; The table data of the current column is matched with a plurality of field arrangement rules in sequence according to the rule comparison order, and the data type corresponding to the matched field arrangement rule is set as the data type corresponding to the table data of the current column.
4. The method for pasting electronic table contents according to claim 3, characterized in that: The setting rule comparison order includes: An original comparison order is set according to the field arrangement rules corresponding to all data types, and the field arrangement rules that match the original comparison order are removed to obtain the rule comparison order.
5. The method for pasting electronic table contents according to claim 1, characterized in that: After pasting the target data into corresponding columns in the target table according to the data type, the method further includes: Determining whether the target data passes the legality check according to the verification logic of the office system; If the target data fails the legality check, the target data is deleted from the target table.
6. The method for pasting electronic table contents according to claim 5, characterized in that: After determining whether the target data passes the legality check according to the check logic of the office system, the method further includes: If the target data passes the legality check, then the associated attribute field of the target data is added to the corresponding column in the target table; Determining whether the associated attribute field of the target data passes the legality check according to the verification logic of the office system; If the associated attribute field of the target data fails to pass the legality check, the target data and the associated attribute field of the target data are deleted in the target table.
7. The method for pasting electronic table contents according to claim 5, characterized in that: After deleting the target data in the target table, the method further includes: Generate paste failure information corresponding to the target data; wherein the paste failure information includes location information of the target data in the electronic form.
8. A device for pasting electronic table contents, characterized in that: The device comprises: A content reading module, used for reading table contents from a clipboard; wherein the table contents are obtained by copying the data in the electronic table column by column; a formatting processing module, used for determining the data type corresponding to the column where the table content is located, and performing corresponding text formatting processing on the table content according to the data type to obtain target data; wherein the office system has different parameters from the electronic form, and the parameters include any one or a combination of any several items of data format, interface and parsing logic; there is a text formatting processing method corresponding to each data type in the office system, and the target data complies with the input rules of the office system; the data types of each column in the electronic form are the same, and each data type has its corresponding field arrangement rule; A pasting module is used to paste the target data into a corresponding column in a target table according to the data type; wherein the target table is a table in an office system for entering data.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for pasting electronic table contents as claimed in any one of claims 1 to 7 when calling the computer program in the memory.
10. A storage medium, characterized in that: The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the method for pasting electronic table content as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Smarter copy / paste
CN110520859A
Data verification method and device, electronic equipment and storage medium
CN113435170A