CN111859875A - Cell content filling method and device, electronic equipment and storage medium - Google Patents

Cell content filling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111859875A
CN111859875A CN201910313906.1A CN201910313906A CN111859875A CN 111859875 A CN111859875 A CN 111859875A CN 201910313906 A CN201910313906 A CN 201910313906A CN 111859875 A CN111859875 A CN 111859875A
Authority
CN
China
Prior art keywords
cell
filling
empty
cells
area
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
CN201910313906.1A
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
Guangzhou Kingsoft Mobile Technology Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology 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, Guangzhou Kingsoft Mobile Technology Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201910313906.1A priority Critical patent/CN111859875A/en
Publication of CN111859875A publication Critical patent/CN111859875A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention provides a cell content filling method, a cell content filling device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a filling cell selected by a user, and acquiring an automatic filling instruction and a selected filling area; when the filling area has the non-empty cells, keeping the non-empty cells; when the empty cells exist in the filling area, the empty cells are filled based on the content in the filling cells. In this way, non-empty cells may be maintained when a non-empty cell exists in the fill area; when the empty cells exist in the filling area, the empty cells are filled based on the content in the filling cells. When an automatic filling instruction is used, content filling can be carried out on non-empty cells, empty cells in a filling area selected by a user can be filled, and therefore working efficiency of the user can be improved.

Description

Cell content filling method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of office software, in particular to a cell content filling method and device, electronic equipment and a storage medium.
Background
With the widespread implementation of electronic office work, most companies have realized electronic office work. For example, the office suite provided by an office software vendor may be used for document editing, table editing, slide show, and the like.
In order to facilitate content filling of a plurality of cells in the same row or column in a spreadsheet during electronic office work, an auto-fill command built in the spreadsheet may be used to fill the plurality of cells in the same row or column, for example, if the table before filling is shown in fig. 1a, when a user wants to fill the content of cell a1 into other cells in the same column, the cell a2 through cell A8 may be automatically filled with the auto-fill command.
However, the inventor found that when a cell having content exists in a plurality of cells in the same row or column, the content in the cell having content is overwritten by the automatic fill command in the prior art, for example, when the content exists in cell A3, cell a5, and cell a7, the content in cell a1 is overwritten into the cell A3, cell a5, and cell a7 by the automatic fill command in the prior art, and the result after the fill is the result shown in fig. 1 b.
Therefore, the automatic filling instruction in the prior art cannot avoid the content filling of the non-empty cells.
Disclosure of Invention
An object of embodiments of the present invention is to provide a cell content filling method and apparatus, an electronic device, and a storage medium, so as to avoid content filling for non-empty cells when an automatic filling instruction is used. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a cell content filling method, where the method includes:
acquiring filling cells selected by a user, wherein non-empty cells exist in the filling cells;
acquiring an automatic filling instruction and a selected filling area;
if the filling area has non-empty cells, keeping the non-empty cells; and if the filling area has empty cells, filling the empty cells based on the content in the filling cells.
Optionally, after the automatic filling instruction and the selected filling area are obtained, the cell content filling method further includes:
obtaining an automatic filling mode, wherein the automatic filling mode comprises: filling continuously or only filling empty cells;
when the automatic filling mode is continuous filling, filling all the cells in the filling area based on the content in the filling cells;
When the automatic filling mode is to fill only empty cells, if non-empty cells exist in the filling area, the step of keeping the non-empty cells is executed.
Optionally, the filling cell selected by the user is a filling cell; if the filling area has empty cells, filling the empty cells based on the content in the filling cells, including:
and if the filling area has empty cells, filling the contents in the filling cells into all the empty cells in the filling area.
Optionally, the filling cell selected by the user is a filling cell; if the filling area has non-empty cells, keeping the non-empty cells; if the filling area has empty cells, filling the empty cells based on the content in the filling cells, including:
acquiring a first cell in the filling area, wherein the first cell is any cell in the filling area;
judging whether the first cell is a non-empty cell;
if so, keeping the non-empty cells;
if not, adding the first cell to the first empty cell set;
repeating the step of obtaining the first cells in the filling area until each empty cell in the filling area is added to the first empty cell set;
Sequencing all the empty cells in the first empty cell set according to the sequence of all the empty cells in the filling area to obtain a sequenced first empty cell set;
and on the basis of the content in one filling cell, sequentially increasing or decreasing the content in one filling cell according to the sequence of each empty cell in the sorted first empty cell set from front to back to obtain the filling content of each empty cell in the sorted first empty cell set, and filling the filling content of each empty cell into the corresponding empty cell.
Optionally, the filling cells selected by the user are a plurality of filling cells; if the filling area has non-empty cells, keeping the non-empty cells; if the filling area has empty cells, filling the empty cells based on the content in the filling cells, including:
acquiring a second cell in the filling area, wherein the second cell is any cell in the filling area;
judging whether the second cell is a non-empty cell;
if so, keeping the non-empty cells;
if not, adding the second cell to the second empty cell set;
Repeating the step of obtaining the first cells in the filled area until each empty cell in the filled area is added to the second empty cell set;
sequencing all the empty cells in the second empty cell set according to the sequence of all the empty cells in the filling area to obtain a sequenced second empty cell set;
filling the content in a first filling cell in the plurality of filling cells to a third cell in the ordered second empty cell set, wherein the first filling cell is any one of the plurality of filling cells, and the third cell and the first filling cell have the following relationship: and the position information of the third unit cell in the sorted second empty unit cell set is the sum of the position information of the first filling unit cell and integral multiple of the number of the plurality of filling unit cells.
In a second aspect, an embodiment of the present invention further provides a cell content filling apparatus, where the apparatus includes:
the filling cell acquiring module is used for acquiring filling cells selected by a user, wherein the filling cells have non-empty cells;
the filling instruction acquisition module is used for acquiring an automatic filling instruction and the selected filling area;
The first filling module is used for keeping the non-empty cells if the filling area has the non-empty cells; and if the filling area has empty cells, filling the empty cells based on the content in the filling cells.
Optionally, the cell content filling apparatus further includes:
the filling mode acquisition module is used for acquiring the automatic filling mode and triggering the second filling module when the automatic filling mode is continuous filling; and when the automatic filling mode is to fill only the empty cells, triggering the first filling module. Wherein, the automatic filling mode includes: filling continuously or only filling empty cells;
and the second filling module is used for filling all the cells in the filling area.
Optionally, the filling cell selected by the user is a filling cell; the first filling module is specifically configured to:
and if the filling area has empty cells, filling the contents in the filling cells into all the empty cells in the filling area.
Optionally, the filling cell selected by the user is a filling cell; a first fill module comprising:
the first cell acquisition submodule is used for acquiring a first cell in the filling area, wherein the first cell is any cell in the filling area;
The first judgment submodule is used for judging whether the first cell is a non-empty cell; if yes, triggering a first keeping submodule, and if not, triggering a first adding submodule;
a first holding module for holding a non-empty cell;
the first adding submodule is used for adding the first cell into the first empty cell set, triggering the first cell obtaining submodule, and triggering the first sequencing submodule after each empty cell in the filling area is added into the first empty cell set;
the first sequencing submodule is used for sequencing all the empty cells in the first empty cell set according to the sequence of all the empty cells in the filling area to obtain a sequenced first empty cell set;
and the first filling sub-module is used for sequentially increasing or decreasing the contents of the empty cells in the sorted first empty cell set on the basis of the contents of the filled cells according to the sequence of the empty cells in the sorted first empty cell set from front to back on the basis of the contents of the filled cells to obtain the filling contents of the empty cells in the sorted first empty cell set, and filling the filling contents of the empty cells into the corresponding empty cells.
Optionally, the filling cells selected by the user are a plurality of filling cells; a first fill module comprising:
the second cell obtaining submodule is used for obtaining a second cell in the filling area, wherein the second cell is any cell in the filling area;
the second judgment submodule is used for judging whether the second cell is a non-empty cell or not; if yes, triggering a second keeping submodule, and if not, triggering a second adding submodule;
a second holding module for holding a non-empty cell;
the second adding submodule is used for adding the second cells into the second empty cell set, triggering the second cell obtaining submodule, and triggering the second sorting submodule after each empty cell in the filling area is added into the second empty cell set;
the second sorting submodule is used for sorting all the empty cells in the second empty cell set according to the sequence of all the empty cells in the filling area to obtain a sorted second empty cell set;
a second filling submodule, configured to fill contents in a first filled cell in the multiple filled cells to a third cell in the sorted second empty cell set, where the first filled cell is any one of the multiple filled cells, and the third cell and the first filled cell have the following relationship: and the position information of the third unit cell in the sorted second empty unit cell set is the sum of the position information of the first filling unit cell and integral multiple of the number of the plurality of filling unit cells.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the cell content filling method provided by the first aspect when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the cell content filling method provided in the first aspect are implemented.
In a fifth aspect, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to perform the steps of the cell content filling method provided in the first aspect.
In a sixth aspect, an embodiment of the present invention further provides a computer program, which when run on a computer, causes the computer to execute the steps of the cell content filling method provided in the first aspect.
According to the cell content filling method, the cell content filling device, the electronic equipment and the storage medium, when an automatic filling instruction is used, a filling cell selected by a user can be obtained firstly, and then when the automatic filling instruction sent by the user is obtained, a selected filling area can be obtained; finally, when the non-empty cells exist in the filling area, the non-empty cells can be kept; when the empty cells exist in the filling area, the empty cells are filled based on the content in the filling cells. Therefore, when an automatic filling instruction is used, content filling can be avoided for non-empty cells, empty cells of a filling area selected by a user can be filled, and the working efficiency of the user can be improved. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
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. 1a is a schematic diagram of a table prior to being filled using a prior art autofill instruction;
FIG. 1b is a schematic diagram of a table populated with an auto-fill instruction of the prior art;
FIG. 2 is a flowchart of a first implementation of a method for filling cell contents according to an embodiment of the present invention;
FIG. 3 is a flowchart of a second embodiment of a method for filling cell contents according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of a method for filling cell contents according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a filled cell in the cell content filling method shown in FIG. 4;
FIG. 6 is a flowchart illustrating a fourth implementation manner of a cell content filling method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a filled cell in the cell content filling method shown in FIG. 6;
FIG. 8 is a flowchart illustrating a fifth implementation manner of a cell content filling method according to an embodiment of the present invention;
FIG. 9a is a schematic diagram of a cell before filling in the cell content filling method shown in FIG. 8;
FIG. 9b is a schematic diagram of a filled cell in the cell content filling method shown in FIG. 8;
FIG. 10 is a schematic structural diagram of a cell filling apparatus according to an embodiment of the present invention;
Fig. 11 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.
In order to solve the problems in the prior art, embodiments of the present invention provide a cell content filling method and apparatus, an electronic device, and a storage medium, so as to avoid content filling for non-empty cells when an automatic filling instruction is used.
Next, a method for filling cell contents according to an embodiment of the present invention is first described, and as shown in fig. 2, is a flowchart of a first implementation manner of the method for filling cell contents according to an embodiment of the present invention, where the method may include:
s210, the filling cells selected by the user are obtained, wherein the filling cells have non-empty cells.
In some examples, when a user is content filling a cell to be filled in a spreadsheet, the filling cell will typically be selected first.
For example, assuming the user is to populate the other cells with the content in cell A1, the user will typically select cell A1 first. After the user selects the filling cell, the electronic device applying the cell content filling method according to the embodiment of the invention can acquire the filling cell selected by the user.
In some examples, the populated cell selected by the user is typically a non-empty cell because the user needs to populate the contents of the populated cell to other cells.
In some examples, the user may select the filled cell by using a mouse to select, and may also select the filled cell by using a keyboard to input a shortcut key, which is not limited herein.
S220, an automatic filling instruction and the selected filling area are obtained.
S230, if the filling area has non-empty cells, keeping the non-empty cells; and if the filling area has empty cells, filling the empty cells based on the content in the filling cells.
After selecting a filled cell, the user may select an area to be filled in order to fill in other cells with content.
In some examples, the user may select an area to be filled in a mouse frame selection manner, and after the user selects the filled area, the electronic device may acquire the filled area selected by the user.
When the user selects to complete filling of the cells and the fill area, an auto-fill instruction may be used in order to implement filling of the contents of the cells in the fill area.
In still other examples, the electronic device may be further preset with a triggering manner of an automatic filling instruction, where the triggering manner may be to select a filling area, that is, when a user selects the filling area, the automatic filling instruction is triggered.
For example, when the user selects a filler cell, the user may place a mouse in the lower right corner of the selected filler cell, when the mouse changes to the "+" shape, the user may click and drag the shape to select the filler area, and when the user releases the mouse, the electronic device may assume that the user has selected the filler area to be completed, which may trigger an automatic filler command.
Therefore, the electronic device can also acquire the automatic filling instruction and the filling area selected by the user.
After the electronic device obtains the automatic filling instruction, it may first determine whether a non-empty cell exists in the filling area in order to fill the cell in the filling area and in order to avoid filling the non-empty cell with content.
When the non-empty cell exists in the filling area, the electronic device may keep the content in the non-empty cell unchanged, and then may fill the content in the cell, and perform content filling on the empty cell in the filling area.
According to the cell content filling method provided by the embodiment of the invention, when an automatic filling instruction is used, a filling cell selected by a user can be obtained firstly, and then a selected filling area can be obtained when the automatic filling instruction sent by the user is obtained; finally, when the non-empty cells exist in the filling area, the non-empty cells can be kept; when the empty cells exist in the filling area, the empty cells are filled based on the content in the filling cells. Therefore, when an automatic filling instruction is used, content filling can be avoided for non-empty cells, empty cells of a filling area selected by a user can be filled, and the working efficiency of the user can be improved.
In some examples, in order to provide multiple filling manners for a user, on the basis of the cell content filling method shown in fig. 2, an embodiment of the present invention further provides a possible implementation manner, as shown in fig. 3, which is a flowchart of a second implementation manner of the cell content filling method according to the embodiment of the present invention, and the method may include:
s310, the filling cell selected by the user is obtained.
Wherein the filled cells have non-empty cells.
S320, acquiring an automatic filling instruction and the selected filling area.
And S330, acquiring an automatic filling mode.
And S340, when the automatic filling mode is continuous filling, filling all the cells in the filling area based on the contents in the filling cells.
S350, when the automatic filling mode is to fill only empty cells, if non-empty cells exist in the filling area, keeping the non-empty cells; and if the filling area has empty cells, filling the empty cells based on the content in the filling cells.
In some examples, after the electronic device obtains the automatic filling instruction and the filling area selected by the user, in order to fill the content in the cells in the selected filling area, an "automatic filling manner" selection window may be presented to the user, so that the user selects an automatic filling manner.
In some examples, the auto-fill mode may include: either filling continuously or filling only empty cells.
When the automatic filling mode selected by the user is continuous filling, the electronic device may acquire the automatic filling mode selected by the user for continuous filling, and then may fill all the cells in the filling area based on the content in the filled cells.
In some examples, when the electronic device fills all cells in the filling area based on the content in the filling cell, a filling process in the related art may be adopted, for example, the content in all cells in the filling area is filled with the same content as the content of the filling cell.
When the automatic filling manner selected by the user is to fill only the empty cells, the electronic device may keep the content in the non-empty cells in the filling area unchanged, and then fill the empty cells in the filling area with the content.
Therefore, through the embodiment of the invention, a user can select an automatic filling mode in the prior art and also can adopt the automatic filling mode of the embodiment of the invention, so that various automatic filling modes are provided for the user to select, and the flexibility of applying the embodiment of the invention can be improved.
In still other examples, when selecting a filler cell, a user may select one filler cell or may select a plurality of filler cells, and for this, the embodiments of the present invention provide different processing manners.
For example, when one filling cell is selected by the user, on the basis of the cell content filling method shown in fig. 2, an embodiment of the present invention further provides a possible implementation manner, and as shown in fig. 4, is a flowchart of a third implementation manner of the cell content filling method according to the embodiment of the present invention, where the method may include:
s410, acquiring a filling cell selected by a user.
And S420, acquiring an automatic filling instruction and the selected filling area.
S430, if the filling area has non-empty cells, keeping the non-empty cells; and if the filling area has empty cells, filling the contents in the filling cells into all the empty cells in the filling area.
When the filling cell selected by the user is one filling cell, the electronic device may acquire the one filling cell selected by the user.
After the electronic device obtains the automatic filling instruction and the filling area selected by the user, when a non-empty cell exists in the filling area, the content in the non-empty cell is kept unchanged, and then the content in one filling cell selected by the user can be filled into all empty cells in the filling area, so that the content of all empty cells in the filling area can be the same as the content of the filling cell.
For example, assume that the user-selected filler cell is cell A1 shown in FIG. 5 and the user-selected filler regions are cell A2 through cell A8. The electronic device described above may keep the content in cell A3, the content in cell a5, and the content in cell a7 unchanged, and then fill the content "1" in the cell a1 into cell a2, cell a4, cell a6, and cell A8 in the filling area, so that the filled cell as shown in fig. 5 may be obtained. The user-selected fill regions are cell a2 through cell A8, empty cell a2, empty cell a4, empty cell a6, and empty cell A8, and after filling, the contents of the cells are the same as the filled cell a 1.
On the basis of the cell content filling method shown in fig. 2, an embodiment of the present invention further provides a possible implementation manner, and as shown in fig. 6, the method is a flowchart of a fourth implementation manner of the cell content filling method according to the embodiment of the present invention, and the method may include:
s610, acquiring a filling cell selected by a user.
S620, an automatic filling instruction and the selected filling area are obtained.
S630, acquiring a first cell in the filling area.
The first unit cell is any unit cell in the filling area.
S640, judging whether the first cell is a non-empty cell; if so, step S650 is performed, and if not, step S660 is performed,
s650, keeping the non-empty cells.
S660, add the first cell to the first set of empty cells.
And S670, judging whether each empty cell in the filling area is added to the first empty cell set. If yes, go to step S680, and if no, go to step S630.
And S680, sorting all the empty cells in the first empty cell set according to the sequence of all the empty cells in the filling area to obtain a sorted first empty cell set.
And S690, based on the content in one filling cell, sequentially increasing or decreasing the content in the sorted first empty cell set according to the sequence of each empty cell in the sorted first empty cell set from front to back, so as to obtain the filling content of each empty cell in the sorted first empty cell set, and filling the filling content of each empty cell into the corresponding empty cell.
In some examples, in addition to causing all empty cells in the filled area to have the same contents of the filled cells after filling, the electronic device may cause the contents of all empty cells to change in a certain manner based on the contents of the filled cells.
For this, the electronic device may first add all the empty cells in the filling area to an empty cell set, that is, the first empty cell set. Then, the empty cells in the first empty cell set may be sorted according to the precedence order of the empty cells in the filling region.
Specifically, the electronic device may select one cell from the filling area, then determine whether the cell is an empty cell, if not, reselect one cell, and perform the step of determining whether the reselected cell is an empty cell, if so, add the reselected cell to the first empty cell set, and repeatedly perform the step of reselecting one cell until each empty cell in the filling area is added to the first empty cell set.
In some examples, the first set of empty cells may be an array.
For example, assuming that the filling areas are cell a2, cell a4, cell a6, and cell A8 shown in fig. 7, the electronic device may add cell a2, cell a4, cell a6, and cell A8 to the first set of empty cells.
Because in the filling area, the sequence of the 4 empty cells is as follows: cell a2, cell a4, cell a6, and cell A8, then in the first set of empty cells, the above-mentioned 4 empty cells also have the following sequence: cell a2, cell a4, cell a6, and cell A8.
After sorting all the empty cells in the first empty cell set, the electronic device may sequentially increase or decrease the content of each empty cell in the sorted first empty cell set on the basis of the content of one filled cell according to the order of each empty cell in the sorted first empty cell set from front to back, obtain the filled content of each empty cell in the sorted first empty cell set, and fill the filled content of each empty cell into the corresponding empty cell.
For example, assuming that the content of the user-selected filler cell a1 is "1", the electronic device may add 1 to "1" based on the filler content "1" of the filler cell a1 at the time of cell a2, so that the filler content of the cell a2 is "2"; at cell A4, add 2 to this "1", resulting in a fill of "3" for cell A4; at cell A6, add 3 to this "1", resulting in a fill of "4" for cell A4; at cell A8, the "1" is incremented by 4, resulting in a fill of "5" for cell A4.
Then, the filling content "2" corresponding to the cell a2 may be filled into the cell a2, the filling content "3" corresponding to the cell a4 may be filled into the cell a4, the filling content "4" corresponding to the cell a6 may be filled into the cell a6, and the filling content "5" corresponding to the cell A8 may be filled into the cell A8, so that the schematic diagram of the filled cell shown in fig. 7 may be obtained.
In still other examples, assuming that the content of the user-selected filler cell a1 is "10", the electronic device may decrement the "10" by 1 at cell a2 based on the filler content "10" of the filler cell a1, resulting in a filler content "9" for cell a 2; at cell A4, the "10" is decremented by 2, so that the fill content for cell A4 is "8"; at cell A6, the "10" is decremented by 3, resulting in a fill of "7" for cell A4; in cell A8, the "10" is decremented by 4, so that the fill content of cell A4 is "6". This is also possible.
In still other examples, when the number of the filled cells selected by the user is multiple and the contents in the filled cells have a certain rule, the electronic device may fill the empty cells in the filled area with the contents on the basis of the filled cells selected by the user based on the certain rule, which is also possible.
In some examples, the certain rule may be an arithmetic series, or the like.
In some examples, the certain rule may be a calculation formula that is input by the user in advance and can be used for calculation.
In some examples, when the filling cell selected by the user is a plurality of cells, on the basis of the cell content filling method shown in fig. 2, a possible implementation manner is further provided in the embodiments of the present invention, as shown in fig. 8, which is a flowchart of a fifth implementation manner of the cell content filling method according to the embodiments of the present invention, and the method may include:
s810, acquiring a plurality of filling cells selected by a user.
S820, an automatic filling instruction and the selected filling area are obtained.
S830, acquiring a second cell in the filling area.
And the second unit cell is any unit cell in the filling area.
S840, judging whether the second cell is a non-empty cell; if yes, go to step S850, if no, go to step S860.
And S850, keeping the non-empty cells.
And S860, adding the second cell to the second empty cell set.
S870, it is determined whether each empty cell in the padding area is added to the second set of empty cells. If so, step S880 is performed, and if not, step S830 is performed.
And S880, sequencing all the empty cells in the second empty cell set according to the sequence of all the empty cells in the filling area to obtain a sequenced second empty cell set.
S890, fill the content in the first filled cell of the plurality of filled cells to the third cell of the sorted second empty cell set.
The first filling cell is any one of a plurality of filling cells, and the third cell and the first filling cell have the following relationship: and the position information of the third unit cell in the sorted second empty unit cell set is the sum of the position information of the first filling unit cell and integral multiple of the number of the plurality of filling unit cells.
In some examples, the electronic device may add all the empty cells in the filling area to one empty cell set, that is, a second empty cell set, through steps S830 to S870. Then, the electronic device may sort all the empty cells in the second empty cell set according to the order of all the empty cells in the filling area, so as to obtain a sorted second empty cell set.
It is understood that, in the embodiment of the present invention, steps S830 to S880 may refer to steps S630 to S680 in the fourth implementation, and are not described herein again.
After the above-mentioned electron obtains the second sorted empty cell set, it may count the number of the plurality of filled cells, then select one filled cell from the plurality of filled cells, and determine the position of the selected filled cell in the plurality of filled cells, and then select a third cell from the second sorted empty cell set, where the position of the third cell in the second sorted empty cell set is the sum of the position information of the selected filled cell and the integer multiple of the number of the plurality of filled cells.
Finally, the contents of the selected one of the populated cells may be populated into the third cell.
For example, assume that the multiple filled cells selected by the user are cell a1 and cell a2 shown in fig. 9a, and there are 2 filled cells in total, and the above-mentioned empty cells in the sorted second empty cell set obtained by the electronic device are: cell a4, cell a6, and cell A8.
The electronic device may first select the first cell from the cells a1 and a2 as the first filler cell, and assume that the first filler cell selected by the electronic device is cell a2 and the position of the cell a2 in the plurality of filler cells is row 2.
Based on the relationship between the first filled cell and the third cell, the electronic device may select the cell a6 as the third cell in the second empty cell set, where the position of the cell a6 in the second empty cell set is the 2 nd cell, and is the sum of the position 2 of the cell a2 and the integer multiple 0 of the number 2 of filled cells. The fill content of cell A6 is thus available to be the same as the content of cell A2.
Further, assume that the first filled cell selected by the electronic device is cell a1, and the position of the cell a1 in the plurality of filled cells is row 1. The electronic device may select cell A8 as the third cell in the second empty cell set based on the relationship between the first filled cell and the third cell, where the position of the cell A8 in the second empty cell set is the 3 rd cell, and is the sum of the position 1 of the cell a1 and the integer multiple 1 of the number 2 of filled cells. The fill content of cell A8 is thus available to be the same as the content of cell A1.
After obtaining the filling content corresponding to each empty cell in the second empty cell set, the electronic device may fill the filling content corresponding to each empty cell into the empty cell, so as to implement content filling of all empty cells in the filling area.
For example, after filling the cell shown in fig. 9a, a filled cell schematic can be obtained as shown in fig. 9 b.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a cell content filling device, as shown in fig. 10, which is a schematic structural diagram of the cell content filling device according to the embodiment of the present invention; the apparatus may include:
a filling cell obtaining module 1001 configured to obtain a filling cell selected by a user, where a non-empty cell exists in the filling cell;
a filling instruction obtaining module 1002, configured to obtain an automatic filling instruction and a selected filling area;
a first filling module 1003, configured to maintain a non-empty cell if the filling area has the non-empty cell; and if the filling area has empty cells, filling the empty cells based on the content in the filling cells.
The cell content filling device provided by the embodiment of the invention can firstly acquire the filling cell selected by the user when an automatic filling instruction is used, and then can acquire the selected filling area when the automatic filling instruction sent by the user is acquired; finally, when the non-empty cells exist in the filling area, the non-empty cells can be kept; when the empty cells exist in the filling area, the empty cells are filled based on the content in the filling cells. Therefore, when an automatic filling instruction is used, content filling can be avoided for non-empty cells, empty cells of a filling area selected by a user can be filled, and the working efficiency of the user can be improved.
In some examples, the cell content populating apparatus further includes:
the filling mode acquisition module is used for acquiring the automatic filling mode and triggering the second filling module when the automatic filling mode is continuous filling; and when the automatic filling mode is to fill only the empty cells, triggering the first filling module. Wherein, the automatic filling mode includes: filling continuously or only filling empty cells;
and the second filling module is used for filling all the cells in the filling area.
In some examples, the user-selected filler cell is one filler cell; the first padding module 1003 is specifically configured to:
and if the filling area has empty cells, filling the contents in the filling cells into all the empty cells in the filling area.
In some examples, the user-selected filler cell is one filler cell; the first padding module 1003 includes:
the first cell acquisition submodule is used for acquiring a first cell in the filling area, wherein the first cell is any cell in the filling area;
the first judgment submodule is used for judging whether the first cell is a non-empty cell; if yes, triggering a first keeping submodule, and if not, triggering a first adding submodule;
A first holding module for holding a non-empty cell;
the first adding submodule is used for adding the first cell into the first empty cell set, triggering the first cell obtaining submodule, and triggering the first sequencing submodule after each empty cell in the filling area is added into the first empty cell set;
the first sequencing submodule is used for sequencing all the empty cells in the first empty cell set according to the sequence of all the empty cells in the filling area to obtain a sequenced first empty cell set;
and the first filling sub-module is used for sequentially increasing or decreasing the contents of the empty cells in the sorted first empty cell set on the basis of the contents of the filled cells according to the sequence of the empty cells in the sorted first empty cell set from front to back on the basis of the contents of the filled cells to obtain the filling contents of the empty cells in the sorted first empty cell set, and filling the filling contents of the empty cells into the corresponding empty cells.
In some examples, the user-selected filler cell is a plurality of filler cells; the first padding module 1003 includes:
the second cell obtaining submodule is used for obtaining a second cell in the filling area, wherein the second cell is any cell in the filling area;
The second judgment submodule is used for judging whether the second cell is a non-empty cell or not; if yes, triggering a second keeping submodule, and if not, triggering a second adding submodule;
a second holding module for holding a non-empty cell;
the second adding submodule is used for adding the second cells into the second empty cell set, triggering the second cell obtaining submodule, and triggering the second sorting submodule after each empty cell in the filling area is added into the second empty cell set;
the second sorting submodule is used for sorting all the empty cells in the second empty cell set according to the sequence of all the empty cells in the filling area to obtain a sorted second empty cell set;
a second filling submodule, configured to fill contents in a first filled cell in the multiple filled cells to a third cell in the sorted second empty cell set, where the first filled cell is any one of the multiple filled cells, and the third cell and the first filled cell have the following relationship: and the position information of the third unit cell in the sorted second empty unit cell set is the sum of the position information of the first filling unit cell and integral multiple of the number of the plurality of filling unit cells.
An embodiment of the present invention further provides an electronic device, as shown in fig. 11, including a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, where the processor 1101, the communication interface 1102 and the memory 1103 complete mutual communication through the communication bus 1104,
a memory 1103 for storing a computer program;
the processor 1101 is configured to implement the following steps when executing the program stored in the memory 1103:
acquiring filling cells selected by a user, wherein non-empty cells exist in the filling cells;
acquiring an automatic filling instruction and a selected filling area;
if the filling area has non-empty cells, keeping the non-empty cells; and if the filling area has empty cells, filling the empty cells based on the content in the filling cells.
According to the electronic device provided by the embodiment of the invention, when an automatic filling instruction is used, a filling cell selected by a user can be obtained firstly, and then a selected filling area can be obtained when the automatic filling instruction sent by the user is obtained; finally, when the non-empty cells exist in the filling area, the non-empty cells can be kept; when the empty cells exist in the filling area, the empty cells are filled based on the content in the filling cells. Therefore, when an automatic filling instruction is used, content filling can be avoided for non-empty cells, empty cells of a filling area selected by a user can be filled, and the working efficiency of the user can be improved.
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. In some examples, the memory may also be at least one storage device located remotely from the aforementioned processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The embodiment of the invention also provides a computer readable storage medium, a computer program is stored in the computer readable storage medium, and the computer program is executed by a processor to perform the following steps:
acquiring filling cells selected by a user, wherein non-empty cells exist in the filling cells;
acquiring an automatic filling instruction and a selected filling area;
if the filling area has non-empty cells, keeping the non-empty cells; and if the filling area has empty cells, filling the empty cells based on the content in the filling cells.
The computer-readable storage medium provided by the embodiment of the invention can firstly acquire the filling cells selected by the user when the automatic filling instruction is used, and then can acquire the selected filling area when the automatic filling instruction sent by the user is acquired; finally, when the non-empty cells exist in the filling area, the non-empty cells can be kept; when the empty cells exist in the filling area, the empty cells are filled based on the content in the filling cells. Therefore, when an automatic filling instruction is used, content filling can be avoided for non-empty cells, empty cells of a filling area selected by a user can be filled, and the working efficiency of the user can be improved.
Embodiments of the present invention also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of:
acquiring filling cells selected by a user, wherein non-empty cells exist in the filling cells;
acquiring an automatic filling instruction and a selected filling area;
if the filling area has non-empty cells, keeping the non-empty cells; and if the filling area has empty cells, filling the empty cells based on the content in the filling cells.
According to the computer program product containing the instruction, provided by the embodiment of the invention, when the automatic filling instruction is used, the filling cell selected by the user can be obtained firstly, and then the selected filling area can be obtained when the automatic filling instruction sent by the user is obtained; finally, when the non-empty cells exist in the filling area, the non-empty cells can be kept; when the empty cells exist in the filling area, the empty cells are filled based on the content in the filling cells. Therefore, when an automatic filling instruction is used, content filling can be avoided for non-empty cells, empty cells of a filling area selected by a user can be filled, and the working efficiency of the user can be improved.
Embodiments of the present invention further provide a computer program, which when running on a computer, causes the computer to execute the following steps:
acquiring filling cells selected by a user, wherein non-empty cells exist in the filling cells;
acquiring an automatic filling instruction and a selected filling area;
if the filling area has non-empty cells, keeping the non-empty cells; and if the filling area has empty cells, filling the empty cells based on the content in the filling cells.
According to the computer program provided by the embodiment of the invention, when an automatic filling instruction is used, a filling cell selected by a user can be obtained firstly, and then a selected filling area can be obtained when the automatic filling instruction sent by the user is obtained; finally, when the non-empty cells exist in the filling area, the non-empty cells can be kept; when the empty cells exist in the filling area, the empty cells are filled based on the content in the filling cells. Therefore, when an automatic filling instruction is used, content filling can be avoided for non-empty cells, empty cells of a filling area selected by a user can be filled, and the working efficiency of the user can be improved.
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, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
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 (12)

1. A method of cell content filling, the method comprising:
acquiring filling cells selected by a user, wherein non-empty cells exist in the filling cells;
acquiring an automatic filling instruction and a filling area selected when the automatic filling instruction is adopted;
if the filling area has non-empty cells, keeping the non-empty cells; and if the filling area has empty cells, filling the empty cells based on the content in the filling cells.
2. The method of claim 1, wherein after the obtaining of the auto-fill instruction and the selection of the fill area when employing the auto-fill instruction, the method further comprises:
obtaining an automatic filling mode, wherein the automatic filling mode comprises the following steps: filling continuously or only filling empty cells;
when the automatic filling mode is the continuous filling, filling all the cells in the filling area based on the content in the filling cells;
And when the automatic filling mode is that only empty cells are filled, executing the step of keeping the non-empty cells if the filled area has the non-empty cells.
3. The method of claim 1 or 2, wherein the user-selected filler cell is one filler cell;
if the filling area has empty cells, filling the empty cells based on the content in the filling cells, including:
and if the filling area has empty cells, filling the contents in the filling cells into all the empty cells in the filling area.
4. The method of claim 1 or 2, wherein the user-selected filler cell is one filler cell;
if the filling area has non-empty cells, keeping the non-empty cells; if the filling area has empty cells, filling the empty cells based on the content in the filling cells, including:
acquiring a first cell in the filling area, wherein the first cell is any cell in the filling area;
judging whether the first cell is a non-empty cell;
If so, maintaining the non-empty cells;
if not, adding the first cell to a first empty cell set;
repeating the step of obtaining the first cell in the filled area until each empty cell in the filled area is added to the first set of empty cells;
sequencing all the empty cells in the first empty cell set according to the sequence of all the empty cells in the filling area to obtain a sequenced first empty cell set;
and based on the content in the one filling cell, sequentially increasing or decreasing according to the sequence of each empty cell in the sorted first empty cell set from front to back on the basis of the content in the one filling cell to obtain the filling content of each empty cell in the sorted first empty cell set, and filling the filling content of each empty cell to the corresponding empty cell.
5. The method of claim 1 or 2, wherein the user-selected filler cell is a plurality of filler cells;
if the filling area has non-empty cells, keeping the non-empty cells; if the filling area has empty cells, filling the empty cells based on the content in the filling cells, including:
Acquiring a second cell in the filling area, wherein the second cell is any cell in the filling area;
judging whether the second cell is a non-empty cell;
if so, maintaining the non-empty cells;
if not, adding the second cell to a second empty cell set;
repeating the step of obtaining the first cell in the filled area until each empty cell in the filled area is added to the second set of empty cells;
sequencing all the empty cells in the second empty cell set according to the sequence of all the empty cells in the filling area to obtain a sequenced second empty cell set;
filling the content in a first filled cell in the plurality of filled cells to a third cell in the ordered second empty cell set, wherein the first filled cell is any one of the plurality of filled cells, and the third cell and the first filled cell have the following relationship: and the position information of the third cell in the sorted second empty cell set is the sum of the position information of the first filled cell and the integral multiple of the number of the plurality of filled cells.
6. A cell content filling apparatus, characterized in that the apparatus comprises:
the filling cell acquiring module is used for acquiring filling cells selected by a user, wherein the filling cells comprise non-empty cells;
the filling instruction acquisition module is used for acquiring an automatic filling instruction and a filling area selected when the automatic filling instruction is adopted;
the first filling module is used for keeping the non-empty cells if the filling area has the non-empty cells; and if the filling area has empty cells, filling the empty cells based on the content in the filling cells.
7. The apparatus of claim 6, further comprising:
the filling mode acquisition module is used for acquiring an automatic filling mode and triggering a second filling module when the automatic filling mode is the continuous filling; and when the automatic filling mode is that only the empty cells are filled, triggering the first filling module. Wherein, the automatic filling mode comprises: filling continuously or only filling empty cells;
and the second filling module is used for filling all the cells in the filling area.
8. The apparatus of claim 6 or 7, wherein the user-selected filler cell is one filler cell;
the first filling module is specifically configured to:
and if the filling area has empty cells, filling the contents in the filling cells into all the empty cells in the filling area.
9. The apparatus of claim 6 or 7, wherein the user-selected filler cell is one filler cell;
the first filling module comprises:
the first cell acquisition submodule is used for acquiring a first cell in the filling area, wherein the first cell is any cell in the filling area;
the first judgment submodule is used for judging whether the first cell is a non-empty cell or not; if yes, triggering a first keeping submodule, and if not, triggering a first adding submodule;
the first holding module is used for holding the non-empty cells;
the first adding submodule is used for adding the first cell into a first empty cell set, triggering the first cell obtaining submodule, and triggering a first sequencing submodule after each empty cell in the filling area is added into the first empty cell set;
The first ordering submodule is used for ordering all the empty cells in the first empty cell set according to the order of all the empty cells in the filling area to obtain an ordered first empty cell set;
and the first filling sub-module is used for sequentially increasing or decreasing the filling content of each empty cell in the sorted first empty cell set on the basis of the content in the one filled cell according to the sequence of each empty cell in the sorted first empty cell set from front to back based on the content in the one filled cell to obtain the filling content of each empty cell in the sorted first empty cell set, and filling the filling content of each empty cell into the corresponding empty cell.
10. The apparatus of claim 6 or 7, wherein the user-selected filler cell is a plurality of filler cells;
the first filling module comprises:
the second cell obtaining submodule is used for obtaining a second cell in the filling area, wherein the second cell is any cell in the filling area;
the second judgment submodule is used for judging whether the second cell is a non-empty cell or not; if yes, triggering a second keeping submodule, and if not, triggering a second adding submodule;
The second holding module is used for holding the non-empty cells;
the second adding submodule is used for adding the second cell into a second empty cell set, triggering the second cell obtaining submodule, and triggering a second sorting submodule after each empty cell in the filling area is added into the second empty cell set;
the second sorting submodule is configured to sort all the empty cells in the second empty cell set according to the order of all the empty cells in the filling area, so as to obtain a sorted second empty cell set;
a second filling sub-module, configured to fill a content in a first filled cell of the multiple filled cells to a third cell of the ordered second empty cell set, where the first filled cell is any one of the multiple filled cells, and the third cell and the first filled cell have a relationship as follows: and the position information of the third cell in the sorted second empty cell set is the sum of the position information of the first filled cell and the integral multiple of the number of the plurality of filled cells.
11. 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 one of claims 1 to 5 when executing a program stored in the memory.
12. 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 the claims 1-5.
CN201910313906.1A 2019-04-18 2019-04-18 Cell content filling method and device, electronic equipment and storage medium Pending CN111859875A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910313906.1A CN111859875A (en) 2019-04-18 2019-04-18 Cell content filling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910313906.1A CN111859875A (en) 2019-04-18 2019-04-18 Cell content filling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111859875A true CN111859875A (en) 2020-10-30

Family

ID=72951941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910313906.1A Pending CN111859875A (en) 2019-04-18 2019-04-18 Cell content filling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111859875A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102331984A (en) * 2011-06-28 2012-01-25 用友软件股份有限公司 Lower table header generating device and lower table header generating method
CN104462040A (en) * 2014-11-19 2015-03-25 北京国双科技有限公司 Data processing method and device for table
CN104616088A (en) * 2014-09-28 2015-05-13 用友优普信息技术有限公司 Device and method for quickly filling table
CN106445900A (en) * 2016-09-20 2017-02-22 东软集团股份有限公司 Table style processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102331984A (en) * 2011-06-28 2012-01-25 用友软件股份有限公司 Lower table header generating device and lower table header generating method
CN104616088A (en) * 2014-09-28 2015-05-13 用友优普信息技术有限公司 Device and method for quickly filling table
CN104462040A (en) * 2014-11-19 2015-03-25 北京国双科技有限公司 Data processing method and device for table
CN106445900A (en) * 2016-09-20 2017-02-22 东软集团股份有限公司 Table style processing method and device

Similar Documents

Publication Publication Date Title
CN108228169A (en) Chart production method, apparatus, equipment and medium based on eCharts tools
US20030158846A1 (en) Graphics image generation method, program and statistical data drawing apparatus
JP2009054172A (en) Wiring processing method, wiring processor and recording medium for wiring processing program
CN108694574B (en) Resource transfer channel processing method, device and equipment
CN113412481B (en) Resource pushing method, device, server and storage medium
CN113919268A (en) Programmable logic device layout optimization method and device and related equipment
CN107623897A (en) Geography fence generation method and its equipment
CN111859875A (en) Cell content filling method and device, electronic equipment and storage medium
US6308305B1 (en) Method and apparatus for circuit designing of an LSI circuit without error paths
CN106066966B (en) Frozen application display method, frozen application display device and terminal
CN109086150A (en) A kind of method, apparatus for avoiding multiple asynchronous methods from repeating and electronic equipment
US20130103456A1 (en) Method, system and program storage device for production planning
CN111625679A (en) Method and device for generating video story line
CN108961071B (en) Method for automatically predicting combined service income and terminal equipment
CN112445514A (en) Code evaluation method and related product
CN111783408B (en) Cell pasting method and device, electronic equipment and storage medium
WO2022170935A1 (en) Order processing method, apparatus and device, warehousing system, and storage medium
CN112784552B (en) Table editing method and apparatus
CN104780094A (en) Mail prompting method and terminal
CN110110260B (en) Page rendering method and device and electronic equipment
CN107122949B (en) E-mail screening method and device
CN111832270B (en) Method and device for displaying line numbers and column labels of tables in non-table document and electronic equipment
KR102256385B1 (en) Apparatus and method of vessel scheduling for steel products
CN111898350B (en) Cell cycle pasting method and device, electronic equipment and storage medium
JP5209438B2 (en) Document processing device

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