CN112329407A - Method and device for adding data in table and electronic equipment - Google Patents

Method and device for adding data in table and electronic equipment Download PDF

Info

Publication number
CN112329407A
CN112329407A CN201910715689.9A CN201910715689A CN112329407A CN 112329407 A CN112329407 A CN 112329407A CN 201910715689 A CN201910715689 A CN 201910715689A CN 112329407 A CN112329407 A CN 112329407A
Authority
CN
China
Prior art keywords
data
added
preset
separators
symbol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910715689.9A
Other languages
Chinese (zh)
Inventor
薛俊峰
罗志城
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201910715689.9A priority Critical patent/CN112329407A/en
Publication of CN112329407A publication Critical patent/CN112329407A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The embodiment of the invention provides a method, a device and electronic equipment for adding data in a table, wherein the method comprises the following steps: identifying the data to be added according to preset symbols aiming at the data to be added which needs to be added into the table to obtain each preset symbol contained in the data to be added; splitting the data to be added according to the obtained preset symbols to obtain split data, wherein the split data comprises: data before the first preset symbol, data between every two adjacent preset symbols and data after the last preset symbol; and adding each split data into each cell of the table created in the document. By adopting the scheme provided by the embodiment of the invention, the editing process of adding data in the table of the document is simplified, and the document editing efficiency is improved.

Description

Method and device for adding data in table and electronic equipment
Technical Field
The present invention relates to the field of document technology in the field of computer technology, and in particular, to a method and an apparatus for adding data to a table, an electronic device, and a storage medium.
Background
Currently, in editing a document, a table may be created in the document, and data may be added to the table, where each cell in the table may be used to store a corresponding data block. When data is added, the data may be written directly into the cells of the table or copied into the cells of the table.
In practical application, some data in a document often needs to be added to a table in the document, and at present, document editors usually manually split the data and copy each split data into each cell of the table.
Because document editors are required to manually split data and copy each split data into each cell of the table in sequence, the process of adding data into the table is complex, and the efficiency is low.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method, an apparatus, an electronic device and a storage medium for adding data in a table, so as to solve the problems of the prior art that the process of adding data in a table of a document is complicated and the efficiency is low.
In order to achieve the above object, an embodiment of the present invention provides a method for adding data in a table, and the specific technical solution is as follows:
aiming at data to be added which needs to be added into a table, identifying the data to be added according to preset symbols to obtain each preset symbol contained in the data to be added;
splitting the data to be added according to the obtained preset symbols to obtain split data, wherein the split data comprises: data before the first preset symbol, data between every two adjacent preset symbols and data after the last preset symbol;
and adding the split data into each cell of the table created in the document.
Further, before the data to be added, which needs to be added to the table, is identified according to a preset symbol, the method further includes:
after data to be added which needs to be added into a table is copied to a starting cell of the established table, a splitting option for splitting the data to be added is displayed;
the method for identifying the data to be added according to the preset symbols aiming at the data to be added which needs to be added into the table comprises the following steps:
and after the splitting option is triggered to operate, identifying the data to be added according to a preset symbol.
Further, before the data to be added, which needs to be added to the table, is identified according to a preset symbol, the method further includes:
after receiving an operation for indicating that data to be added is copied to a created table, displaying a splitting option for splitting the data to be added;
the method for identifying the data to be added according to the preset symbols aiming at the data to be added which needs to be added into the table comprises the following steps:
and after the splitting option is triggered to operate, identifying the data to be added according to a preset symbol.
Further, the identifying the data to be added according to a preset symbol for the data to be added which needs to be added into the table includes:
and aiming at the data to be added which needs to be added into the table, identifying the data to be added according to a preset symbol and the sequence from left to right, from top to bottom.
Further, the identifying the data to be added according to a preset symbol for the data to be added which needs to be added into the table includes:
identifying the data to be added according to separators and line breaks aiming at the data to be added which needs to be added into the table to obtain the separators and the line breaks contained in the data to be added;
the adding the split data to each cell of the created table in the document respectively includes:
and respectively adding the split data into each cell of a table created in a document according to a preset adding rule, wherein the preset adding rule is that the data before and after the separator is added into the same row of cells of the table, and the data before and after the line-changing character is added into different rows of cells of the table.
Further, before the step of adding the split data to the cells of the table created in the document according to the preset adding rule, the method further includes:
adding the sum of 1 to the obtained line feed character number to determine the number of the target lines;
adding a sum value of 1 to the maximum number of separators in each group of separators to determine the number of the target columns, wherein the separator before the first line feed character is used as a group of separators, the separator between every two adjacent line feed characters is used as a group of separators, and the separator after the last line feed character is used as a group of separators;
and creating a table according to the target row number and the target column number, or adjusting the row number and the column number of the table to be the target row number and the target column number respectively when the row number of the created table is equal to the target row number and the column number of the table is not equal to the target column number.
In order to achieve the above object, an embodiment of the present invention further provides an apparatus for adding data to a table, including:
the symbol identification module is used for identifying the data to be added according to preset symbols aiming at the data to be added which needs to be added into the table to obtain each preset symbol contained in the data to be added;
a data splitting module, configured to split the data to be added according to the obtained preset symbols, so as to obtain split data, where the split data includes: data before the first preset symbol, data between every two adjacent preset symbols and data after the last preset symbol;
and the data adding module is used for respectively adding the split data into each cell of the table created in the document.
Further, the apparatus further includes:
the display module is used for displaying a splitting option which represents splitting of the data to be added after the data to be added which needs to be added into the table is copied to a starting cell of the established table;
the symbol identification module is specifically configured to identify the data to be added according to a preset symbol after the splitting option is triggered to operate.
Further, the apparatus further includes:
the display module is used for displaying a splitting option which represents that the data to be added is split after receiving an operation for indicating that the data to be added is copied to the established table;
the symbol identification module is specifically configured to identify the data to be added according to a preset symbol after the splitting option is triggered to operate.
Further, the symbol recognition module is specifically configured to, for data to be added that needs to be added to the table, recognize the data to be added according to a preset symbol and an order from left to right, from top to bottom.
Further, the symbol identification module is specifically configured to identify, according to separators and line breaks, data to be added to a table, to obtain the separators and the line breaks included in the data to be added;
the data adding module is specifically configured to add each split data to each cell of a table created in a document according to a preset adding rule, where the preset adding rule is that data before and after a separator is added to a same row of cells of the table, and data before and after a line feed character is added to different rows of cells of the table.
Further, the apparatus further includes:
the table creation module is used for adding a sum value of 1 to the obtained number of the line feed characters to determine the number of the target lines;
adding a sum value of 1 to the maximum number of separators in each group of separators to determine the number of the target columns, wherein the separator before the first line feed character is used as a group of separators, the separator between every two adjacent line feed characters is used as a group of separators, and the separator after the last line feed character is used as a group of separators; and creating a table according to the target row number and the target column number, or adjusting the row number and the column number of the table to be the target row number and the target column number respectively when the row number of the created table is equal to the target row number and the column number of the table is not equal to the target column number.
In order to achieve the above object, an embodiment of the present invention provides an electronic device, which includes a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface are configured to complete communication between the memory and the processor through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement any of the above-described methods for adding data to a table when executing a program stored in the memory.
In order to achieve the above object, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements any one of the above methods for adding data to a table.
The embodiment of the invention has the following beneficial effects:
the method for adding data into the table provided by the embodiment of the invention is used for identifying the data to be added according to the preset symbols aiming at the data to be added which needs to be added into the table to obtain each preset symbol contained in the data to be added, splitting the data to be added according to each obtained preset symbol to obtain each split data, and respectively adding each split data into each cell of the table which is created in a document. By adopting the scheme provided by the embodiment of the invention, the data to be added is automatically split by identifying each preset symbol of the data to be added and according to each preset symbol obtained by identification, and each split data is automatically and respectively added into each cell of the table created in the document, so that the editing process of adding data in the table is simplified, and the document editing efficiency is improved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a first flowchart of a method for adding data to a table according to an embodiment of the present invention;
FIG. 2 is a second flowchart of a method for adding data to a table according to an embodiment of the present invention;
fig. 3a is a schematic diagram of data to be added in a method for adding data in a table according to an embodiment of the present invention;
FIG. 3b is a schematic diagram of an adding process in the method for adding data in a table according to the embodiment of the present invention;
fig. 3c is a schematic diagram illustrating an effect after the addition is finished in the method for adding data in a table according to the embodiment of the present invention;
FIG. 4 is a first structural diagram of an apparatus for adding data to a table according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a second structure of an apparatus for adding data to a table according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a method for adding data in a table, which comprises the following steps as shown in figure 1:
step 101, identifying data to be added according to preset symbols aiming at the data to be added which needs to be added into the table, and obtaining each preset symbol contained in the data to be added.
Step 102, splitting the data to be added according to the obtained preset symbols to obtain split data, wherein the split data comprises: data before the first preset symbol, data between every two adjacent preset symbols, and data after the last preset symbol.
And 103, adding each split data into each cell of the table created in the document respectively.
By adopting the method for adding data into the table provided by the embodiment of the invention, the data to be added is automatically split by identifying each preset symbol of the data to be added and according to each preset symbol obtained by identification, and each split data is automatically and respectively added into each cell of the table created in the document, so that the editing process of adding data into the table is simplified, and the document editing efficiency is improved.
The method and apparatus of the present invention will be described in detail with reference to the accompanying drawings using specific embodiments.
In an embodiment of the present invention, as shown in fig. 2, a method for adding data in a table provided in an embodiment of the present invention may include the following steps:
step 201, showing a splitting option representing splitting the data to be added.
In this step, after the data to be added, which needs to be added to the table, is copied to the initial cell of the created table, a splitting option representing splitting the data to be added is displayed; or after receiving an operation for instructing to copy the data to be added to the created table, showing a splitting option for splitting the data to be added.
In the embodiment of the present invention, as shown in fig. 3a, for a table already created in a document, a user may copy data to be added to a start cell of the table already created when the data to be added needs to be copied to the table, and after copying, as shown in fig. 3b, a splitting option representing splitting the data to be added is shown, which may specifically be "intelligent branch table" shown in fig. 3 b;
the user can select all cells of the created table and copy the data to be added to the selected table when the data to be added needs to be copied to the table according to the table created in the document, and after the user executes the operation, a splitting option showing that the data to be added is split is displayed.
Step 202, after the splitting option is triggered to operate, identifying the data to be added according to the preset symbols to obtain each preset symbol contained in the data to be added.
In this step, the data to be added may be identified according to a preset symbol, and from left to right, from top to bottom.
In a possible embodiment, the preset symbol may include a separator and a line break, and in this step, the data to be added is identified according to the preset symbol, so that each separator and each line break included in the data to be added can be obtained.
When the predetermined symbol includes separators and line breaks, as shown in fig. 3a and 3b, separators between "131" and "132", separators between "133" and "134", separators between "135" and "136", separators between "137" and "138", and separators between "139" and "140" are identified, and line breaks after "132", "134", "136", and "138" are identified.
In one possible implementation, as shown in FIG. 3b, the user may trigger the split option by clicking on the split option "Smart tabs".
And 203, splitting the data to be added according to the obtained preset symbols to obtain the split data.
In this step, the obtained data after splitting includes: data before the first preset symbol, data between every two adjacent preset symbols, and data after the last preset symbol.
When the preset symbol comprises a separator and a line break, wherein the separator can be used for splitting different data in the same line, and a separator exists between two different data in the same line; the linebreaks may be used to split the data of different lines, one being present after the last data of each line of the last line.
As shown in fig. 3a and 3b, each data after splitting includes: "131", "132", "133", "134", "135", "136", "137", "138", "139" and "140".
According to the embodiment of the invention, the automatic splitting of the data to be added is realized according to the separator and the line feed character identified from the data to be added.
And step 204, determining the number of the target rows and the number of the target columns based on the number of the obtained preset symbols.
In this step, when the preset symbol includes a separator and a line break, the sum of 1 may be added to the obtained number of line breaks to determine the target line number;
the target column number may be determined by adding a sum of 1 to the maximum number of separators in each group of separators, where the separator before the first identified line break is used as a group of separators, the separator after the last identified line break is used as a group of separators, and the separator between every two adjacent identified line breaks is used as a group of separators.
In this step, after obtaining a plurality of groups of separators whose group number is the sum of the number of line feed characters plus 1, the number of separators included in the obtained plurality of groups of separators is compared, the maximum number of separators in each group of separators is determined therefrom, and the sum of the determined maximum number of separators plus 1 is determined as the target number of columns.
Step 205, creating a table according to the target row number and the target column number, or adjusting the row number and the column number of the created table to be the target row number and the target column number, respectively.
In this step, if no table has been created in the document, a table having the target number of rows and the target number of columns may be automatically created in the document.
If a table has been created in the document, but when the number of rows of the created table is not equal to the target number of rows; or when the number of columns of the created table is not equal to the target number of columns; or when the number of rows of the created table is not equal to the target number of rows, and the number of columns of the created table is not equal to the target number of columns, the number of rows and the number of columns of the created table may be automatically adjusted, so that the number of rows and the number of columns of the created table are the target number of rows and the target number of columns, respectively.
In one possible embodiment, as shown in fig. 3b, according to steps 201 to 204, a target row number of 5, a target column number of 2, and a user created table with a row number of 2 and a column number of 2 may be obtained, and the number of rows of the created table is not equal to the target row number, and the number of rows of the created table may be automatically adjusted to the target row number of 5.
And step 206, according to a preset adding rule, adding each split data into each cell of the table created in the document respectively.
In this step, when the preset symbol includes a separator and a line break, the preset adding rule may be to add data before and after the separator to a same line cell of the table and to add data before and after the line break to different line cells of the table.
In one possible implementation, as shown in fig. 3b, for the identified data "131", "132", "133", "134", "135", "136", "137", "138", "139" and "140", adding "131" thereof to the first cell of the first row of the table, adding "132" thereof to the second cell of the first row of the table, adding "133" thereof to the first cell of the second row of the table, adding "134" thereof to the second cell of the second row of the table, adding "135" thereof to the first cell of the third row of the table, adding "136" thereof to the second cell of the third row of the table, adding "137" thereof to the first cell of the fourth row of the table, adding "138" thereof to the second cell of the fourth row of the table, add "139" to the first cell in the fifth row of the table and "140" to the second cell in the fifth row of the table. The effect after the end of the addition can be shown in fig. 3 c.
By adopting the scheme provided by the embodiment of the invention, the data to be added is automatically split by identifying each preset symbol of the data to be added and according to each preset symbol obtained by identification, and each split data is automatically and respectively added into each cell of the table created in the document, so that the editing process of adding data in the table is simplified, and the document editing efficiency is improved.
Based on the same inventive concept, according to the method for adding data to a table provided in the above embodiment of the present invention, correspondingly, another embodiment of the present invention further provides an apparatus for adding data to a table, a schematic structural diagram of which is shown in fig. 4, and specifically includes:
the symbol identification module 401 is configured to identify, according to a preset symbol, to-be-added data to be added to a table, to obtain each preset symbol included in the to-be-added data;
a data splitting module 402, configured to split the data to be added according to the obtained preset symbols, so as to obtain each split data, where each split data includes: data before the first preset symbol, data between every two adjacent preset symbols and data after the last preset symbol;
and a data adding module 403, configured to add each piece of split data to each cell of a table created in the document.
Therefore, by adopting the device for adding data into the table provided by the embodiment of the invention, the data to be added is automatically split by identifying each preset symbol of the data to be added and according to each preset symbol obtained by identification, and each split data is automatically and respectively added into each cell of the table created in the document, so that the editing process of adding data into the table is simplified, and the document editing efficiency is improved.
Further, as shown in fig. 5, the apparatus for adding data to the table further includes:
a display module 501, configured to display a splitting option representing that data to be added is split after the data to be added that needs to be added to the table is copied to a starting cell of the created table;
the symbol recognition module 401 is specifically configured to, after the splitting option is triggered to operate, recognize data to be added according to a preset symbol.
Further, as shown in fig. 5, the apparatus for adding data to the table further includes:
a display module 501, configured to display a splitting option representing that data to be added is split after receiving an operation for instructing to copy the data to be added to a created table;
the symbol recognition module 401 is specifically configured to, after the splitting option is triggered to operate, recognize data to be added according to a preset symbol.
Further, the symbol recognition module 401 is specifically configured to, for data to be added that needs to be added to the table, recognize the data to be added according to a preset symbol and an order from left to right, from top to bottom.
Further, the symbol identification module 401 is specifically configured to identify, according to the separator and the line break, data to be added to the table, to obtain each separator and each line break included in the data to be added;
the data adding module 403 is specifically configured to add each split data to each cell of a table created in a document according to a preset adding rule, where the preset adding rule is that data before and after a separator is added to a same row of cells of the table, and data before and after a line feed separator is added to different rows of cells of the table.
Further, as shown in fig. 5, the apparatus for adding data to the table further includes:
a table creating module 502, configured to add a sum of 1 to the obtained number of line breaks to determine the number of the target lines; adding a sum value of 1 to the maximum number of separators in each group of separators to determine the number of the target columns, wherein the separator before the first line feed character is used as a group of separators, the separator between every two adjacent line feed characters is used as a group of separators, and the separator after the last line feed character is used as a group of separators; and creating a table according to the target row number and the target column number, or adjusting the row number and the column number of the table to be the target row number and the target column number respectively when the row number and the target row number of the created table and the column number of the table are not equal to the target column number.
Based on the same inventive concept, according to the method for adding data in the table provided by the above embodiment of the present invention, correspondingly, another embodiment of the present invention further provides an electronic device, referring to fig. 6, the electronic device according to the embodiment of the present invention includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604.
A memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
identifying the data to be added according to preset symbols aiming at the data to be added which needs to be added into the table to obtain each preset symbol contained in the data to be added;
splitting the data to be added according to the obtained preset symbols to obtain split data, wherein the split data comprises: data before the first preset symbol, data between every two adjacent preset symbols and data after the last preset symbol;
and adding each split data into each cell of the table created in the document.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above methods for adding data to a table.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above-described methods of adding data to a table.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device, the electronic apparatus and the storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1. A method of adding data to a table, comprising:
aiming at data to be added which needs to be added into a table, identifying the data to be added according to preset symbols to obtain each preset symbol contained in the data to be added;
splitting the data to be added according to the obtained preset symbols to obtain split data, wherein the split data comprises: data before the first preset symbol, data between every two adjacent preset symbols and data after the last preset symbol;
and adding the split data into each cell of the table created in the document.
2. The method according to claim 1, before identifying the data to be added according to a preset symbol for the data to be added which needs to be added into the table, further comprising:
after data to be added which needs to be added into a table is copied to a starting cell of the established table, a splitting option for splitting the data to be added is displayed;
the method for identifying the data to be added according to the preset symbols aiming at the data to be added which needs to be added into the table comprises the following steps:
and after the splitting option is triggered to operate, identifying the data to be added according to a preset symbol.
3. The method according to claim 1, before identifying the data to be added according to a preset symbol for the data to be added which needs to be added into the table, further comprising:
after receiving an operation for indicating that data to be added is copied to a created table, displaying a splitting option for splitting the data to be added;
the method for identifying the data to be added according to the preset symbols aiming at the data to be added which needs to be added into the table comprises the following steps:
and after the splitting option is triggered to operate, identifying the data to be added according to a preset symbol.
4. The method according to claim 1, wherein the identifying the data to be added according to a preset symbol for the data to be added which needs to be added into the table comprises:
and aiming at the data to be added which needs to be added into the table, identifying the data to be added according to a preset symbol and the sequence from left to right, from top to bottom.
5. The method according to claim 1, wherein the identifying the data to be added according to a preset symbol for the data to be added which needs to be added into the table comprises:
identifying the data to be added according to separators and line breaks aiming at the data to be added which needs to be added into the table to obtain the separators and the line breaks contained in the data to be added;
the adding the split data to each cell of the created table in the document respectively includes:
and respectively adding the split data into each cell of a table created in a document according to a preset adding rule, wherein the preset adding rule is that the data before and after the separator is added into the same row of cells of the table, and the data before and after the line-changing character is added into different rows of cells of the table.
6. The method according to claim 5, before the adding the split data into cells of a table created in a document according to a preset adding rule, further comprising:
adding the sum of 1 to the obtained line feed character number to determine the number of the target lines;
adding a sum value of 1 to the maximum number of separators in each group of separators to determine the number of the target columns, wherein the separator before the first line feed character is used as a group of separators, the separator between every two adjacent line feed characters is used as a group of separators, and the separator after the last line feed character is used as a group of separators;
and creating a table according to the target row number and the target column number, or adjusting the row number and the column number of the table to be the target row number and the target column number respectively when the row number of the created table is equal to the target row number and the column number of the table is not equal to the target column number.
7. An apparatus for adding data to a table, comprising:
the symbol identification module is used for identifying the data to be added according to preset symbols aiming at the data to be added which needs to be added into the table to obtain each preset symbol contained in the data to be added;
a data splitting module, configured to split the data to be added according to the obtained preset symbols, so as to obtain split data, where the split data includes: data before the first preset symbol, data between every two adjacent preset symbols and data after the last preset symbol;
and the data adding module is used for respectively adding the split data into each cell of the table created in the document.
8. The apparatus of claim 7, further comprising:
the display module is used for displaying a splitting option which represents splitting of the data to be added after the data to be added which needs to be added into the table is copied to a starting cell of the established table;
the symbol identification module is specifically configured to identify the data to be added according to a preset symbol after the splitting option is triggered to operate.
9. The apparatus of claim 7, further comprising:
the display module is used for displaying a splitting option which represents that the data to be added is split after receiving an operation for indicating that the data to be added is copied to the established table;
the symbol identification module is specifically configured to identify the data to be added according to a preset symbol after the splitting option is triggered to operate.
10. The apparatus according to claim 7, wherein the symbol recognition module is specifically configured to, for data to be added that needs to be added to the table, recognize the data to be added according to a preset symbol and from left to right, from top to bottom.
11. The apparatus according to claim 7, wherein the symbol identification module is specifically configured to identify, for data to be added that needs to be added to a table, the data to be added according to separators and line breaks, to obtain the separators and the line breaks included in the data to be added;
the data adding module is specifically configured to add each split data to each cell of a table created in a document according to a preset adding rule, where the preset adding rule is that data before and after a separator is added to a same row of cells of the table, and data before and after a line feed character is added to different rows of cells of the table.
12. The apparatus of claim 11, further comprising:
the table creation module is used for adding a sum value of 1 to the obtained number of the line feed characters to determine the number of the target lines; adding a sum value of 1 to the maximum number of separators in each group of separators to determine the number of the target columns, wherein the separator before the first line feed character is used as a group of separators, the separator between every two adjacent line feed characters is used as a group of separators, and the separator after the last line feed character is used as a group of separators; and creating a table according to the target row number and the target column number, or adjusting the row number and the column number of the table to be the target row number and the target column number respectively when the row number of the created table is equal to the target row number and the column number of the table is not equal to the target column number.
13. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN201910715689.9A 2019-08-05 2019-08-05 Method and device for adding data in table and electronic equipment Pending CN112329407A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910715689.9A CN112329407A (en) 2019-08-05 2019-08-05 Method and device for adding data in table and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910715689.9A CN112329407A (en) 2019-08-05 2019-08-05 Method and device for adding data in table and electronic equipment

Publications (1)

Publication Number Publication Date
CN112329407A true CN112329407A (en) 2021-02-05

Family

ID=74319724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910715689.9A Pending CN112329407A (en) 2019-08-05 2019-08-05 Method and device for adding data in table and electronic equipment

Country Status (1)

Country Link
CN (1) CN112329407A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116029267A (en) * 2023-02-08 2023-04-28 信利光电股份有限公司 Excel data typesetting processing method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436177A (en) * 2008-12-15 2009-05-20 北大方正集团有限公司 Method and apparatus for importing data film to form
CN102799574A (en) * 2012-06-29 2012-11-28 无锡永中软件有限公司 Data partitioning and merging method for electronic forms
CN105630916A (en) * 2015-12-21 2016-06-01 浙江工业大学 Method for extracting and organizing unstructured sheet document data under big data environment
CN108763382A (en) * 2018-05-18 2018-11-06 中铁山桥集团有限公司 A method of the chart content in CAD program is imported into Excel programs

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436177A (en) * 2008-12-15 2009-05-20 北大方正集团有限公司 Method and apparatus for importing data film to form
CN102799574A (en) * 2012-06-29 2012-11-28 无锡永中软件有限公司 Data partitioning and merging method for electronic forms
CN105630916A (en) * 2015-12-21 2016-06-01 浙江工业大学 Method for extracting and organizing unstructured sheet document data under big data environment
CN108763382A (en) * 2018-05-18 2018-11-06 中铁山桥集团有限公司 A method of the chart content in CAD program is imported into Excel programs

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116029267A (en) * 2023-02-08 2023-04-28 信利光电股份有限公司 Excel data typesetting processing method, device and storage medium

Similar Documents

Publication Publication Date Title
CN105868166B (en) Regular expression generation method and system
CN103530127A (en) Icon display method and device
CN110990010A (en) Software interface code generation method and device
CN112528703B (en) Method and device for identifying table structure and electronic equipment
CN104899203B (en) Webpage generation method and device and terminal equipment
CN114359533B (en) Page number identification method based on page text and computer equipment
JP2019522847A (en) Method, device and terminal device for extracting data
CN112329407A (en) Method and device for adding data in table and electronic equipment
CN112329409B (en) Cell color conversion method and device and electronic equipment
EP3118731A1 (en) Method and electronic device for inputting character
CN110619116A (en) Data processing method, device, terminal and storage medium
CN110852045B (en) Method and device for deleting document content, electronic equipment and storage medium
CN112417830A (en) Document page management method and device, electronic equipment and storage medium
CN115935917A (en) Data processing method, device and equipment for visual chart and storage medium
CN113590549A (en) Questionnaire content importing and identifying method and device
CN107885839B (en) Method and device for reading information in Word file
CN112487759A (en) Document page number setting method and device, electronic equipment and storage medium
CN110930491B (en) Node rendering method, node rendering device, electronic equipment and storage medium
CN113010812B (en) Information acquisition method, device, electronic equipment and storage medium
CN113435166B (en) Underline method and system, computer device and readable storage medium
CN110825726B (en) Block chain data detection method, device and equipment
CN112949266B (en) Electronic form processing method, electronic form processing device, electronic equipment and storage medium
CN112181240B (en) Information display method and device
CN112783400B (en) Document content selection method and device, electronic equipment and storage medium
CN112395829B (en) Method and device for adding Chinese numbers to documents and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination