CN111783408B - Cell pasting method and device, electronic equipment and storage medium - Google Patents

Cell pasting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111783408B
CN111783408B CN201910270201.6A CN201910270201A CN111783408B CN 111783408 B CN111783408 B CN 111783408B CN 201910270201 A CN201910270201 A CN 201910270201A CN 111783408 B CN111783408 B CN 111783408B
Authority
CN
China
Prior art keywords
cell
cells
pasting
user
target
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.)
Active
Application number
CN201910270201.6A
Other languages
Chinese (zh)
Other versions
CN111783408A (en
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 CN201910270201.6A priority Critical patent/CN111783408B/en
Publication of CN111783408A publication Critical patent/CN111783408A/en
Application granted granted Critical
Publication of CN111783408B publication Critical patent/CN111783408B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention provides a method and a device for pasting unit cells, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring the cell copied by the user and the target pasting area selected by the user, and when a pasting instruction is received, if the target pasting area contains non-empty cells, keeping the content in the non-empty cells; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area. In this way, the copied cells can be prevented from being pasted into the non-empty cells existing in the target pasting area, and the copied cells can be pasted into the plurality of empty cells existing in the target pasting area, so that the copied contents do not need to be pasted by a worker, the quick pasting of the contents to be pasted to the cells can be realized, and the working efficiency of the worker is improved.

Description

Cell pasting method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of office software technologies, and in particular, to a method and an apparatus for pasting a cell, an electronic device, and a storage medium.
Background
With the widespread implementation of electronic offices, most companies have realized electronic offices. For example, office software vendor provided office suite may be employed for document editing, form editing, slide show, etc.
In electronic office work, the content in one cell in the electronic form is typically copied and then pasted into the other cell. For example, "content 1" in the A1 cell in the spreadsheet shown in fig. 1 is copy-pasted into other cells. When there is no content in the cells other than the A1 cell in column a in fig. 1, an "auto fill cell" instruction in the spreadsheet may be used for auto fill.
However, when there is a content in other cells, for example, when the A3 cell has the content "content 2", the cell A5 has the content "content 3", and the cell B5 has the content "content 6", the worker needs to paste the content copied from the A1 cell into the cell A2, the cell A4, the cell A6, the cell B2, the cell B4, and the cell B6 one by one, respectively, which reduces the work efficiency of the worker.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device, electronic equipment and a storage medium for pasting cells, so as to realize rapid pasting of contents to be pasted to the cells and improve the working efficiency of staff. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for pasting a cell, where the method includes:
acquiring a cell copied by a user and a target pasting area selected by the user;
when a paste instruction is received, if the target paste area contains non-empty cells, the contents in the non-empty cells are kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area.
Optionally, obtaining the user copied cell and the user selected target pasting area includes:
acquiring a cell copied by a user and a target pasting area selected by the user;
optionally, pasting the user copied cell to a plurality of empty cells in the target pasting area includes:
and pasting one cell copied by the user to all the empty cells in the target pasting area.
Optionally, obtaining the user copied cell and the user selected target pasting area includes:
Acquiring a plurality of cells copied by a user and a target pasting area selected by the user;
optionally, when receiving the paste instruction, if the target paste area includes a non-empty cell, keeping the content in the non-empty cell; if the target pasting area includes a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area, including:
when a paste instruction is received, determining position information of a first cell in a plurality of cells copied by a user, wherein the first cell is any cell in the plurality of cells copied by the user;
in the target pasting area, inquiring whether a cell with the same position information as the first cell is a non-empty cell or not;
if so, the content in the cell with the same position information as the first cell is maintained;
if not, pasting the content in the first cell to a cell with the same position information as the first cell;
among the plurality of cells duplicated by the user other than the first cell, one cell is reselected as the first cell, and the step of determining the position information of the first cell among the plurality of cells duplicated by the user is repeatedly performed.
Optionally, pasting the content in the first cell to a cell having the same location information as the first cell includes:
and pasting the content and the cell attribute in the first cell to the cell with the same position information as the first cell.
Optionally, the pasting method of the unit cell further includes:
and distinguishing and displaying the pasted cells with the same position information as the first cells from the non-empty cells in the target pasting area.
In a second aspect, an embodiment of the present invention further provides a device for attaching a unit cell, where the device includes:
the target pasting area acquisition module is used for acquiring cells copied by a user and a target pasting area selected by the user, wherein the target pasting area comprises at least one non-empty cell and at least two empty cells;
the pasting module is used for maintaining the content in the non-empty cells if the target pasting area contains the non-empty cells when receiving the pasting instruction; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area.
Optionally, the target pasting area acquiring module is specifically configured to:
Acquiring a cell copied by a user and a target pasting area selected by the user;
the pasting module is specifically used for:
and pasting one cell copied by the user to all the empty cells in the target pasting area.
Optionally, the target pasting area acquiring module is specifically configured to:
acquiring a plurality of cells copied by a user and a target pasting area selected by the user;
optionally, the pasting module includes:
the first cell position information determining sub-module is used for determining the position information of a first cell in a plurality of cells copied by a user when a paste instruction is received, wherein the first cell is any cell in the plurality of cells copied by the user;
the inquiring submodule is used for inquiring whether the cell with the same position information as the first cell is a non-empty cell or not in the target pasting area; if yes, triggering a holding sub-module, and if not, triggering a sticking sub-module;
a holding sub-module for holding contents in cells having the same positional information as the first cell;
the pasting sub-module is used for pasting the content in the first cell to the cell with the same position information as the first cell;
And the cell selection sub-module is used for reselecting one cell from a plurality of cells duplicated by the user except the first cell as the first cell and triggering the first cell position information determination sub-module.
Optionally, the pasting sub-module is specifically configured to:
and pasting the content and the cell attribute in the first cell to the cell with the same position information as the first cell.
Optionally, the pasting device of the unit cell further includes:
and the distinguishing display module is used for distinguishing and displaying the pasted cells with the same position information as the first cells and the non-empty cells in the target pasting area.
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 communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the pasting method of the unit cell provided in 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, where the computer program, when executed by a processor, implements the steps of the pasting method of the unit cell provided in the first aspect.
In a fifth aspect, 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 the cell pasting method provided in the first aspect above.
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 perform the steps of the pasting method of cells provided in the first aspect.
When pasting the copied cells, the cell copied by the user and the target pasting area selected by the user can be obtained, and when a pasting instruction is received, if the target pasting area contains non-empty cells, the content in the non-empty cells is kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area. In this way, the copied cells can be prevented from being pasted into the non-empty cells existing in the target pasting area, and the copied cells can be pasted into the plurality of empty cells existing in the target pasting area, so that the copied contents do not need to be pasted by a worker, the quick pasting of the contents to be pasted to the cells can be realized, and the working efficiency of the worker is improved. Of course, not all of the above advantages need be achieved simultaneously in the practice of any one product or method of the present invention.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a prior art spreadsheet schematic;
fig. 2 is a flowchart of a first implementation of a method for pasting a cell according to an embodiment of the present invention;
FIG. 3 is a flowchart of a second implementation of a method for pasting a cell according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a spreadsheet of the method of pasting the cells shown in FIG. 3;
FIG. 5 is a flowchart of a third implementation of a method for pasting a cell according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a spreadsheet of the method of pasting the cells shown in FIG. 5;
fig. 7 is a schematic structural view of a pasting device for unit cells according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to solve the problems in the prior art, the embodiment of the invention provides a method, a device, electronic equipment and a storage medium for pasting cells, so that the to-be-pasted content can be quickly pasted on the cells, and the working efficiency of staff is improved.
Next, a method for pasting a cell according to an embodiment of the present invention will be described, as shown in fig. 2, which is a flowchart of a first implementation of a method for pasting a cell according to an embodiment of the present invention, where the method may include:
s210, obtaining the cell copied by the user and the target pasting area selected by the user.
In some examples, when a user copies and pastes cells in a spreadsheet, the cells are typically copied first to paste the copied cells to a target paste area, so when the user copies the cells, an electronic device applying a cell paste method according to an embodiment of the present invention may receive a command from the user to copy the cells and a selected cell to be copied. Therefore, the cell can be copied, and after the cell is copied, the electronic equipment can acquire the cell copied by the user.
In still other examples, when a user is to paste a copied cell, a paste area may be selected first. For example, the user may use a mouse to frame a plurality of cells in the spreadsheet as the target paste region. When the user selects a plurality of cells in the frame, the electronic device may acquire the selected plurality of cells as the target pasting area. Thus, the electronic apparatus can acquire the target pasting region.
S220, when a pasting instruction is received, if the target pasting area contains non-empty cells, the content in the non-empty cells is kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area.
In some examples, after the electronic device acquires the cell copied by the user and the target pasting area selected by the user, the cell of the target pasting area is pasted for convenience, because the target pasting area may have non-empty cells and empty cells. It may be first determined whether a non-empty cell is included in the target paste area.
In some examples, a cell in the target paste area may be described as a non-empty cell when it has a corresponding value, otherwise, the cell is an empty cell. Therefore, the electronic apparatus described above can determine whether there is a non-empty cell by determining whether a cell in the target pasting region has a corresponding value.
If the target pasting area contains non-empty cells, the electronic device can keep the content in the non-empty cells; and a display window is displayed, which can be used to remind the user not to paste the non-empty cell.
In some examples, the electronic device may further present a selection window to the user, so that the user selects whether to paste the non-empty cell, and when the user selects not to paste the non-empty cell, the content in the non-empty cell is maintained, and otherwise, the copied cell is pasted to the non-empty cell.
If the target pasting area includes a plurality of empty cells, the electronic device may paste the cells copied by the user to the plurality of empty cells in the target pasting area.
In still other examples, it may be possible that the user may input a paste instruction to the electronic device described above using a keyboard input, for example, send a paste instruction to the electronic device described above using a shortcut key "ctrl+v" of the keyboard input, and may also send a paste instruction in a selected target paste area using a mouse selection, for example, select a "paste" instruction using a right mouse button. Therefore, the electronic device can receive the paste instruction of the user.
When pasting the copied cells, the cell copied by the user and the target pasting area selected by the user can be obtained, and when a pasting instruction is received, if the target pasting area contains non-empty cells, the content in the non-empty cells is kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area. In this way, the copied cells can be prevented from being pasted into the non-empty cells existing in the target pasting area, and the copied cells can be pasted into the plurality of empty cells existing in the target pasting area, so that the copied contents do not need to be pasted by a worker, the quick pasting of the contents to be pasted to the cells can be realized, and the working efficiency of the worker is improved.
In some examples, a user may copy one cell or may copy multiple cells when copying, so different processing methods are provided for different copying methods according to the embodiments of the present invention.
When the cell copied by the user is a cell, on the basis of a pasting method of a cell shown in fig. 2, the 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 a pasting method of a cell of the embodiment of the present invention, where the method may include:
S310, acquiring a cell copied by a user and a target pasting area selected by the user.
S320, when a pasting instruction is received, if the target pasting area contains non-empty cells, the content in the non-empty cells is kept; if the target pasting area contains a plurality of empty cells, pasting one cell copied by the user to all the empty cells in the target pasting area.
In some examples, when the user copies one cell, after receiving the paste instruction, the electronic device may maintain the content of the non-empty cell in the target paste area if the target paste area includes the non-empty cell, and if the target paste area includes a plurality of empty cells, the electronic device may paste the one cell copied by the user to all the empty cells in the target paste area.
Thus, the copy can be carried out once, and the copied content can be pasted into the target pasting area selected by the user, so that the problem that the user can paste for a plurality of times before the pasting is completed can be avoided.
For example, it is assumed that the cell copied by the user is cell A1 shown in fig. 4, the target pasting region selected by the user is a region from cell A1 to cell B8, and in this target pasting region, all of cell A3, cell A5, cell A7, cell B3, cell B5, and cell B7 have contents, and therefore, are non-empty cells, and all of the cells other than cell A1 in this target pasting region are empty cells. The above-described electronic device may keep the contents of the cells A3, A5, A7, A3, A5, and A7 unchanged, and then may paste the cell A1 to the cells A2, A4, A6, A8, A1, A2, A4, A6, and A8. The final paste results are shown in fig. 4. Therefore, the quick pasting can be realized, and the working efficiency of staff is improved.
In some examples, when pasting one cell of the copy into all the empty cells in the target pasting area, the electronic device may paste the attribute of the cell of the copy into all the empty cells in the target pasting area in addition to pasting the content of the cell of the copy into all the empty cells in the target pasting area, so that the empty cells inherit the attribute of the cell of the copy.
In some examples, the attribute may include a cell table format, a font in cell format, and the like.
In still other examples, when pasting the copied cell into all the empty cells in the target pasting area, the electronic device may further display the pasted cell differently from the non-empty cells in the target pasting area, so as to facilitate the user to check the content in the pasted cell.
When the cell copied by the user is a plurality of cells, on the basis of a cell pasting method shown in fig. 2, the embodiment of the present invention further provides a possible implementation manner, as shown in fig. 5, which is a flowchart of a third implementation manner of a cell pasting method according to an embodiment of the present invention, where the method may include:
S510, acquiring a plurality of cells copied by a user and a target pasting area selected by the user.
In some examples, the plurality of cells may include at least one of: a plurality of cells in at least one row of cells, a plurality of cells in at least one column of cells.
S520, when a paste instruction is received, determining position information of a first cell in a plurality of cells copied by a user.
Wherein the first cell is any one of a plurality of cells copied by the user;
s530, in the target pasting area, inquiring whether the cell with the same position information as the first cell is a non-empty cell or not; if yes, go to step S540; if not, step S550 is performed.
S540, holding the content in the cell having the same position information as the first cell, and executing step S560;
s550, pasting the content in the first cell to a cell with the same position information as the first cell, and executing step S560;
in some examples, when the user copies the plurality of cells, after receiving the paste instruction, the electronic device may select one cell among the cells copied by the user after receiving the paste instruction, and then determine the location information of the selected cell in the copied plurality of cells.
For example, assume that a plurality of cells copied by the user are cells of this area of cells A1 to B8. The electronic device may select the cell A6 as the first cell, and then may determine that the position information of the cell A6 in the plurality of cells is the 1 st column and the 6 th row, and when the first cell selected by the user is the B7, the position information of the first cell B7 in the plurality of cells is the 2 nd column and the 7 th row.
In the electronic device, after determining the position information of the selected first cell in the plurality of cells, in order to implement pasting of the copied cell, in the selected target pasting area, a cell having the same position information as the first cell may be determined, and then whether the cell having the same position information as the first cell is a non-empty cell may be determined. If yes, go to step S540; if not, step S550 is performed.
For example, assuming that the first cell selected by the above-described electronic device is A6, the cell having the same positional information as the first cell A6 is C6, and the positional information of the cell C6 in the target pasting area is also column 1 and row 6. It may then be determined whether the cell C6 is a non-empty cell. Since no content exists in the cell C6, the cell C6 is an empty cell. The electronic device may perform step S550.
For another example, assuming that the first cell selected by the electronic device is B7, the cell having the same positional information as the first cell B7 is D7, and the positional information of the cell D7 in the target pasting region is also 1 st column and 6 th line. It may then be determined whether the cell D7 is a non-empty cell. Since the cell D7 has content, the cell D7 is a non-empty cell. The electronic device may perform step S540.
In some examples, when determining whether a cell is a non-empty cell, the electronic device may determine whether the cell has a corresponding value, and when the cell has a value, it may indicate that the cell is a non-empty cell, and when the cell does not have a value, it may indicate that the cell is an empty cell.
In the above electronic device, after the first cell is determined, in order to avoid pasting the first cell to the non-empty cell, when the cell having the same position information as the first cell is the non-empty cell, the content in the cell having the same position information as the first cell may be maintained. When the cell with the same position information as the first cell is an empty cell, pasting the content in the first cell into the cell with the same position information as the first cell.
In this way, the content in the first cell can be pasted into all the empty cells having the corresponding positions with the first cell.
S560, among the plurality of cells duplicated by the user other than the first cell, one cell is reselected as the first cell, and the step of determining the position information of the first cell among the plurality of cells duplicated by the user in step S520 is repeatedly performed.
In some examples, after the above steps are adopted to paste the content in one of the cells, the electronic device may reselect one cell from among the cells copied by the user except the first cell as the first cell, and then repeat the steps S520 to S550.
Repeating steps S520 to S550 until all cells in the plurality of cells copied by the user are selected, i.e., each cell in the plurality of cells copied by the user is used as the first cell.
For example, if the first cell selected by the user is A6, since the cell C6 having the same positional information as the cell A6 is an empty cell, the content "in the cell A6" can be obtained " f", to the cell C6. When the first cell selected by the user is B7, since the cell D7 having the same positional information as the first cell B7 is a non-empty cell, the content of the cell B7 cannot be "l", is pasted to the cell D7, and thus, the content in the cell D7 can be kept unchanged.
The above steps are repeatedly performed, and finally, the pasting result as shown in fig. 6 can be obtained. That is, the content of cell A2 is pasted to cell C2, the content of cell A4 is pasted to cell C4, the content of cell A6 is pasted to cell C6, the content of cell A8 is pasted to cell C8, the content of cell B1 is pasted to cell D1, the content of cell B2 is pasted to cell D2, the content of cell B4 is pasted to cell D4, the content of cell B6 is pasted to cell D6, and the content of cell B8 is pasted to cell D8.
Therefore, when a plurality of cells are copied by a user, the user can copy once, and the copied content can be pasted to the target pasting area selected by the user, so that the problem that the user can paste for a plurality of times and can paste the copied content is solved. Thereby improving the working efficiency of the staff.
In some examples, the electronic device may paste the attribute of the first cell into the cell having the same location information as the first cell, in addition to the content in the first cell being pasted into the cell having the same location information as the first cell, while the cell having the same location information as the first cell inherits the attribute of the first cell.
In still other examples, after the first cell is pasted to the cell having the same location information as the first cell, the electronic device may further display the pasted cell having the same location information as the first cell, differently from the non-empty cell in the target pasting area, so as to check the content in the pasted cell having the same location information as the first cell.
In some examples, the differential display may be to set a different color from the non-empty cell for a cell having the same positional information as the first cell after pasting, or to set a different color or font from the content of the non-empty cell for the content of a cell having the same positional information as the first cell after pasting, or the like.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a device for attaching a unit cell, as shown in fig. 7, which is a schematic structural diagram of a device for attaching a unit cell according to the embodiment of the present invention, where the device may include:
a target pasting region obtaining module 710, configured to obtain a cell copied by a user and a target pasting region selected by the user, where the target pasting region includes at least one non-empty cell and at least two empty cells;
a pasting module 720, configured to, when receiving a pasting instruction, if the target pasting area includes a non-empty cell, keep the content in the non-empty cell; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area.
When pasting the copied cells, the pasting device for the cells can firstly acquire the cells copied by the user and the target pasting area selected by the user, and when a pasting instruction is received, if the target pasting area contains non-empty cells, the content in the non-empty cells is kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area. In this way, the copied cells can be prevented from being pasted into the non-empty cells existing in the target pasting area, and the copied cells can be pasted into the plurality of empty cells existing in the target pasting area, so that the copied contents do not need to be pasted by a worker, the quick pasting of the contents to be pasted to the cells can be realized, and the working efficiency of the worker is improved.
Optionally, the target pasting area acquiring module 710 is specifically configured to:
acquiring a cell copied by a user and a target pasting area selected by the user;
the paste module 720 is specifically configured to:
and pasting one cell copied by the user to all the empty cells in the target pasting area.
Optionally, the target pasting area acquiring module 710 is specifically configured to:
acquiring a plurality of cells copied by a user and a target pasting area selected by the user;
optionally, the pasting module 720 includes:
the first cell position information determining sub-module is used for determining the position information of a first cell in a plurality of cells copied by a user when a paste instruction is received, wherein the first cell is any cell in the plurality of cells copied by the user;
the inquiring submodule is used for inquiring whether the cell with the same position information as the first cell is a non-empty cell or not in the target pasting area; if yes, triggering a holding sub-module, and if not, triggering a sticking sub-module;
a holding sub-module for holding contents in cells having the same positional information as the first cell;
the pasting sub-module is used for pasting the content in the first cell to the cell with the same position information as the first cell;
And the cell selection sub-module is used for reselecting one cell from a plurality of cells duplicated by the user except the first cell as the first cell and triggering the first cell position information determination sub-module.
Optionally, the pasting sub-module is specifically configured to:
and pasting the content and the cell attribute in the first cell to the cell with the same position information as the first cell.
Optionally, the pasting device of the unit cell further includes:
and the distinguishing display module is used for distinguishing and displaying the pasted cells with the same position information as the first cells and the non-empty cells in the target pasting area.
The embodiment of the present invention further provides an electronic device, as shown in fig. 8, including a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete communication with each other through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801, when executing the program stored in the memory 803, implements the following steps:
obtaining a cell copied by a user and a target pasting area selected by the user, wherein the target pasting area comprises at least one non-empty cell and at least two empty cells;
When a paste instruction is received, if the target paste area contains non-empty cells, the contents in the non-empty cells are kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-ProgrammableGate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
When pasting the copied cell, the electronic device provided by the embodiment of the invention can firstly obtain the cell copied by the user and the target pasting area selected by the user, and when a pasting instruction is received, if the target pasting area contains a non-empty cell, the content in the non-empty cell is kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area. In this way, the copied cells can be prevented from being pasted into the non-empty cells existing in the target pasting area, and the copied cells can be pasted into the plurality of empty cells existing in the target pasting area, so that the copied contents do not need to be pasted by a worker, the quick pasting of the contents to be pasted to the cells can be realized, and the working efficiency of the worker is improved.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the following steps when being executed by a processor:
obtaining a cell copied by a user and a target pasting area selected by the user, wherein the target pasting area comprises at least one non-empty cell and at least two empty cells;
When a paste instruction is received, if the target paste area contains non-empty cells, the contents in the non-empty cells are kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area.
When pasting the copied cells, the computer readable storage medium provided by the embodiment of the invention can firstly obtain the cells copied by the user and the target pasting area selected by the user, and when a pasting instruction is received, if the target pasting area contains non-empty cells, the contents in the non-empty cells are kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area. In this way, the copied cells can be prevented from being pasted into the non-empty cells existing in the target pasting area, and the copied cells can be pasted into the plurality of empty cells existing in the target pasting area, so that the copied contents do not need to be pasted by a worker, the quick pasting of the contents to be pasted to the cells can be realized, and the working efficiency of the worker is improved.
The 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:
obtaining a cell copied by a user and a target pasting area selected by the user, wherein the target pasting area comprises at least one non-empty cell and at least two empty cells;
when a paste instruction is received, if the target paste area contains non-empty cells, the contents in the non-empty cells are kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area.
When pasting the copied cell, the computer program product containing the instruction provided by the embodiment of the invention can firstly obtain the cell copied by the user and the target pasting area selected by the user, and when the pasting instruction is received, if the target pasting area contains the non-empty cell, the content in the non-empty cell is kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area. In this way, the copied cells can be prevented from being pasted into the non-empty cells existing in the target pasting area, and the copied cells can be pasted into the plurality of empty cells existing in the target pasting area, so that the copied contents do not need to be pasted by a worker, the quick pasting of the contents to be pasted to the cells can be realized, and the working efficiency of the worker is improved.
The embodiment of the invention also provides a computer program which when run on a computer causes the computer to perform the steps of:
obtaining a cell copied by a user and a target pasting area selected by the user, wherein the target pasting area comprises at least one non-empty cell and at least two empty cells;
when a paste instruction is received, if the target paste area contains non-empty cells, the contents in the non-empty cells are kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area.
When pasting the copied cells, the computer program provided by the embodiment of the invention can firstly obtain the cells copied by the user and the target pasting area selected by the user, and when a pasting instruction is received, if the target pasting area contains non-empty cells, the contents in the non-empty cells are kept; if the target pasting area contains a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area. In this way, the copied cells can be prevented from being pasted into the non-empty cells existing in the target pasting area, and the copied cells can be pasted into the plurality of empty cells existing in the target pasting area, so that the copied contents do not need to be pasted by a worker, the quick pasting of the contents to be pasted to the cells can be realized, and the working efficiency of the worker is improved.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A method of pasting cells, the method comprising:
acquiring a cell copied by a user and a target pasting area selected by the user;
when a paste instruction is received, if the target paste area contains non-empty cells, keeping the content in the non-empty cells; if the target pasting area comprises a plurality of empty cells, pasting the cells copied by the user to the empty cells in the target pasting area;
the obtaining the user copied cell and the user selected target pasting area comprises the following steps:
acquiring a plurality of cells copied by the user and a target pasting area selected by the user;
when receiving a pasting instruction, if the target pasting area contains non-empty cells, keeping the content in the non-empty cells; if the target pasting area includes a plurality of empty cells, pasting the cells copied by the user to the plurality of empty cells in the target pasting area, including:
When a paste instruction is received, determining position information of a first cell in a plurality of cells copied by the user, wherein the first cell is any cell in the plurality of cells copied by the user;
in the target pasting area, inquiring whether a cell with the same position information as the first cell is a non-empty cell or not;
if so, maintaining the content in the cell with the same position information as the first cell;
if not, pasting the content in the first cell to the cell with the same position information as the first cell.
2. The method of claim 1, wherein after said pasting the content in the first cell to the cell having the same location information as the first cell, the method further comprises:
and re-selecting one cell from among the plurality of cells duplicated by the user except the first cell as the first cell, and repeating the step of determining the position information of the first cell from among the plurality of cells duplicated by the user.
3. The method of claim 2, wherein pasting the content in the first cell to the cell having the same location information as the first cell comprises:
And pasting the content and the cell attribute in the first cell to the cell with the same position information as the first cell.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
and distinguishing and displaying the pasted cells with the same position information as the first cells and the non-empty cells in the target pasting area.
5. A cell attaching device, characterized in that the device comprises:
the target pasting area acquisition module is used for acquiring the unit cells copied by the user and the target pasting area selected by the user;
the pasting module is used for maintaining the content in the non-empty cells if the target pasting area contains the non-empty cells when a pasting instruction is received; if the target pasting area comprises a plurality of empty cells, pasting the cells copied by the user to the empty cells in the target pasting area;
the target pasting area acquisition module is specifically configured to:
acquiring a plurality of cells copied by the user and a target pasting area selected by the user;
the paste module includes:
A first cell position information determining sub-module, configured to determine, when receiving a paste instruction, position information of a first cell of a plurality of cells copied by the user, where the first cell is any cell of the plurality of cells copied by the user;
a query sub-module, configured to query, in the target pasting area, whether a cell having the same location information as the first cell is a non-empty cell; if yes, triggering a holding sub-module, and if not, triggering a sticking sub-module;
the holding sub-module is used for holding the content in the cell with the same position information as the first cell;
and the pasting submodule is used for pasting the content in the first cell to the cell with the same position information as the first cell.
6. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the paste module further comprises:
and the cell selection sub-module is used for reselecting one cell from a plurality of cells duplicated by the user except the first cell as the first cell and triggering the first cell position information determination sub-module.
7. The device according to claim 6, characterized in that said paste submodule is in particular adapted to:
and pasting the content and the cell attribute in the first cell to the cell with the same position information as the first cell.
8. The apparatus according to claim 6 or 7, characterized in that the apparatus further comprises:
and the distinguishing display module is used for distinguishing and displaying the pasted cells with the same position information as the first cells and the non-empty cells in the target pasting area.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-4 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-4.
CN201910270201.6A 2019-04-04 2019-04-04 Cell pasting method and device, electronic equipment and storage medium Active CN111783408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910270201.6A CN111783408B (en) 2019-04-04 2019-04-04 Cell pasting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910270201.6A CN111783408B (en) 2019-04-04 2019-04-04 Cell pasting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111783408A CN111783408A (en) 2020-10-16
CN111783408B true CN111783408B (en) 2023-09-19

Family

ID=72755170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910270201.6A Active CN111783408B (en) 2019-04-04 2019-04-04 Cell pasting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111783408B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113779479B (en) * 2021-09-15 2024-02-06 京东科技控股股份有限公司 Webpage form editing method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095167A (en) * 2015-06-10 2015-11-25 努比亚技术有限公司 Method and device for multiple copy and paste in mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7954047B2 (en) * 2007-08-06 2011-05-31 Apple Inc. Cutting and copying discontiguous selections of cells
US10437428B2 (en) * 2017-05-23 2019-10-08 Microsoft Technology Licensing, Llc Scatter copy supporting partial paste functionality
US11354494B2 (en) * 2017-07-10 2022-06-07 Adaptam Inc. Methods and systems for connecting a spreadsheet to external data sources with formulaic specification of data retrieval

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095167A (en) * 2015-06-10 2015-11-25 努比亚技术有限公司 Method and device for multiple copy and paste in mobile terminal

Also Published As

Publication number Publication date
CN111783408A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN109614424B (en) Page layout generation method, device, computing equipment and medium
US10936804B2 (en) Spreadsheet cell calculation view providing multiple-representation editing
CN111414727B (en) Editing method and device for PDF document header footer and electronic equipment
US10951486B2 (en) Terminal device, UI expansion method, and UI expansion program
CN107391914B (en) Parameter display method, device and equipment
CN111783408B (en) Cell pasting method and device, electronic equipment and storage medium
CN109814778B (en) Method and device for realizing small program tab, electronic equipment and medium
CN112232046B (en) Method and device for displaying repeated items of table
CN111897661B (en) Cell content copying method and device in electronic table and electronic equipment
CN113988008A (en) Document object size adjusting method and device, electronic equipment and storage medium
CN111832270B (en) Method and device for displaying line numbers and column labels of tables in non-table document and electronic equipment
CN110795922B (en) Form information display method and device for PDF document and electronic equipment
CN112035108A (en) User interface layout design method, system, terminal and medium
CN106095734B (en) Text display method and device
CN111898344B (en) Method and device for pasting unit cell, electronic equipment and storage medium
CN112417822A (en) Method and device for replacing pictures in spreadsheet cells and electronic equipment
CN111199136A (en) Document content display method, device and equipment
US20230386105A1 (en) Graphical user interface
CN112788091B (en) Document content providing system, document content collecting method, device and equipment
CN112417834A (en) Document processing method and device and electronic equipment
CN109976601B (en) Common screen display window segmentation method and system
CN112784564A (en) Document generation method and device
CN110309103B (en) Document opening method and device, electronic equipment and readable storage medium
CN112328157A (en) Method and device for selecting cell, electronic equipment and readable storage medium
WO2020057378A1 (en) Method and apparatus for previewing pattern to be inserted, and electronic device and storage medium

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