CN109213978A - A kind of method, apparatus of Merge Cells, electronic equipment and readable storage medium storing program for executing - Google Patents
A kind of method, apparatus of Merge Cells, electronic equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN109213978A CN109213978A CN201710533329.8A CN201710533329A CN109213978A CN 109213978 A CN109213978 A CN 109213978A CN 201710533329 A CN201710533329 A CN 201710533329A CN 109213978 A CN109213978 A CN 109213978A
- Authority
- CN
- China
- Prior art keywords
- cell
- combined
- lattice
- row
- column
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/174—Form filling; Merging
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention provides a kind of methods of Merge Cells, device, electronic equipment and readable storage medium storing program for executing, wherein, this method comprises: determining the row to be combined or column to be combined in pending data table, in row to be combined or column to be combined, it is not that empty cell is determined as the 1st reference cell lattice by first content, the Set cell for meeting the first preset condition is determined as the n-th reference cell lattice, it is the (n-1)th Merge Cells by the cell span before the (n-1)th reference cell lattice to the n-th reference cell lattice, it is the n-th Merge Cells by cell span of the n-th reference cell lattice to before terminating cell, the tables of data that obtains that treated, a kind of method of the Merge Cells provided through the embodiment of the present invention, device, electronic equipment and readable storage medium storing program for executing, the operation manually merged can be reduced, save people Power cost, also, can be realized correct Merge Cells there are when the cell that content is sky in row to be combined or column to be combined.
Description
Technical field
The present invention relates to technical field of data processing, set more particularly to a kind of method, apparatus of Merge Cells, electronics
Standby and readable storage medium storing program for executing.
Background technique
With the development of computer technology, computer is more more and more universal in the work, life of people.Pass through papery in the past
Mode record, the mode that manages data is also gradually replaced by computer generation.
When people manage data using the spreadsheet software in computer, electricity can be entered data into or imported
In sub-table software, wherein every data can be stored in spreadsheet software in a manner of row or column.In order to facilitate classification
It checks, user often merges processing to the identical cell of content.
But in the prior art, it when merging the cell in electrical form, needs manually to close cell
And handle, in the case where data volume is big, the operation manually merged will be comparatively laborious.
Summary of the invention
It a kind of method, apparatus for being designed to provide Merge Cells of the embodiment of the present invention, electronic equipment and readable deposits
Storage media saves human cost to realize the operation for reducing and manually merging.Specific technical solution is as follows:
In a first aspect, the embodiment of the invention provides a kind of methods of Merge Cells, which comprises
Determine the row to be combined or column to be combined in pending data table, wherein include in row to be combined or column to be combined
The identical and connected cell of at least two contents, or, in row to be combined or column to be combined include at least one content be it is empty
Cell;
It is not that empty cell is determined as the 1st reference cell lattice by first content in row to be combined or column to be combined,
The Set cell for meeting the first preset condition is determined as the n-th reference cell lattice, wherein the first preset condition is object element
Lattice content be not it is empty, different from previous cell content and different with the (n-1)th reference cell lattice content, n is the nature greater than 1
Number, Set cell are the cell in row to be combined or column to be combined after (n-1)th reference cell lattice;
It is the (n-1)th Merge Cells by the cell span before the (n-1)th reference cell lattice to the n-th reference cell lattice, it will
Cell span of the n-th reference cell lattice to before terminating cell is the n-th Merge Cells, the tables of data that obtains that treated,
Wherein, terminating cell is in row to be combined after n-th reference cell lattice, and column content is all empty cell, alternatively,
In column to be combined after n-th reference cell lattice, be expert at content is all empty cell.
Optionally, the row to be combined or column to be combined in pending data table are determined, comprising:
The row for meeting the second preset condition in pending data table is determined as row to be combined, alternatively, by pending data
The column for meeting the second preset condition in table are determined as column to be combined, wherein the second preset condition is in pending data table
With cell identical and connected there are at least two contents in a line or same row, or, same in pending data table
There are the cells that at least one content is sky in capable or same row.
Optionally, the row that the second preset condition is met in pending data table is being determined as row to be combined, alternatively, will be to
The column for meeting the second preset condition in processing tables of data are determined as after column to be combined, a kind of combining unit of the embodiment of the present invention
The method of lattice, further includes:
When there are more than two rows to be combined or column to be combined in pending data table, transmission carry row to be combined or
The request to be confirmed of the identification information of column to be combined is to user;
The confirmation message of acquisition and the identification information for carrying row to be combined or column to be combined according to user feedback determines
Row to be combined or the row to be combined or column to be combined to be combined being classified as comprising identification information in pending data table.
It optionally, is that the (n-1)th merging is single by the cell span before the (n-1)th reference cell lattice to the n-th reference cell lattice
Cell span of the n-th reference cell lattice to before terminating cell is the n-th Merge Cells by first lattice, comprising:
There are when the different cell of attribute in cell before the (n-1)th reference cell lattice to the n-th reference cell lattice,
The attribute that any content in cell before (n-1)th reference cell lattice to the n-th reference cell lattice is not empty cell is made
It, will be in the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice for the reference property of the (n-1)th Merge Cells
Hold the content for merging into the (n-1)th Merge Cells, by the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice
Attribute merges into the reference property of the (n-1)th Merge Cells;
In the n-th reference cell lattice there are when the different cell of attribute in the cell to before terminating cell, by n-th
Any content is not that the attribute of empty cell is determined as the n-th merging in cell before reference cell lattice to termination cell
The content of cell of the n-th reference cell lattice to before terminating cell is merged into the n-th merging list by the reference property of cell
The attribute of cell of the n-th reference cell lattice to before terminating cell is merged into the n-th Merge Cells by the content of first lattice
Reference property.
Optionally, which includes at least one of or combinations thereof: font, alignment thereof, retraction spacing, pattern, list
First sound of laughing formula.
Second aspect, the embodiment of the invention also provides a kind of device of Merge Cells, described device includes:
Ranks determining module, for determining row to be combined or column to be combined in pending data table, wherein row to be combined
Or include the identical and connected cell of at least two contents in column to be combined, or, including extremely in row to be combined or column to be combined
A few content is empty cell;
Reference cell lattice determining module, for not being empty list by first content in row to be combined or column to be combined
First lattice are determined as the 1st reference cell lattice, and the Set cell for meeting the first preset condition is determined as the n-th reference cell lattice,
In, the first preset condition be Set cell content be not it is empty, different from previous cell content and with the (n-1)th reference cell lattice
Content is different, and n is the natural number greater than 1, after Set cell is the (n-1)th reference cell lattice in row to be combined or column to be combined
Cell;
Merging module, for being (n-1)th by the cell span before the (n-1)th reference cell lattice to the n-th reference cell lattice
Cell span before n-th reference cell lattice to termination cell is the n-th Merge Cells, obtained everywhere by Merge Cells
Tables of data after reason, wherein terminating cell is in row to be combined after n-th reference cell lattice, and column content is all empty
Cell, alternatively, in column to be combined after n-th reference cell lattice, be expert at content is all empty cell.
Optionally, ranks determining module is specifically used for:
The row for meeting the second preset condition in pending data table is determined as row to be combined, alternatively, by pending data
The column for meeting the second preset condition in table are determined as column to be combined, wherein the second preset condition is in pending data table
With cell identical and connected there are at least two contents in a line or same row, or, same in pending data table
There are the cells that at least one content is sky in capable or same row.
Optionally, the device of a kind of Merge Cells of the embodiment of the present invention, further includes:
Sending module, when for there are more than two rows to be combined or column to be combined in pending data table, transmission is taken
The request to be confirmed of identification information with row to be combined or column to be combined is to user;
Module is obtained, for obtaining and according to the identification information for carrying row to be combined or column to be combined of user feedback
Confirmation message determines the row to be combined in pending data table or the row to be combined to be combined being classified as comprising identification information or wait close
Side by side.
Optionally, merging module is specifically used for:
There are when the different cell of attribute in cell before the (n-1)th reference cell lattice to the n-th reference cell lattice,
The attribute that any content in cell before (n-1)th reference cell lattice to the n-th reference cell lattice is not empty cell is made
It, will be in the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice for the reference property of the (n-1)th Merge Cells
Hold the content for merging into the (n-1)th Merge Cells, by the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice
Attribute merges into the reference property of the (n-1)th Merge Cells;
In the n-th reference cell lattice there are when the different cell of attribute in the cell to before terminating cell, by n-th
Any content is not that the attribute of empty cell is determined as the n-th merging in cell before reference cell lattice to termination cell
The content of cell of the n-th reference cell lattice to before terminating cell is merged into the n-th merging list by the reference property of cell
The attribute of cell of the n-th reference cell lattice to before terminating cell is merged into the n-th Merge Cells by the content of first lattice
Reference property.
Optionally, which includes at least one of or combinations thereof: font, alignment thereof, retraction spacing, pattern, list
First sound of laughing formula.
The third aspect, the embodiment of the invention also provides a kind of electronic equipment, comprising: processor, communication interface, memory
And communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes that the first aspect of the embodiment of the present invention provides
Method and step;
Communication interface carries out data exchange for electronic equipment and external equipment.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage medium, computer-readable storage mediums
It is stored with computer program in matter, realizes what the first aspect of the embodiment of the present invention provided when computer program is executed by processor
Method and step.
Method, apparatus, electronic equipment and the readable storage medium storing program for executing of a kind of Merge Cells provided in an embodiment of the present invention lead to
The row to be combined or column to be combined determined in pending data table is crossed, then determines reference cell lattice, then by the (n-1)th reference cell
Cell span before lattice to the n-th reference cell lattice is the (n-1)th Merge Cells, by the n-th reference cell lattice to terminating unit
Cell span before lattice is the n-th Merge Cells, it is possible to reduce the operation manually merged, saving human cost, also,
There are when the cell that content is sky in row to be combined or column to be combined, it can be realized correct Merge Cells.Certainly, implement this
Any product or method of invention do not necessarily require achieving all the advantages described above at the same time.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow chart of the first embodiment of the method for Merge Cells of the embodiment of the present invention;
Fig. 2 is a kind of flow chart of second of embodiment of the method for Merge Cells of the embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of the device of Merge Cells of the embodiment of the present invention;
Fig. 4 is that a kind of method of Merge Cells of the embodiment of the present invention is applied to the structural schematic diagram of electronic equipment.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Of the existing technology in order to solve the problems, such as, the embodiment of the invention provides a kind of methods of Merge Cells, dress
It sets, electronic equipment and readable storage medium storing program for executing, to reduce the operation manually merged, saves human cost.
In the following, a kind of method of Merge Cells of the embodiment of the present invention is introduced, as shown in Figure 1, for the present invention
A kind of flow chart of the first embodiment of the method for Merge Cells of embodiment, this method may include:
S101 determines row to be combined or column to be combined in pending data table.
It wherein, include the identical and connected cell of at least two contents in row to be combined or column to be combined, or, to be combined
It include the cell that at least one content is sky in column capable or to be combined.The pending data table can be the electricity in office software
Sub-table.
In pending data table with the cell that often there is identical content in a line or same row, can also exist
Content is empty cell, is checked in order to facilitate classification, user can merge the cell in same a line or same row
Processing, therefore, can determine the row to be combined or column to be combined in pending data table first here.
But in a line or same row, there are the cell of identical content rows not necessarily to be combined or to be combined
Column, in order to guarantee that the device of Merge Cells of the embodiment of the present invention can correctly determine row to be combined or column to be combined.This step
Row to be combined or column to be combined in rapid may include the identical and connected cell of at least two contents, or, row to be combined or
It include the cell that at least one content is sky in column to be combined.
It, can be according to number to be processed in a kind of method Merge Cells of Merge Cells of the application embodiment of the present invention
It merges, can also be merged according to the column in pending data table according to the row in table, therefore, here it is possible to first really
Determine the row to be combined or column to be combined in pending data table.
Specifically, the identification information for the row to be combined or column to be combined that can be inputted according to user determines pending data table
In row to be combined or column to be combined, can also by tables of data to be processed every row or each column carry out analysis determine wait close
Column parallel or to be combined.
It should be understood that the row to be combined in the embodiment of the present invention can be at least a line, column to be combined can be to
Few column.
For a kind of clearer explanation method of Merge Cells provided in an embodiment of the present invention, illustrate below
It is bright.
It is assumed that pending data table is the electrical form in office software, " row can be previously provided in the electrical form
Merging ", " column merge ", " Merge Cells " three buttons, which can respectively correspond three kinds of different instructions, user
Any one of three buttons button can be clicked.
For example, user can select the row to be merged, the button of " merging rows ", the merging of the embodiment of the present invention are then clicked
The device of cell can receive the identification information for carrying selected combined row corresponding with " merging rows " button
Instruction, so that it is determined that row to be combined;
The button of " merging rows " can also be clicked directly on, the device of the Merge Cells of the embodiment of the present invention can receive
To after the instruction of merging rows corresponding with " merging rows " button, the row of the electrical form can be analyzed, obtaining can be into
Then the combined row of row sends the request to be confirmed for carrying the identification information for the row that can be merged to user, Yong Huke
To input the identification information for the row to be merged, the row to be merged, the merging list of the embodiment of the present invention can also be selected
The device of first lattice can determine row to be combined according to the identification information or selected row that user inputs.
In another example user can also select the column to be merged, the button of " merging column " is then clicked, the embodiment of the present invention
The device of Merge Cells, which can receive the mark for carrying selected combined column corresponding with " merge and arrange " button, to be believed
The instruction of breath, so that it is determined that column to be combined;
The button of " merging column " can also be clicked directly on, the device of the Merge Cells of the embodiment of the present invention can receive
To after the instruction for merging column corresponding with " merge arrange " button, the column of the electrical form can be analyzed, obtaining can be into
Then the combined column of row send the request to be confirmed for carrying the identification information for the column that can be merged to user, Yong Huke
To input the identification information for the column to be merged, the column to be merged, the merging list of the embodiment of the present invention can also be selected
The device of first lattice can determine column to be combined according to the identification information or selected column that user inputs.
User can also click directly on the button of " Merge Cells ", and the device of the Merge Cells of the embodiment of the present invention can
With after the instruction for receiving Merge Cells corresponding with the button of " Merge Cells ", in tables of data to be processed row and
Column are analyzed respectively, determine row to be combined or column to be combined.
By determining row to be combined or column to be combined in pending data table, in the subsequent step of the embodiment of the present invention
In, it can only treat merging rows or column to be combined are handled, other row or column in tables of data to be processed not handled,
The time consumed by Merge Cells can be reduced, further, it is possible to reduce the occupancy to the memory of hardware device, improves processing speed
Degree.
First content is not that empty cell is determined as the 1st benchmark list in row to be combined or column to be combined by S102
The Set cell for meeting the first preset condition is determined as the n-th reference cell lattice by first lattice.
Wherein, it is not empty, different from previous cell content and with (n-1)th that the first preset condition, which is Set cell content,
Reference cell lattice content is different, and n is the natural number greater than 1, and Set cell is the (n-1)th benchmark in row to be combined or column to be combined
Cell after cell.
Here, reference cell lattice are in the next steps, the cell treated in merging rows or column to be combined to be closed
And when, merging benchmark is provided, the cell in row to be combined or column to be combined is enable correctly to merge.
In pending data table, cell in the same row or the same column may include the cell of identical content,
Also it may include the cell of different content, can also be empty cell comprising content.But by the cell of identical content
It merges it is possible that mistake, therefore, correct in order to guarantee to carry out the cell in column to be combined or row to be combined
Merging treatment can determine the reference cell lattice in row to be combined or column to be combined by this step.
After determining row to be combined or column to be combined through the above steps, the unit in merging rows or column to be combined is being treated
When lattice merge, reference cell lattice can be determined first, can be treated on the basis of reference cell lattice in subsequent steps
Cell in merging rows or column to be combined merges.
Specifically, can not be that empty cell is determined as the 1st by first content in row to be combined or column to be combined
Content is not empty, target different from previous cell content and different with the (n-1)th reference cell lattice content by reference cell lattice
Cell is determined as the n-th reference cell lattice.
It, in this step, can will be in row to be combined first assuming that pass through step S101 it is confirmed that row to be combined
Hold and be not determined as the 1st reference cell lattice for empty cell, then can determine its for meeting the first preset condition in the row
His reference cell lattice, may thereby determine that all reference cell lattice of the row.
It should be noted that determining the method for all reference cell lattice in column to be combined and determining the institute in row to be combined
The method for having reference cell lattice is same or similar, and which is not described herein again.
By determining reference cell lattice, when treating the cell in merging rows or column to be combined and merging, Ke Yiwei
The cell merged, which provides, merges benchmark, improves the accuracy rate of Merge Cells.
Cell span before (n-1)th reference cell lattice to the n-th reference cell lattice is the (n-1)th combining unit by S103
Cell span of the n-th reference cell lattice to before terminating cell is the n-th Merge Cells by lattice, the number that obtains that treated
According to table.
Wherein, terminating cell is in row to be combined after n-th reference cell lattice, and column content is all empty unit
Lattice, alternatively, be expert at content is all empty cell in column to be combined after n-th reference cell lattice.
It should be noted that the merging in this step may include the merging to cell and the conjunction to content in cell
And.
It in this step, can be n-th-by the cell span before the (n-1)th reference cell lattice to the n-th reference cell lattice
Cell span before n-th reference cell lattice to termination cell is the n-th Merge Cells, obtained everywhere by 1 Merge Cells
Tables of data after reason, that is, the tables of data after Merge Cells.
Specifically, after determining each reference cell lattice, treats merging rows or when column to be combined merge, the present invention is implemented
Example provides two kinds of possible implementations:
It in one possible implementation, is row to be combined or column to be combined in the cell that first content is not sky
In first cell when, can treat in the following manner merging rows or it is to be combined column merge:
It is the (n-1)th Merge Cells by the cell span before the (n-1)th reference cell lattice to the n-th reference cell lattice, it will
Cell span of the n-th reference cell lattice to before terminating cell is the n-th Merge Cells, the tables of data that obtains that treated,
Here, n is the natural number greater than 1.
It is not empty cell in first content is not row to be combined or wait close in alternatively possible implementation
Side by side in first cell when, can be by the cell span before the first cell to the 2nd reference cell lattice
1st Merge Cells, other cells in the row to be combined or column to be combined can merge in the following manner:
It is the (n-1)th Merge Cells by the cell span before the (n-1)th reference cell lattice to the n-th reference cell lattice, it will
Cell span of the n-th reference cell lattice to before terminating cell is the n-th Merge Cells, the tables of data that obtains that treated,
Here, n is the natural number greater than 2.
It is assumed that pending data table is table 1, it is the schematic table of pending data table, in the table, first as shown in table 1
It is classified as determining column to be combined, the corresponding cell of first A is the 1st reference cell lattice, and the corresponding cell of first B is the
2 reference cell lattice, cell corresponding with C are the 3rd reference cell lattice.It, can when being merged to the cell in first row
With by the cell span before the 1st reference cell lattice to the 2nd reference cell lattice for the 1st Merge Cells, that is, by the column the
The cell span of a line to the 3rd row is the 1st Merge Cells.By the list before the 2nd reference cell lattice to the 3rd reference cell lattice
First lattice merge into the 2nd Merge Cells, that is, by the cell span of the 4th row to the 6th row in the column be the 2nd Merge Cells.It will
Cell span of the 3rd reference cell lattice to before terminating cell is the 3rd Merge Cells, wherein in the table, is terminated single
First lattice are in first row after the 3rd reference cell lattice, and be expert at content is all empty cell, that is, in the table, the termination
Cell is the corresponding cell of the 9th row of first row.It is available as shown in table 2 after executing union operation according to above-mentioned steps
The schematic table for tables of data that treated.In the schematic table, first is classified as determining column to be combined, cell corresponding with A
It is the 1st Merge Cells, cell corresponding with B is the 2nd Merge Cells, and cell corresponding with C is the 3rd combining unit
Lattice.
The schematic table of 1 pending data table of table
A | C |
A | D |
E | |
B | F |
B | G |
H | |
C | I |
J | |
The schematic table of treated the tables of data of table 2
A kind of method of Merge Cells provided in an embodiment of the present invention, it is to be combined in pending data table by determining
Column capable or to be combined, then determine reference cell lattice, then by the unit before the (n-1)th reference cell lattice to the n-th reference cell lattice
Lattice merge into the (n-1)th Merge Cells, are the n-th merging by cell span of the n-th reference cell lattice to before terminating cell
Cell, it is possible to reduce human cost is saved in the operation manually merged, also, in the presence of interior in row to be combined or column to be combined
When appearance is empty cell, it can be realized correct Merge Cells.
When implementing a kind of method of Merge Cells of the embodiment of the present invention, the embodiment of the invention provides two kinds of possibility
Implementation:
The first possible implementation (being illustrated here with column to be combined for a column):
After determining column to be combined, it can pass through in one reference cell lattice of determination every by the method for step S102
The method of step S103 closes the cell before the previous reference cell lattice to the reference cell lattice of the reference cell lattice
And, that is, while reference cell lattice are determined, while merging the cell in the column to be combined.
When merging the cell in column to be combined by the first possible implementation, amalgamation result can be carried out
Caching, after to column to be combined completion cell span, then the pending data table that exports that treated.
By the first possible implementation, can reduce while treat cell in merging rows or column to be combined into
Row merges bring load pressure, improves processing speed.
Second of possible implementation (being illustrated here with column to be combined for a column):
After determining column to be combined, in the column to be combined, the column to be combined can be determined by the method for step S102
In all reference cell lattice, then the cell in the column to be combined is merged by the method for step S103.
By second of possible implementation, the occupancy to spatial cache can be reduced, caching is reduced and occupies caching sky
Between time.
It should be noted that cell span method and the merging method of the cell in column to be combined in row to be combined
It is same or similar, can be cross-referenced, which is not described herein again.
Specifically, by tables of data to be processed every row or each column analyze, determine row to be combined or wait close
Side by side, may include:
The row for meeting the second preset condition in pending data table is determined as row to be combined, alternatively, by pending data
The column for meeting the second preset condition in table are determined as column to be combined.
Wherein, the second preset condition is that there are at least two contents in same a line or same row in pending data table
Identical and connected cell, or, there are at least one content being sky in same a line or same row in pending data table
Cell.
In this step, in pending data table with unit identical and connected there are at least two contents in a line
Lattice or when being empty cell there are at least one content, then the row is determined as row to be combined;
In the same row in pending data table the cell identical and connected there are at least two contents or exist extremely
When a few content is empty cell, then the column are determined as column to be combined.
By this step, the device that Merge Cells through the embodiment of the present invention may be implemented treats merging rows or wait close
Determination arranged side by side, can when only receiving merging rows, merging the instruction of column or Merge Cells, realize determine row to be combined or
Column to be combined, guarantee can correctly merge when merging to the cell in tables of data to be processed.
After determining the row to be combined or column to be combined in pending data table by the above method, in pending data table
When the middle more than two rows to be combined of presence or column to be combined, the embodiment of the invention also provides a kind of possible implementations.
Specifically, the row for meeting the second preset condition in pending data table is determined as row to be combined, alternatively, will be to
The column for meeting the second preset condition in processing tables of data are determined as after column to be combined, a kind of combining unit of the embodiment of the present invention
The method of lattice can also include:
The first step, when there are more than two rows to be combined or column to be combined in pending data table, transmission carry to
The request to be confirmed of the identification information of merging rows or column to be combined is to user;
Specifically, the identification information can be the line number of row to be combined or the row number of column to be combined, can also be and line number
The label of the corresponding row, or the label of the column corresponding with row number.For example, the line number of the 11st row is " Row11 ", the 5th column
Row number is " Column5 ".
The embodiment of the present invention Merge Cells device determine two row of behavior to be combined more than when, can by this two
Capable identification information, which is added in solicited message to be confirmed, is sent to user, request user's confirmation.
The embodiment of the present invention Merge Cells device determine it is to be combined be classified as two column it is above when, can by this two
The identification information of column, which is added in solicited message to be confirmed, is sent to user, request user's confirmation.
It simultaneously include row in the row to be combined or column to be combined that the device of the Merge Cells of the embodiment of the present invention determines
When with column, the identification information of the identification information of the row and the column can be added in solicited message to be confirmed simultaneously and be sent to use
Family, request user's confirmation.
Specifically, when sending the request to be confirmed for carrying the identification information of row to be combined or column to be combined to user, it can
It may include the line number of row to be combined or the column of column to be combined in the window to be to pop up a window in pending data table
Number, choice box, can also include ACK button.
The confirmation letter of second step, acquisition and the identification information for carrying row to be combined or column to be combined according to user feedback
Breath, determines the row to be combined in pending data table or the row to be combined or column to be combined to be combined being classified as comprising identification information.
Specifically, being used after sending the request to user to be confirmed for the identification information for carrying row to be combined or column to be combined
Family can see the solicited message to be confirmed, can select row to be combined or column to be combined according to the identification information of carrying.With
After family selects row to be combined or column to be combined, the device of the Merge Cells of the embodiment of the present invention is available to arrive user feedback
The confirmation message of the identification information of row to be combined or column to be combined is carried, then can be believed according to the mark in the confirmation message
Breath, determines the row to be combined in pending data table or the row to be combined or to be combined to be combined being classified as comprising the identification information
Column.
Wherein, the identification information of user feedback can be identical as the identification information for being sent to user, can also be less than transmission
To the identification information of user.
Through the above steps, the device of the Merge Cells of the embodiment of the present invention can be there are multirow rows to be combined or more
Selection is provided the user with when arranging column to be combined, and the unit in row to be combined or column to be combined is merged according to the confirmation message of user
Lattice improve the experience of user.
It, can be only to the content of cell and list when treating the cell in merging rows or column to be combined and merging
First lattice merge, and are default property by the attribute setup of the cell after merging, can also be in the content and list to cell
It is the attribute of any cell by the attribute setup of the cell after merging when first lattice merge.
Wherein, which is the pre-generated attribute when establishing pending data table.
Specifically, being that the (n-1)th merging is single by the cell span before the (n-1)th reference cell lattice to the n-th reference cell lattice
Cell span before n-th reference cell lattice to termination cell is the n-th Merge Cells, may include: by first lattice
There are when the different cell of attribute in cell before the (n-1)th reference cell lattice to the n-th reference cell lattice,
The attribute that any content in cell before (n-1)th reference cell lattice to the n-th reference cell lattice is not empty cell is made
It, will be in the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice for the reference property of the (n-1)th Merge Cells
Hold the content for merging into the (n-1)th Merge Cells, by the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice
Attribute merges into the reference property of the (n-1)th Merge Cells;
In the n-th reference cell lattice there are when the different cell of attribute in the cell to before terminating cell, by n-th
Any content is not that the attribute of empty cell is determined as the n-th merging in cell before reference cell lattice to termination cell
The content of cell of the n-th reference cell lattice to before terminating cell is merged into the n-th merging list by the reference property of cell
The attribute of cell of the n-th reference cell lattice to before terminating cell is merged into the n-th Merge Cells by the content of first lattice
Reference property.
Can also include:
There are when the different cell of attribute in cell before the (n-1)th reference cell lattice to the n-th reference cell lattice,
Using the attribute of the (n-1)th reference cell lattice as the reference property of the (n-1)th Merge Cells, by the (n-1)th reference cell lattice to the n-th base
The content of cell before quasi- cell merges into the content of the (n-1)th Merge Cells, by the (n-1)th reference cell lattice to n-th
The attribute of cell before reference cell lattice merges into the reference property of the (n-1)th Merge Cells;
In the n-th reference cell lattice there are when the different cell of attribute in the cell to before terminating cell, by n-th
The attribute of reference cell lattice is determined as the reference property of the n-th Merge Cells, before the n-th reference cell lattice to termination cell
The content of cell merge into the contents of the n-th Merge Cells, by the n-th reference cell lattice to the unit terminated before cell
The attribute of lattice merges into the reference property of the n-th Merge Cells.I.e., it is possible to which the attribute of each reference cell lattice is single as merging
The reference property of first lattice.
Specifically, the attribute includes at least one of or combinations thereof: font, alignment thereof, retraction spacing, pattern, list
First sound of laughing formula.
Through the above steps, can guarantee to merge when treating the cell in merging rows or column to be combined and merging
The attribute of cell afterwards meets the setting of user, improves user experience.
The embodiment of the invention also provides a kind of methods of Merge Cells, as shown in Fig. 2, being the one of the embodiment of the present invention
The flow chart of second of embodiment of the method for kind Merge Cells.This method may include:
The row for meeting the second preset condition in pending data table is determined as row to be combined, alternatively, by be processed by S201
The column for meeting the second preset condition in tables of data are determined as column to be combined.
Wherein, the second preset condition is that there are at least two contents in same a line or same row in pending data table
Identical and connected cell, or, there are at least one content being sky in same a line or same row in pending data table
Cell.
It is assumed that tables of data X to be processed shown in table 3 is the pending data table of the embodiment of the present invention, and in the table, packet
Include 4 column, 14 row.Wherein, the first row in first row and the content of the corresponding cell of the second row are all A, therefore, first
Column meet the second preset condition, and first row can be determined as to column to be combined, and the first row in third column is right respectively to the third line
The content for the cell answered all is 1, and therefore, third column also meet the second preset condition, third column can be determined as to be combined
Column.To be combined by step S201 determination is classified as first row and third column.
S202, when there are more than two rows to be combined or column to be combined in pending data table, transmission is carried wait close
The request to be confirmed of the identification information of column parallel or to be combined is to user.
Since the to be combined of determination is classified as first row and third column through the above steps, totally two column, therefore, can ask here
User is asked to be confirmed whether all to merge the cell in two column.
Specifically, can send the request to be confirmed of the identification information for carrying first row and tertial identification information to
User.
The tables of data X to be processed of table 3
A | D | 1 | 5 |
A | E | 1 | 6 |
F | 1 | 7 | |
A | J | 2 | 8 |
B | H | 9 | |
I | 2 | 10 | |
B | J | 2 | 11 |
K | 3 | 12 | |
A | L | 3 | 13 |
M | 14 | ||
A | N | 3 | 15 |
C | O | 4 | 16 |
C | P | 17 | |
The confirmation letter of S203, acquisition and the identification information for carrying row to be combined or column to be combined according to user feedback
Breath, determines the row to be combined in pending data table or the row to be combined or column to be combined to be combined being classified as comprising identification information.
User, can be according to the mark of content and first row in pending data table after getting the request to be confirmed
Information, the letter selection of tertial mark first are classified as column to be combined, alternatively, selection third is classified as column to be combined, alternatively, selection the
One column and third are classified as column to be combined.
Assuming that user's selection first is classified as column to be combined, the device of the Merge Cells of the embodiment of the present invention is available to be arrived
The confirmation message of the identification information for carrying the first row of user feedback can determine the column to be combined in pending data table
For the column to be combined of the identification information comprising first row.
First content is not that empty cell is determined as the 1st benchmark list in row to be combined or column to be combined by S204
The Set cell for meeting the first preset condition is determined as the n-th reference cell lattice by first lattice.
Wherein, it is not empty, different from previous cell content and with (n-1)th that the first preset condition, which is Set cell content,
Reference cell lattice content is different, and n is the natural number greater than 1, and Set cell is the (n-1)th benchmark in row to be combined or column to be combined
Cell after cell.
Through the above steps determine first be classified as the column to be combined of the tables of data after, in order to the cell in the column into
Row correctly merges, and can analyze the cell in the column, so that it is determined that reasonably merging mode.For this purpose, of the invention
Embodiment provides a kind of possible mode, that is, the cell that first content is not sky is determined as the 1st reference cell lattice,
The Set cell for meeting the first preset condition is determined as the n-th reference cell lattice.
For example, first content is not the cell that empty cell is the first row, that is, first list in first row
First lattice content is the cell of A, and the cell of the first row the first row is determined as the 1st reference cell lattice.
After the 1st reference cell lattice, the content of the cell of first row fifth line is B, cell content be not it is empty, with
1st reference cell lattice content is different and different from the content of cell of fourth line in the column, therefore, can be by first row
The cell of fifth line is determined as the 2nd reference cell.
After the 2nd reference cell lattice, the content of the cell of the 9th row of first row is A, cell content be not it is empty, with
2nd reference cell lattice content is different and different from the content of cell of the 8th row in the column, therefore, can be by first row
The cell of 9th row is determined as the 3rd reference cell lattice.
By this step S204, it can determine that the cell of the 12nd row of first row in tables of data X is determined as the 4th benchmark list
First lattice.
By determining reference cell lattice, it can be realized and cell in column to be combined is correctly closed in subsequent step
And improve the accuracy of Merge Cells.
Whether the attribute of S205, the cell before judging the (n-1)th reference cell lattice to the n-th reference cell lattice are identical, and n-th
Whether the attribute of cell of the reference cell lattice to before terminating cell is identical.
Wherein, terminating cell is in row to be combined after n-th reference cell lattice, and column content is all empty unit
Lattice, alternatively, be expert at content is all empty cell in column to be combined after n-th reference cell lattice.
Specifically, after determining the reference cell lattice in column to be combined or row to be combined, it can be determined that the attribute of cell
It is whether identical.
For example, can judge the 1st reference cell in the column after the reference cell lattice in the first row for determining tables of data X
Whether the attribute of the cell before lattice to the 2nd reference cell lattice is identical, judges the 2nd reference cell lattice to the 3rd reference cell lattice
Whether the attribute of cell before is identical, judges the attribute of the cell before the 3rd reference cell lattice to the 4th reference cell lattice
It is whether identical, judge whether the attribute of cell of the 4th reference cell lattice to before terminating cell is identical.
It wherein, can be by the 14th row of first row since the content of each unit lattice is all sky in the 14th row in tables of data X
Corresponding cell is determined as terminating cell.
When the attribute of S206, the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice are identical, by (n-1)th
Cell span before reference cell lattice to the n-th reference cell lattice is the (n-1)th Merge Cells, extremely by the n-th reference cell lattice
Cell span before terminating cell is the n-th Merge Cells, the tables of data that obtains that treated.
It is assumed that the attribute of the cell in first row before the 1st reference cell lattice to the 2nd reference cell lattice is identical, the 2nd base
The attribute of cell before quasi- cell to the 3rd reference cell lattice is identical, the 3rd reference cell lattice to the 4th reference cell lattice it
The attribute of preceding cell is identical, judges that the attribute of cell of the 4th reference cell lattice to before terminating cell is identical.Then may be used
To carry out cell span to first row by the method for step S206.
Specifically, can be the 1st Merge Cells by the cell span of the first row in first row to fourth line, by the column
The content of cell of middle the first row to fourth line merges into A, that is, the content of the 1st Merge Cells is A.
It can be the 2nd Merge Cells by the cell span of fifth line in the column to the 8th row, by fifth line in the column
Content to the cell of the 8th row merges into B, that is, the content of the 2nd Merge Cells is B.
It is the 3rd Merge Cells by the cell span of the 9th row to ten a line in the column, by the 9th row in the column to ten
The content of the cell of a line merges A, that is, the content of the 3rd Merge Cells is A.
It is the 4th Merge Cells by the cell span of the 12nd row to the 13rd row in the column, it will be the 12nd in the column
The content of the capable cell to the 13rd row merges into C, that is, the content of the 4th Merge Cells is C.
S207, the unit different there are attribute in the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice
It is not the category of empty cell by any content in the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice when lattice
Reference property of the property as the (n-1)th Merge Cells, by the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice
Content merge into the contents of the (n-1)th Merge Cells, by the unit before the (n-1)th reference cell lattice to the n-th reference cell lattice
The attribute of lattice merges into the reference property of the (n-1)th Merge Cells;
S208, in the n-th reference cell lattice there are when the different cell of attribute in the cell to before terminating cell,
By the n-th reference cell lattice in the cell to before terminating cell any content be not that the attribute of empty cell is determined as the
The content of cell of the n-th reference cell lattice to before terminating cell is merged into n-th by the reference property of n Merge Cells
The attribute of cell of the n-th reference cell lattice to before terminating cell is merged into the n-th merging list by the content of Merge Cells
The reference property of first lattice.
It is assumed that the attribute of the cell before the 1st reference cell lattice to the 2nd reference cell lattice is different, to the 1st benchmark list
It, can be by the 1st reference cell lattice to the 2nd reference cell lattice when cell before first lattice to the 2nd reference cell lattice merges
Any content is not that the attribute of empty cell is determined as the reference property of the 1st Merge Cells in cell before, by the 1st
Cell span before reference cell lattice to the 2nd reference cell lattice is the 1st Merge Cells, the 1st reference cell lattice to the 2nd base
The content of cell before quasi- cell merges into the content of the 1st reference cell lattice, by the 1st reference cell lattice to the 2nd benchmark
The attribute of cell before cell merges into reference property.
That is, be the 1st Merge Cells by the cell span of the first row in first row to fourth line, it will be in the column
The content of cell of the first row to fourth line merges into A, that is, the content of the 1st Merge Cells is A, by first row first
The attribute of the capable cell to fourth line merges into reference property.
It is assumed that the attribute of the cell of the second row of first row is determined as reference property, then it can be by first row first
The attribute of the capable cell to fourth line merges into the attribute of the cell of the second row of first row.
It is assumed that the attribute of cell of the 4th reference cell lattice to before terminating cell is different, to the 4th reference cell
It, can be by the list before the 4th reference cell lattice to termination cell when cell of the lattice to before terminating cell merges
Any content is not that the attribute of empty cell is determined as the reference property of the 4th Merge Cells in first lattice.By the 4th reference cell
Cell span of the lattice to before terminating cell is the 4th Merge Cells, before the 4th reference cell lattice to termination cell
The content of cell merge into the contents of the 4th Merge Cells, by the 4th reference cell lattice to the unit terminated before cell
The attribute of lattice merges into reference property.
That is, being the 4th Merge Cells by the cell span of the 12nd row to the 13rd row in first row, by this
The content of the cell of the 12nd row to the 13rd row merges into C in column, that is, the content of the 4th Merge Cells is C, by first
The attribute of the cell of the 12nd row to the 13rd row merges into reference property in column.
It is assumed that the attribute of the cell of the 13rd row of first row is determined as reference property, it can be by the in first row the tenth
The attribute of the cell of two rows to the 13rd row merges into the attribute of the cell of the 13rd row of first row.
A kind of second of embodiment of the method for the Merge Cells provided through the embodiment of the present invention, available place
Tables of data X after reason, as shown in table 4, for the tables of data X after first row merging treatment, in the table, the 1st Merge Cells
Corresponding to the cell of the first row the first row in pending data Table X to fourth line, the content of the 1st Merge Cells is A, the
2 Merge Cells correspond to cell of the first row fifth line to the 8th row in pending data Table X, the 2nd Merge Cells
Content be B, the 3rd Merge Cells correspond to pending data Table X in the 9th row to the tenth a line cell, the 3rd close
And the content of cell is A, the 4th Merge Cells correspond to the unit of the 12nd row to the 13rd row in pending data table
Lattice, the content of the 4th Merge Cells are C.
Table 4 is to the tables of data X after first row merging treatment
It should be understood that when user selects third to be classified as column to be combined, it can also be by above-mentioned method to third
The cell of column merges, and specific merging process can use for reference the method that the above-mentioned cell to first row merges, this
In repeat no more.
When user selects third to be classified as column to be combined, treated, and tables of data X is as shown in table 5, merges to arrange third
Treated tables of data X.
Table 5 is to the tables of data X after third column merging treatment
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of devices of Merge Cells, such as Fig. 3 institute
Show, is a kind of structural schematic diagram of the device of Merge Cells of the embodiment of the present invention, the apparatus may include:
Ranks determining module 301, for determining row to be combined or column to be combined in pending data table, wherein wait close
It include the identical and connected cell of at least two contents in column parallel or to be combined, or, being wrapped in row to be combined or column to be combined
Including at least one content is empty cell;
Reference cell lattice determining module 302, for not being empty by first content in row to be combined or column to be combined
Cell is determined as the 1st reference cell lattice, and the Set cell for meeting the first preset condition is determined as the n-th reference cell lattice,
Wherein, the first preset condition be Set cell content be not it is empty, different from previous cell content and with the (n-1)th reference cell
Lattice contents is different, and n is the natural number greater than 1, Set cell be in row to be combined or column to be combined (n-1)th reference cell lattice it
Cell afterwards;
Merging module 303, for being the by the cell span before the (n-1)th reference cell lattice to the n-th reference cell lattice
Cell span before n-th reference cell lattice to termination cell is the n-th Merge Cells, obtained by n-1 Merge Cells
Tables of data that treated, wherein terminating cell is in row to be combined after n-th reference cell lattice, and column content is all
Empty cell, alternatively, be expert at content is all empty cell in column to be combined after n-th reference cell lattice.
A kind of device of Merge Cells provided in an embodiment of the present invention, it is to be combined in pending data table by determining
Column capable or to be combined, then determine reference cell lattice, then by the unit before the (n-1)th reference cell lattice to the n-th reference cell lattice
Lattice merge into the (n-1)th Merge Cells, are the n-th merging by cell span of the n-th reference cell lattice to before terminating cell
Cell, it is possible to reduce human cost is saved in the operation manually merged, also, in the presence of interior in row to be combined or column to be combined
When appearance is empty cell, it can be realized correct Merge Cells.
Specifically, ranks determining module 301, is specifically used for:
The row for meeting the second preset condition in pending data table is determined as row to be combined, alternatively, by pending data
The column for meeting the second preset condition in table are determined as column to be combined, wherein the second preset condition is in pending data table
With cell identical and connected there are at least two contents in a line or same row, or, same in pending data table
There are the cells that at least one content is sky in capable or same row.
Specifically, a kind of device of Merge Cells of the embodiment of the present invention, further includes:
Sending module, when for there are more than two rows to be combined or column to be combined in pending data table, transmission is taken
The request to be confirmed of identification information with row to be combined or column to be combined is to user;
Module is obtained, for obtaining and according to the identification information for carrying row to be combined or column to be combined of user feedback
Confirmation message determines the row to be combined in pending data table or the row to be combined to be combined being classified as comprising identification information or wait close
Side by side.
Specifically, merging module 303, is specifically used for:
There are when the different cell of attribute in cell before the (n-1)th reference cell lattice to the n-th reference cell lattice,
The attribute that any content in cell before (n-1)th reference cell lattice to the n-th reference cell lattice is not empty cell is made
It, will be in the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice for the reference property of the (n-1)th Merge Cells
Hold the content for merging into the (n-1)th Merge Cells, by the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice
Attribute merges into the reference property of the (n-1)th Merge Cells;
In the n-th reference cell lattice there are when the different cell of attribute in the cell to before terminating cell, by n-th
Any content is not that the attribute of empty cell is determined as the n-th merging in cell before reference cell lattice to termination cell
The content of cell of the n-th reference cell lattice to before terminating cell is merged into the n-th merging list by the reference property of cell
The attribute of cell of the n-th reference cell lattice to before terminating cell is merged into the n-th Merge Cells by the content of first lattice
Reference property.
Specifically, the attribute includes at least one of or combinations thereof: font, alignment thereof, retraction spacing, pattern, list
First sound of laughing formula.
The embodiment of the invention also provides a kind of electronic equipment, as shown in figure 4, being a kind of merging list of the embodiment of the present invention
The method of first lattice is applied to the structural schematic diagram of electronic equipment, which may include: processor 401, communication interface
402, memory 403 and communication bus 404, wherein processor 401, communication interface 402, memory 403 pass through communication bus
404 complete mutual communication;
Memory 403, for storing computer program;
Processor 401 when for executing the program stored on memory 403, realizes following steps:
Step A determines row to be combined or column to be combined in pending data table;
First content is not that empty cell is determined as the 1st benchmark in row to be combined or column to be combined by step B
The Set cell for meeting the first preset condition is determined as the n-th reference cell lattice by cell;
Cell span before (n-1)th reference cell lattice to the n-th reference cell lattice is the (n-1)th combining unit by step C
Cell span of the n-th reference cell lattice to before terminating cell is the n-th Merge Cells by lattice, the number that obtains that treated
According to table.
The communication bus 404 that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral
Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just
It is indicated in expression, figure with two dimension four-headed arrow line, it is not intended that an only bus or a type of bus.
Communication interface 402 is for the communication between above-mentioned electronic equipment and external equipment.
Memory 403 may include random access memory (Random Access Memory, RAM), also may include
Nonvolatile memory (Non-Volatile Memory, NVM), for example, at least one magnetic disk storage.Optionally, memory
It can also be that at least one is located remotely from the storage device of aforementioned processor 401.
Above-mentioned processor 401 can be general processor, including central processing unit (Central Processing
Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital
Signal Processing, DSP), specific integrated circuit (Application Specific Integrated Circuit,
ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic
Device, discrete gate or transistor logic, discrete hardware components.
The embodiment of the invention also provides a kind of computer readable storage medium, computer journey is stored in the storage medium
Sequence, the computer program can be executed by processor, to realize following methods:
Step A determines row to be combined or column to be combined in pending data table;
First content is not that empty cell is determined as the 1st benchmark in row to be combined or column to be combined by step B
The Set cell for meeting the first preset condition is determined as the n-th reference cell lattice by cell;
Cell span before (n-1)th reference cell lattice to the n-th reference cell lattice is the (n-1)th combining unit by step C
Cell span of the n-th reference cell lattice to before terminating cell is the n-th Merge Cells by lattice, the number that obtains that treated
According to table.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (12)
1. a kind of method of Merge Cells, which is characterized in that the described method includes:
Determine the row to be combined or column to be combined in pending data table, wherein in the row to be combined or the column to be combined
The identical and connected cell including at least two contents, or, including at least one in the row to be combined or the column to be combined
A content is empty cell;
It is not that empty cell is determined as the 1st benchmark list by first content in the row to be combined or the column to be combined
The Set cell for meeting the first preset condition is determined as the n-th reference cell lattice, wherein first preset condition by first lattice
It is not empty, different from previous cell content and different, the institute with the (n-1)th reference cell lattice content for the Set cell content
Stating n is the natural number greater than 1, and the Set cell is the (n-1)th benchmark described in the row to be combined or the column to be combined
Cell after cell;
It is the (n-1)th combining unit by the cell span before the (n-1)th reference cell lattice to the n-th reference cell lattice
Cell span before the n-th reference cell lattice to termination cell is the n-th Merge Cells, after obtaining processing by lattice
Tables of data, wherein the termination cell be the n-th reference cell lattice described in the row to be combined after, in column
Hold the cell all for sky, alternatively, be expert at content is all empty after the n-th reference cell lattice described in the column to be combined
Cell.
2. the method according to claim 1, wherein row to be combined in the determining pending data table or to
Merge column, comprising:
The row for meeting the second preset condition in the pending data table is determined as row to be combined, alternatively, by described to be processed
The column for meeting second preset condition in tables of data are determined as column to be combined, wherein second preset condition is described
In pending data table with cell identical and connected there are at least two contents in a line or same row, or, described
There are the cells that at least one content is sky in same a line or same row in pending data table.
3. according to the method described in claim 2, it is characterized in that, the second default item will be met in the pending data table
The row of part is determined as row to be combined, alternatively, the column for meeting second preset condition in the pending data table are determined as
After column to be combined, the method also includes:
When there are more than two rows to be combined or column to be combined in the pending data table, transmission carries described to be combined
The request to be confirmed of the identification information of the capable or described column to be combined is to user;
The confirmation message of acquisition and the identification information for carrying the row to be combined or the column to be combined according to user feedback,
It determines the row to be combined in the pending data table or to be combined is classified as the row to be combined comprising the identification information or wait close
Side by side.
4. the method according to claim 1, wherein described by the (n-1)th reference cell lattice to n-th base
Cell span before quasi- cell is the (n-1)th Merge Cells, before the n-th reference cell lattice to termination cell
Cell span be the n-th Merge Cells, comprising:
The unit different there are attribute in the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice
It is not empty list by any content in the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice when lattice
Reference property of the attribute of first lattice as the (n-1)th Merge Cells, by the (n-1)th reference cell lattice to the n-th benchmark list
The content of cell before first lattice merges into the content of (n-1)th Merge Cells, extremely by the (n-1)th reference cell lattice
The attribute of cell before the n-th reference cell lattice merges into the reference property of (n-1)th Merge Cells;
There are when the different cell of attribute in the cell before the n-th reference cell lattice to the termination cell,
It is not the attribute of empty cell by any content in the cell before the n-th reference cell lattice to the termination cell
It is determined as the reference property of the n-th Merge Cells, by the cell before the n-th reference cell lattice to the termination cell
Content merge into the contents of n-th Merge Cells, before the n-th reference cell lattice to the termination cell
The attribute of cell merges into the reference property of n-th Merge Cells.
5. according to the method described in claim 4, it is characterized in that, the attribute includes at least one of or combinations thereof: word
Body, alignment thereof, retraction spacing, pattern, cell formats.
6. a kind of device of Merge Cells, which is characterized in that described device includes:
Ranks determining module, for determining row to be combined or column to be combined in pending data table, wherein the row to be combined
Or including the cell that at least two contents are identical and connected in the column to be combined, or, the row to be combined or described wait close
It include the cell that at least one content is sky in side by side;
Reference cell lattice determining module, for not being empty by first content in the row to be combined or the column to be combined
Cell be determined as the 1st reference cell lattice, by meet the first preset condition Set cell be determined as the n-th reference cell
Lattice, wherein first preset condition is that the Set cell content is not empty, different from previous cell content and with
N-1 reference cell lattice content is different, and the n is the natural number greater than 1, and the Set cell is the row to be combined or described
Cell after (n-1)th reference cell lattice described in column to be combined;
Merging module, for being the by the cell span before the (n-1)th reference cell lattice to the n-th reference cell lattice
Cell span of the n-th reference cell lattice to before terminating cell is the n-th Merge Cells by n-1 Merge Cells,
The tables of data that obtains that treated, wherein the termination cell be the n-th reference cell lattice described in the row to be combined it
Afterwards, column content is all empty cell, alternatively, being expert at after the n-th reference cell lattice described in the column to be combined
Content is all empty cell.
7. device according to claim 6, which is characterized in that the ranks determining module is specifically used for:
The row for meeting the second preset condition in the pending data table is determined as row to be combined, alternatively, by described to be processed
The column for meeting second preset condition in tables of data are determined as column to be combined, wherein second preset condition is described
In pending data table with cell identical and connected there are at least two contents in a line or same row, or, described
There are the cells that at least one content is sky in same a line or same row in pending data table.
8. device according to claim 7, which is characterized in that described device further include:
Sending module, when for there are more than two rows to be combined or column to be combined in the pending data table, transmission is taken
The request to be confirmed of identification information with the row to be combined or the column to be combined is to user;
Module is obtained, for obtaining and believing according to the mark for carrying the row to be combined or the column to be combined of user feedback
The confirmation message of breath, determine the row to be combined in the pending data table or it is to be combined be classified as comprising the identification information to
Merging rows or column to be combined.
9. device according to claim 6, which is characterized in that the merging module is specifically used for:
The unit different there are attribute in the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice
It is not empty list by any content in the cell before the (n-1)th reference cell lattice to the n-th reference cell lattice when lattice
Reference property of the attribute of first lattice as the (n-1)th Merge Cells, by the (n-1)th reference cell lattice to the n-th benchmark list
The content of cell before first lattice merges into the content of (n-1)th Merge Cells, extremely by the (n-1)th reference cell lattice
The attribute of cell before the n-th reference cell lattice merges into the reference property of (n-1)th Merge Cells;
There are when the different cell of attribute in the cell before the n-th reference cell lattice to the termination cell,
It is not the attribute of empty cell by any content in the cell before the n-th reference cell lattice to the termination cell
It is determined as the reference property of the n-th Merge Cells, by the cell before the n-th reference cell lattice to the termination cell
Content merge into the contents of n-th Merge Cells, before the n-th reference cell lattice to the termination cell
The attribute of cell merges into the reference property of n-th Merge Cells.
10. device according to claim 9, which is characterized in that the attribute includes at least one of or combinations thereof: word
Body, alignment thereof, retraction spacing, pattern, cell formats.
11. a kind of electronic equipment characterized by comprising processor, communication interface, memory and communication bus, wherein institute
It states processor, the communication interface, the memory and completes mutual communication by the communication bus;
The memory, for storing computer program;
The processor when for executing the program stored on the memory, is realized described in any one of Claims 1 to 5
Method and step;
The communication interface carries out data exchange for the electronic equipment and external equipment.
12. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program realizes Claims 1 to 5 described in any item method and steps when the computer program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710533329.8A CN109213978B (en) | 2017-07-03 | 2017-07-03 | Method and device for merging cells, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710533329.8A CN109213978B (en) | 2017-07-03 | 2017-07-03 | Method and device for merging cells, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109213978A true CN109213978A (en) | 2019-01-15 |
CN109213978B CN109213978B (en) | 2022-05-06 |
Family
ID=64993425
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710533329.8A Active CN109213978B (en) | 2017-07-03 | 2017-07-03 | Method and device for merging cells, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109213978B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109857662A (en) * | 2019-01-25 | 2019-06-07 | 浙江数链科技有限公司 | Case data processing method, device, computer equipment and storage medium |
CN111444689A (en) * | 2020-06-17 | 2020-07-24 | 广州市玄武无线科技股份有限公司 | Data-based table cell merging method and system |
CN112528703A (en) * | 2019-09-17 | 2021-03-19 | 珠海金山办公软件有限公司 | Method and device for identifying table structure and electronic equipment |
CN112784548A (en) * | 2019-11-07 | 2021-05-11 | 珠海金山办公软件有限公司 | Cell merging method, device and storage medium |
CN116205204A (en) * | 2023-03-01 | 2023-06-02 | 北京中宏立达科技发展有限公司 | Dynamic form merging method and system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020184261A1 (en) * | 2000-10-27 | 2002-12-05 | Manki Yamane | Process of inputting and outputting a display table derived from a worksheet and data storage media programmed to perform the same |
CN101388028A (en) * | 2008-09-19 | 2009-03-18 | 金蝶软件(中国)有限公司 | Method and apparatus for combining cells |
US20110138265A1 (en) * | 2009-12-04 | 2011-06-09 | Synopsys, Inc. | Method and apparatus for presenting date in a tabular format |
US20110295904A1 (en) * | 2010-05-27 | 2011-12-01 | Business Objects Software Ltd. | Cluster identification and transformation |
CN104142932A (en) * | 2013-05-07 | 2014-11-12 | 苏州精易会信息技术有限公司 | Method for displaying sub table borders of webpage spreadsheet |
CN104391833A (en) * | 2014-12-05 | 2015-03-04 | 张明兴 | Automation for transverse typesetting, header forming and parallelization for table making software |
-
2017
- 2017-07-03 CN CN201710533329.8A patent/CN109213978B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020184261A1 (en) * | 2000-10-27 | 2002-12-05 | Manki Yamane | Process of inputting and outputting a display table derived from a worksheet and data storage media programmed to perform the same |
CN101388028A (en) * | 2008-09-19 | 2009-03-18 | 金蝶软件(中国)有限公司 | Method and apparatus for combining cells |
US20110138265A1 (en) * | 2009-12-04 | 2011-06-09 | Synopsys, Inc. | Method and apparatus for presenting date in a tabular format |
US20110295904A1 (en) * | 2010-05-27 | 2011-12-01 | Business Objects Software Ltd. | Cluster identification and transformation |
CN104142932A (en) * | 2013-05-07 | 2014-11-12 | 苏州精易会信息技术有限公司 | Method for displaying sub table borders of webpage spreadsheet |
CN104391833A (en) * | 2014-12-05 | 2015-03-04 | 张明兴 | Automation for transverse typesetting, header forming and parallelization for table making software |
Non-Patent Citations (1)
Title |
---|
赵春江: "在ASP.NET中动态合并Table的单元格", 《电脑编程技巧与维护》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109857662A (en) * | 2019-01-25 | 2019-06-07 | 浙江数链科技有限公司 | Case data processing method, device, computer equipment and storage medium |
CN112528703A (en) * | 2019-09-17 | 2021-03-19 | 珠海金山办公软件有限公司 | Method and device for identifying table structure and electronic equipment |
CN112528703B (en) * | 2019-09-17 | 2023-11-03 | 珠海金山办公软件有限公司 | Method and device for identifying table structure and electronic equipment |
CN112784548A (en) * | 2019-11-07 | 2021-05-11 | 珠海金山办公软件有限公司 | Cell merging method, device and storage medium |
CN111444689A (en) * | 2020-06-17 | 2020-07-24 | 广州市玄武无线科技股份有限公司 | Data-based table cell merging method and system |
CN111444689B (en) * | 2020-06-17 | 2020-10-09 | 广州市玄武无线科技股份有限公司 | Data-based table cell merging method and system |
CN116205204A (en) * | 2023-03-01 | 2023-06-02 | 北京中宏立达科技发展有限公司 | Dynamic form merging method and system |
CN116205204B (en) * | 2023-03-01 | 2023-08-04 | 北京中宏立达科技发展有限公司 | Dynamic form merging method and system |
Also Published As
Publication number | Publication date |
---|---|
CN109213978B (en) | 2022-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109213978A (en) | A kind of method, apparatus of Merge Cells, electronic equipment and readable storage medium storing program for executing | |
CN110546654A (en) | Enhancing processing performance of DNN modules by configuring bandwidth control of interfaces | |
CN110515951A (en) | A kind of BOM standardized method, system and electronic equipment and storage medium | |
CN107748696A (en) | The method and terminal device of a kind of task scheduling | |
EP3702912A1 (en) | Background application cleaning method and apparatus, and storage medium and electronic device | |
CN107526722A (en) | A kind of character relation analysis method and terminal | |
CN105988665B (en) | Information dubbing system, information duplicating method and electronic equipment | |
CN107280693A (en) | Psychoanalysis System and method based on VR interactive electronic sand tables | |
CN112801800A (en) | Behavior fund analysis system, behavior fund analysis method, computer equipment and storage medium | |
CN109086814A (en) | A kind of data processing method, device and the network equipment | |
CN106878041A (en) | Log information processing method, apparatus and system | |
CN105554139B (en) | Online customer service method of servicing, online customer service server and online customer service system | |
CN108153719A (en) | Merge the method and apparatus of electrical form | |
CN110516164A (en) | A kind of information recommendation method, device, equipment and storage medium | |
CN110472246A (en) | Work order classification method, device and storage medium | |
WO2021047376A1 (en) | Data processing method, data processing apparatus and related devices | |
CN106528141A (en) | Task sweep-out method and system | |
CN107480167A (en) | Method, mobile terminal and storage medium based on the quick sharing information of fingerprint | |
CN114331198A (en) | Work order distribution method, equipment and storage medium | |
CN106325709A (en) | Method and device for capturing contents on screen | |
CN111625636B (en) | Method, device, equipment and medium for rejecting man-machine conversation | |
Yu et al. | New delay-dependent stability analysis for fuzzy time-delay interconnected systems | |
CN112632929B (en) | Method and device for intelligently recommending chart based on table data and electronic equipment | |
CN103902276B (en) | Information processing method and electronic device | |
CN114495140B (en) | Method, system, device, medium, and program product for extracting information of table |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |