CN115809646A - Table data control method and device - Google Patents

Table data control method and device Download PDF

Info

Publication number
CN115809646A
CN115809646A CN202211480488.3A CN202211480488A CN115809646A CN 115809646 A CN115809646 A CN 115809646A CN 202211480488 A CN202211480488 A CN 202211480488A CN 115809646 A CN115809646 A CN 115809646A
Authority
CN
China
Prior art keywords
cell
cells
target
data
merged
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
CN202211480488.3A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211480488.3A priority Critical patent/CN115809646A/en
Publication of CN115809646A publication Critical patent/CN115809646A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to the technical field of computers, and discloses a table data control method and a table data control device, so that a user can move rows or columns with partial intersection with merging cells without manually canceling the merging function of the merging cells, the operation is convenient and fast, errors are not easy to occur, and the efficiency is high. The method comprises the following steps: moving a target cell sequence in response to a position adjustment operation of the target cell sequence displayed for a target area in a table, the target cell sequence comprising a partial cell in a merged cell; and displaying the target cell sequence at a target position indicated by the position adjustment operation, wherein the data displayed in the partial cells is the data displayed in the merged cells.

Description

Table data control method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for controlling table data.
Background
In the process of editing the table, the position of data in the table often needs to be adjusted, for example, the data in the first row is moved to the position of the tenth row, the data in the fifth column is moved to the position of the second column, and the related office software provides some convenient operations to assist the user in quickly adjusting the position of the data, such as the movement of the row or the column through the functions of cutting and pasting. However, when the row or column moved by the user includes a part of the cells in the merged cells, the user needs to cancel the merge function of the merged cells manually to move the data of a certain row or a certain column, which is cumbersome and prone to error.
Disclosure of Invention
The embodiment of the application provides a table data control method and device, so that a user can move rows or columns with partial intersection with merging cells without manually canceling the merging function of the merging cells, the operation is convenient and fast, and mistakes are not easy to occur.
In one aspect, an embodiment of the present application provides a table data control method, including:
moving a target cell sequence displayed for a target area in a table in response to a position adjustment operation of the target cell sequence, wherein the target cell sequence comprises a part of cells in a merged cell;
and displaying the target cell sequence at the target position indicated by the position adjusting operation, wherein the data displayed in the partial cells is the data displayed in the merged cells.
Optionally, before displaying each target cell sequence at each target position, the method includes:
and responding to the sorting operation, and carrying out cell splitting processing on the merged cells in the target area.
Optionally, the performing cell splitting processing on the merged cell in the target region includes:
and for any merged cell in the target area, carrying out cell splitting processing on any merged cell along a splitting direction, wherein the splitting direction is consistent with the arrangement direction of the target cell sequence.
Optionally, before the data displayed in the first cell and the data displayed in the second cell are exchanged and displayed, the method includes:
responding to the second dragging operation, and displaying option information for prompting a user to select an operation type, wherein the option information comprises data replacement and data coverage;
when the data coverage in the option information is triggered, displaying the data displayed in the first cell in the second cell;
the displaying the data displayed in the first cell and the data displayed in the second cell in an exchange manner includes:
and when the data replacement in the option information is triggered, exchanging and displaying the data displayed in the first cell and the data displayed in the second cell.
Optionally, the moving the target cell sequence with the first moving trajectory includes:
and displaying the target cell sequence in a floating layer mode along the first moving track.
In one aspect, an embodiment of the present application provides a table data control method, including:
according to the position adjustment operation of a target cell sequence displayed by a target area in a table, obtaining cell attribute data of each cell in the target cell sequence from a two-dimensional array corresponding to the table, wherein the target cell sequence comprises partial cells in a merged cell, and the cell attribute data comprises a display data value;
updating the display data values of the partial cells to the data displayed in the merged cell;
and moving the cell attribute data of each cell in the target cell sequence to an area corresponding to the target position indicated by the position adjustment operation in the two-dimensional array.
Optionally, the cell attribute data further includes a merge attribute value, where the merge attribute value is used to indicate a merge cell to which a cell belongs, and the moving the cell attribute data of each cell in the target cell sequence to a position before the target position indicated by the position adjustment operation is in the corresponding area in the two-dimensional array, the method further includes:
and updating the merged attribute value of the cells except the partial cells in the merged cell, and updating the merged attribute value of the partial cells to split the part except the partial cells in the merged cell and the partial cells into two parts.
Optionally, the method further comprises:
if two adjacent cells in any merged cell are located on two sides of the target position, respectively updating the merged attribute values of the cells located on two sides of the target position in any merged cell, so that any cell is split into two parts along adjacent edges of the two adjacent cells.
Optionally, before moving the cell attribute data of each cell in each target cell sequence to the region corresponding to each target cell sequence, the method further includes:
and updating the merged attribute value of each cell in the merged cells in the target area to finish the cell splitting processing of the merged cells in the target area.
Optionally, the moving the cell attribute data of each cell in the target cell sequence to a position after the target position indicated by the position adjustment operation is in the corresponding area in the two-dimensional array, the method further includes:
and if the data in any cell in the table is the same as the data in the cell adjacent to the any cell, updating the merged attribute value of the any cell and the adjacent cell so as to merge the any cell and the adjacent cell into a merged cell.
Optionally, exchanging the display data values of any two cells in the table according to the data replacement operation for the two cells specifically includes:
acquiring a second end point position of a moving track of a second dragging operation according to the second dragging operation aiming at a first cell in the table;
determining a second cell corresponding to the second end point position in the table;
swapping the display data value of the first cell and the display data value of the second cell.
Optionally, before exchanging the display data value of the first cell and the display data value of the second cell, the method further includes:
according to the second dragging operation, displaying option information for prompting a user to select an operation type, wherein the option information comprises data replacement and data coverage;
when the data coverage in the option information is triggered, updating the display data value of the second cell to the display data value of the first cell;
the exchanging the display data value of the first cell and the display data value of the second cell specifically includes:
and when the data replacement in the option information is triggered, exchanging the display data value of the first cell and the display data value of the second cell.
In one aspect, an embodiment of the present application provides a table data control apparatus, including:
a moving module, configured to move a target cell sequence in response to a position adjustment operation for the target cell sequence displayed in a target area in a table, where the target cell sequence includes a partial cell in a merged cell;
and the display module is used for displaying the target cell sequence at the target position indicated by the position adjustment operation, wherein the data displayed in the partial cells is the data displayed in the merged cells.
Optionally, the position adjusting operation is a first dragging operation of dragging the target cell sequence to the target position, then:
the moving module is specifically configured to move the target cell sequence according to a first moving track of the first dragging operation by using the first moving track;
the display module is specifically configured to: determining a target position according to a first end position of the first moving track in the table; and displaying the target cell sequence at the target location.
Optionally, the display module is specifically configured to display the target cell sequence in a floating layer along the first movement track.
Optionally, the display module is further configured to split and display a part of the merged cell except the partial cell into a new merged cell before moving the target cell sequence with the first movement trajectory, and display the partial cell and other cells in the target cell sequence in a combined manner.
Optionally, the table data control apparatus further includes a splitting module, configured to split any merged cell into two parts along adjacent edges of two adjacent cells if the two adjacent cells in any merged cell are located on two sides of the target location before the target location displays the target cell sequence.
Optionally, the position adjusting operation is an operation of sorting a row of cells in the target area in a specified sorting manner, where the target area includes a plurality of target cell sequences, and at least one target cell sequence in the plurality of target cell sequences includes a partial cell in a merged cell, then:
the moving module is specifically configured to move each target cell sequence in the target area in response to the sorting operation for the row of cells;
the display module is specifically used for determining the target positions corresponding to the target cell sequences according to the specified sorting mode; and respectively displaying each target cell sequence at each target position.
Optionally, the splitting module is further configured to perform cell splitting processing on the merged cell in the target area in response to the sorting operation before each target position displays each target cell sequence respectively.
Optionally, the splitting module is specifically configured to, for any merged cell in the target area, perform cell splitting on the merged cell along a splitting direction, where the splitting direction is consistent with an arrangement direction of the target cell sequence.
Optionally, the table data control device further includes a merging module, configured to, after the target cell sequence is displayed at the target position indicated by the position adjustment operation, perform a cell merging operation on any cell and an adjacent cell if data in the any cell in the table is the same as data in a cell adjacent to the any cell.
Optionally, the table data control device further includes a replacement module, configured to, in response to a data replacement operation for any two cells in the table, perform display-swapping on data respectively displayed in the two cells.
Optionally, the replacement module is specifically configured to:
responding to a second dragging operation aiming at a first cell in the table, and acquiring a second end point position of a moving track of the second dragging operation;
determining a second cell corresponding to the second end point position in the table;
and performing exchange display on the data displayed in the first cell and the data displayed in the second cell.
Optionally, the display module is further configured to display, in response to the second dragging operation, option information for prompting a user to select an operation type, where the option information includes data replacement and data coverage; when the data coverage in the option information is triggered, displaying the data displayed in the first cell in the second cell;
the replacement module is specifically configured to, when data replacement in the option information is triggered, perform display exchange between the data displayed in the first cell and the data displayed in the second cell.
In one aspect, an embodiment of the present application provides a table data control apparatus, including:
an obtaining module, configured to obtain cell attribute data of each cell in a target cell sequence from a two-dimensional array corresponding to a table according to a position adjustment operation on the target cell sequence displayed in a target area in the table, where the target cell sequence includes a part of cells in a merged cell, and the cell attribute data includes a display data value;
the updating module is used for updating the display data values of the partial cells into the data displayed in the merged cells;
and the data moving module is used for moving the cell attribute data of each cell in the target cell sequence to the corresponding area of the target position indicated by the position adjusting operation in the two-dimensional array.
Optionally, the position adjusting operation is a first dragging operation of dragging the target cell sequence to the target position, and then:
the data moving module is specifically configured to:
determining a target position according to a first end position of a first movement track of the first dragging operation in the table;
determining a corresponding area of the target position in the two-dimensional array;
and moving the cell attribute data of each cell in the target cell sequence to the corresponding area of the target position in the two-dimensional array.
Optionally, the cell attribute data further includes a merge attribute value, where the merge attribute value is used to represent a merge cell to which the cell belongs, and the update module is further configured to move the cell attribute data of each cell in the target cell sequence to a position before a corresponding region in the two-dimensional array, where a target position indicated by the position adjustment operation is indicated by the position adjustment operation, update the merge attribute values of the cells other than the partial cell in the merge cell, and update the merge attribute values of the partial cell, so as to split a part other than the partial cell in the merge cell and the partial cell into two parts.
Optionally, the updating module is further configured to, if two adjacent cells in any merged cell are located on two sides of the target location, respectively update the merged attribute value of each cell located on two sides of the target location in any merged cell, so as to split the any cell into two parts along adjacent edges of the two adjacent cells.
Optionally, the position adjusting operation is an operation of sorting a row of cells in the target area in a specified sorting manner, where the target area includes a plurality of target cell sequences, and at least one target cell sequence in the plurality of target cell sequences includes a partial cell in a merged cell, then:
the obtaining module is specifically configured to obtain cell attribute data of each cell in the target cell sequences from a two-dimensional array corresponding to the table according to a sorting operation for the row of cells;
the data moving module is specifically configured to:
determining target positions corresponding to all the target cell sequences according to the specified sorting mode;
determining areas corresponding to the target positions in the two-dimensional array respectively;
and moving the cell attribute data of each cell in each target cell sequence to the corresponding area of each target position in the two-dimensional array.
Optionally, the updating module is further configured to update the merged attribute value of each of the merged cells in the target region, so as to complete the cell splitting process on the merged cells in the target region.
Optionally, the updating module is further configured to update the merge attribute value of any cell and the adjacent cell after the data moving module executes the data, so that the any cell and the adjacent cell are merged into one merge cell, if the data in any cell in the table is the same as the data in the cell adjacent to the any cell.
Optionally, the updating module is further configured to swap display data values of any two cells in the table according to a data replacement operation for the two cells.
Optionally, the update module is further configured to:
according to a second dragging operation aiming at a first cell in the table, acquiring a second end point position of a moving track of the second dragging operation;
determining a second cell corresponding to the second end point position in the table;
swapping the display data value of the first cell and the display data value of the second cell.
Optionally, the update module is further configured to:
according to the second dragging operation, displaying option information for prompting a user to select an operation type, wherein the option information comprises data replacement and data coverage;
when the data coverage in the option information is triggered, updating the display data value of the second cell to the display data value of the first cell;
and when the data replacement in the option information is triggered, exchanging the display data value of the first cell and the display data value of the second cell.
In one aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods when executing the computer program.
In one aspect, an embodiment of the present application provides a computer-readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the steps of any of the above-described methods.
In one aspect, an embodiment of the present application provides a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in any of the various alternative implementations of control of TCP transmission performance described above.
The form data control method, the device, the electronic device and the storage medium provided by the embodiment of the application have the advantages that when a user needs to adjust the position of a target cell sequence in a form, only one position adjustment operation needs to be input, the form editing application can respond to the position adjustment operation, merging cell splitting processing is automatically carried out on a merging cell which is partially intersected with the target cell sequence on a background, namely, partial cells which belong to the target cell sequence in the merging cell are split from original merging cells, so that the target cell sequence is convenient to move, meanwhile, the split partial cells inherit data displayed in the original merging cells, partial rows or columns in the merging cells can be moved independently, therefore, the user does not need to manually cancel the merging function of the merging cells, the rows or columns which are partially intersected with the merging cells can be moved, the operation is convenient and not easy to make mistakes, and the efficiency is high.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1A is a schematic view of an application scenario of a table data control method according to an embodiment of the present application;
fig. 1B is a schematic view of an application scenario of a table data control method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a table data control method according to an embodiment of the present application;
fig. 3A is an operation diagram illustrating an operation of adjusting a position of a target cell sequence in a table through a drag operation according to an embodiment of the present application;
fig. 3B is an operation diagram illustrating a position of a target cell sequence in a table adjusted by a drag operation according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a table data control method when the position adjustment operation is the first drag operation according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a table data control method according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating operations of adjusting a position of a target cell sequence in a table through a cut-and-paste operation according to an embodiment of the present application;
fig. 7 is a schematic diagram of a horizontal splitting and merging cell and a vertical splitting and merging cell provided in an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating operations of adjusting a position of a target cell sequence in a table through a sorting operation according to an embodiment of the present application;
fig. 9 is an operation diagram illustrating automatic merging of adjacent cells with the same display content in a table according to an embodiment of the present application;
FIG. 10A is a diagram illustrating a data replacement operation between two independent cells according to an embodiment of the present application;
FIG. 10B is a diagram illustrating a data replacement operation between an individual cell and a merged cell according to an embodiment of the present disclosure;
FIG. 11 is a diagram illustrating a table data control method according to an embodiment of the present application;
fig. 12 is a schematic diagram illustrating a storage format of cell attribute data and a data structure of merge parameters of merge cells according to an embodiment of the present application;
FIG. 13 is a table of data of parameters of MergeReference objects according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a table data control apparatus according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a table data control apparatus according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
For convenience of understanding, terms referred to in the embodiments of the present application are explained below:
independent cells: is the intersection of the rows and columns in the table, which is the smallest unit that makes up the table. Both the entry and modification of the individual data is done in the cells. The independent cells are named according to the row and column positions, such as: address "B5" refers to an individual cell at the intersection of the "B" column and row 5.
Merging the cells: the cell is obtained by merging the cells of at least two adjacent independent cells.
The format of the cell attribute data (CellData) stored in the application background for each individual cell is shown in fig. 12, and includes a display data value (userentalvaluee) and a merge attribute value (mergeReference). The display data values represent the data displayed within an individual cell, e.g., the display data values for individual cell B4 in fig. 3A are: and (4) optimizing the authority, wherein the data displayed in the independent cell at the intersection position of the column B and the row 4 in the table is as follows: and optimizing the permission, wherein if the display data value of the independent cell is null, the data indicates that no data is displayed in the independent cell. The merged attribute value is used for indicating the merged cell to which the independent cell belongs, for example, the merged attribute value of the independent cells A2 to A5 is the merged reference _1, the independent cells A2 to A5 belong to the merged cell with the number of the merged reference _1, and the independent cells A2 to A5 are displayed in the table in the manner of merged cells; if the merged attribute value of the individual cell is null, it indicates that the individual cell does not belong to any merged cell, and it is displayed in the form of an individual cell in the table, such as cells B2, B3, etc. in fig. 3A.
The merging parameters of the merging cells stored in the application background at least comprise the following contents: the merged cell coverage represents the individual cells contained within the merged cell. Specifically, referring to fig. 12, a data structure of a merge parameter is shown, where the sheetId is used to indicate a table to which a merge cell belongs, startColIndex indicates a start column of a merge cell coverage, startRowIndex indicates a start row of the merge cell coverage, endColIndex indicates an end column of the merge cell coverage, and endrowndex indicates an end row of the merge cell coverage, for example, startColIndex of a merge cell is a, endColIndex is B, startRowIndex is 1, endRowIndex is 2, then the merge cell includes four independent cells A1, A2, B1, and B2, positioncentrerkey is a merge cell number, and a merge cell in the table has a unique number.
If the merge attribute value of the independent cell is null, it indicates that the independent cell does not belong to any merge cell, and the data displayed in the independent cell in the table is the display data value of the independent cell at this time. The independent cells in the merged cells are divided into two types, one type is a main cell, the other type is a secondary cell, one merged cell is provided with only one main cell, the independent cell at the upper left corner of the merged cell is generally used as the main cell, the other independent cells except the main cell in the merged cell are secondary cells, the data displayed in the merged cell in the table is the display data value of the main cell, and the display data value of the secondary cell is null.
The cells referred to in the embodiments of the present application may be independent cells or merged cells, unless otherwise specified.
The application comprises the following steps: i.e. application programs, computer programs that can perform one or more services, typically have a visual display interface that can interact with a user, for example, electronic maps, instant messaging tools, excel, etc. may all be referred to as applications. Some applications require the user to install the terminal device, and some applications do not require application installation, such as individual applets in the WeChat. The applet can be used without downloading or installing, and the user can open the application by scanning or searching.
The form editing application: the method refers to office software capable of editing forms, such as various office software of Word, excel, online collaboration forms and the like.
An online collaboration document: the document editing method includes the steps that documents such as word, excel and ppt can be directly edited through the web, a document creator can directly send the documents to other users through links, the other users can view the documents on line, and the users can jointly edit the documents. It should be noted that the forms in the present application include an online collaboration form and a common form.
Any number of elements in the drawings are by way of example and not by way of limitation, and any nomenclature is used for distinction only and not by way of limitation.
In the related technical solution, when a row or a column moved by a user includes a part of cells in merged cells, the user needs to manually cancel merging of the merged cells (i.e., split the merged cells), and then move data of a certain row or a certain column, and further needs to manually perform operation of merging cells according to the data in the moved cells, so as to re-merge the split cells together before moving, which is tedious in operation and prone to errors in the whole process.
Therefore, the embodiment of the present application provides a table data control method, which is applicable to table editing applications, and specifically includes: moving a target cell sequence in response to a position adjustment operation of the target cell sequence displayed for a target area in the table, wherein the target cell sequence comprises a part of cells in the merged cells; and displaying the target cell sequence at the target position indicated by the position adjusting operation, wherein the data displayed in the partial cells are the data displayed in the combined cells. When a user needs to adjust the position of a target cell sequence in a table, the table editing application can respond to the position adjustment operation by inputting once, merging cells with partial intersection with the target cell sequence are automatically split in a background, namely, partial cells in the merging cells, which belong to the target cell sequence, are split from original merging cells, so that the target cell sequence is convenient to move, meanwhile, the split partial cells inherit data displayed in the original merging cells, and partial rows or columns in the merging cells can be independently moved.
After introducing the design concept of the embodiment of the present application, some simple descriptions are provided below for application scenarios to which the technical solution of the embodiment of the present application can be applied, and it should be noted that the application scenarios described below are only used for describing the embodiment of the present application and are not limited. In specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
Fig. 1A is a schematic view of an application scenario of a table data control method according to an embodiment of the present application. The application scenario includes the terminal device 101, the form editing application may be installed in the terminal device 101, a user creates and edits a form through the form editing application in the terminal device 101, or opens an existing form for editing, and the form editing application may execute any form data control method provided in the embodiment of the present application according to an operation of the user on the form, so as to provide a more convenient operation mode for the user.
Fig. 1B is a schematic view of another application scenario of the table data control method according to the embodiment of the present application. The application scenario includes terminal device 101 (including terminal device 101-1, terminal device 101-2,... Terminal device 101-n) and server 102. The terminal device 101 and the server 102 are connected through a wireless or wired network, and the server 102 may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server that provides basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and a big data and artificial intelligence platform. The implementation manner of the terminal device 101 is not particularly limited in the embodiment of the present application, as long as each user can edit the online collaboration document on the terminal device 101. For example, the user 1 creates an online collaboration table through the terminal device 101-1, the online collaboration table is stored in the server 102, the terminal device 101-1 may send a link for acquiring the online collaboration table to the terminal device 101-2 and the terminal device 101-3 through the instant messaging application, the user 2 may view and edit the online collaboration table stored in the server 102 through the link, and the user 3 may view and edit the online collaboration table stored in the server 102 through the link, thereby implementing multi-user online collaboration.
Of course, the method provided in the embodiment of the present application is not limited to the application scenario shown above, and may also be used in other possible application scenarios, and the embodiment of the present application is not limited. Functions that can be implemented by each device in the application scenarios shown in fig. 1A and 1B will be described together in the following method embodiments, and will not be described in detail herein.
To further illustrate the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the accompanying drawings and the detailed description. Although the embodiments of the present application provide method operation steps as shown in the following embodiments or figures, more or fewer operation steps may be included in the method based on conventional or non-inventive labor. In steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the embodiments of the present application.
The following describes a technical solution provided by the embodiment of the present application with reference to application scenarios shown in fig. 1A and fig. 1B. The execution subject of the restricted form data control method according to the embodiment of the present application may be an electronic device installed with a form editing application, for example, a terminal device in fig. 1A, or a server in fig. 1B.
Referring to fig. 2, an embodiment of the present application provides a table data control method, applied to a table editing application, including the following steps:
s201, responding to position adjustment operation of a target cell sequence displayed by a target area in the table, and moving the target cell sequence, wherein the target cell sequence comprises partial cells in the merged cells.
The target area may be one or more rows in the table, one or more columns in the table, or an area of n rows × m columns in the table, where n and m are integers not less than 1. In specific implementation, a user can select a target area in the table by clicking a row number or a column number or by area selection operation, and then input a position adjustment operation for the target area. Alternatively, the table editing application may also determine the target area by a user's designation operation on a designated cell, for example, when the user performs a sorting operation on data in a column of cells, a plurality of rows of cells in which the column of cells is located are determined as the target area.
The target cell sequence refers to a row of cells in the table, and specifically may be a row of cells or a column of cells. The position adjustment operation is an operation of adjusting the position of the target cell sequence in the table, for example, the position of the cell in the row 1 is adjusted to the row 2, and the cell in the column D is adjusted to the column a, and may specifically be a drag operation, a cut-and-paste operation, a sort operation, or the like, and is not limited specifically as long as the operation can trigger the position adjustment of the target cell sequence in the table.
It should be noted that the partial cells referred to in step S201 may include one or more independent cells. At least one target cell sequence may be contained within the target region.
S202, displaying a target cell sequence at a target position indicated by the position adjusting operation, wherein data displayed in a part of cells are data displayed in a combined cell.
Specifically, the target cell sequence is displayed at the target position indicated by the position adjustment operation, that is, the target cell sequence is displayed in the first area corresponding to the target position indicated by the position adjustment operation. The number of the cells contained in the first area and the target area and the structures of the cells are the same, and the cells in the target cell sequence in the target area can be found in the first area. For example, if the target area is an entire row of cells, then the first area is also an entire row of cells; the target area comprises n × m independent cells, and the first area comprises n × m independent cells; referring to fig. 3B, the cells D2 and D3 in the target area constitute one merged cell, and the cells D8 and D9 in the first area inserted at the target position also constitute one merged cell.
In particular implementation, the target position needs to be determined according to a specifically adopted position adjustment operation, for example, when a dragging operation is adopted, the target position may be determined according to an end position of the dragging operation in the table, when a cut-and-paste operation is adopted, the target position may be determined according to a selected position in the table when the paste operation is executed, and when a sorting operation is adopted, the target position may be determined according to a specific sorting result.
Taking fig. 3A as an example, if the cell in the 6 th row is dragged by the user, and the end point position of the dragging operation is the 10 th row, it may be determined that the target position is between the 9 th row and the 10 th row, a row of cells is inserted between the 9 th row and the 10 th row, that is, the first area, after the data in the cell in the 6 th row is dragged into the first area to be displayed, the cell in the 6 th row is deleted, and the row number of each row is adjusted, so that the row number of the inserted row of cells is updated to 9, that is, the first area is the 9 th row. Before moving row 6, the first cell A6 in row 6 belongs to the merged cell "module a", and thus the data displayed in the first cell in the first region is the data "module a" displayed in the merged cell "module a".
Taking fig. 3B as an example, if the user drags the cells in the rows 2 and 3, and the end position of the dragging operation is the row 10, it may be determined that the target position is between the rows 9 and 10, two rows of cells are inserted between the rows 9 and 10, that is, the first area, and after the data in the rows 2 and 3 are dragged to the first area for display, the cells in the rows 2 and 3 are deleted, and the row numbers of the rows are adjusted, and the row numbers of the inserted two rows of cells are updated to be 8 and 9, that is, the first area is the rows 8 and 9. In the target area before moving, A2 and A3 in the 2 nd row and the 3 rd row both belong to the merged cell "module a", D2 and D3 both belong to the merged cell "zhang san", then A2 and A3 will be moved as a whole, and D2 and D3 will be moved as a whole; in the moved first area, A8 and A9 are combined cells, module A is displayed in the combined cells, D8 and D9 are combined cells, and Zhang III is displayed in the combined cells.
Based on the table data control method provided in the above embodiment, when a user needs to adjust the position of the target cell sequence in the table, the user only needs to input one position adjustment operation, the table editing application can respond to the position adjustment operation, and display the data in each cell in the target cell sequence at the target position, that is, display the data in each cell in the target cell sequence in the first region corresponding to the target position, and a part of cells in the target cell sequence that coincide with the merging cell inherit the data displayed in the merging cell.
The embodiment of the application mainly explains the position adjustment of the target cell sequence containing partial cells in the merged cells, and can directly move the target cell sequence to a target position for the target cell sequence not containing the merged cells and the situation that the merged cells are completely positioned in the target cell sequence.
When the position adjustment operation is a first dragging operation of dragging the target cell sequence to the target position, referring to fig. 4, step S201 specifically includes: s401, moving the target cell sequence by the first moving track according to the first moving track of the first dragging operation.
In specific implementation, in step S401, moving the target cell sequence by the first moving trajectory specifically includes: and displaying the target cell sequence in a floating layer mode along the first moving track.
The floating layer display can be a screenshot of a target cell sequence captured from a table, or can be a picture generated according to the structure of the target cell sequence and data displayed in each cell in the target cell sequence, or can be the screenshot or a thumbnail corresponding to the generated picture, or even other animations.
In specific implementation, before step S401 is executed, the table data control method according to the embodiment of the present application further includes the following steps: and splitting and displaying the part of the merged cells except the part of the cells in the merged cells into new merged cells, and displaying the part of the cells and other cells in the target cell sequence in a combined manner. At this time, the floating layer displayed along the first moving track is the content displayed by combining the partial cells and other cells in the target cell sequence. And the partial cells are the cells intersected by the combination cells and the target cell sequence.
And the data displayed in the new merging cells are the data displayed in the original merging cells, and the data displayed in the partial cells are the data displayed in the original merging cells. If the partial unit cell only comprises one independent unit cell, the partial unit cell is one independent unit cell; if the partial unit cells comprise at least two independent unit cells, the partial unit cells are combined unit cells formed by at least two independent unit cells.
Correspondingly, step S202 specifically includes: s402, determining a target position according to a first end point position of the first moving track in the table, and displaying a target cell sequence at the target position.
The first end position is a position where the first movement track is located when the first dragging operation is finished. The mode of determining the target position according to the first end point position of the first movement track in the table may be set according to a specific application scenario, and the embodiment of the present application is not limited. For example, when the target area includes one or more lines of target cell sequences, the first end point position falls within the area where the kth line is located, and the target position is between the (k-1) th line and the kth line, that is, one or more lines of cells are inserted between the (k-1) th line and the kth line, so as to obtain a first area; when the target area comprises one or more columns of target cell sequences, the first end point position falls in the area where the kth column is located, the target position is between the kth-l column and the kth column, namely, one or more columns of cells are inserted between the kth-l column and the kth column, and a first area is obtained; when the target area is an area with n rows × m columns and the first end position falls within the area where the cell in the ith row and jth column is located, two options of "moving the active cell to the right" and "moving the active cell to the down" may be provided to the user, and when the user selects the option of "moving the active cell to the right", m cells may be inserted before the jth cell in each of the ith row to the ith + n row, and when the user selects the option of "moving the active cell to the down", n cells may be inserted before the ith cell in each of the jth column to the jth + m row.
Taking fig. 3A as an example, when the user starts to drag the cell in the 6 th row, the form editing application responds to the first drag operation, automatically performs cell splitting processing on the merged cell "module a" which partially intersects with the cell in the 6 th row in the background, combines the cells A2 to A5 in the merged cell "module a" into a new merged cell, the data displayed in the new merged cell is "module a", the cell A6 is split into an independent cell, and the data displayed in the cell A6 is "module a". In the same way, the merging cell 'wangsi' in the column D is split into two parts, one part is: the cell D4 and the cell D5 form a new merged cell, in which the displayed data is "wang bi", and the other part is the cell D6, in which the displayed data is "wang bi". At this time, the floating layer 302 corresponding to the target cell sequence dragged by the user is generated based on the data displayed in the cells A6 to D6, and the floating layer 302 corresponding to the target cell sequence is displayed along the first movement trajectory 303 of the first drag operation. During the course of moving the floating layer, the target cell sequence within the target area 301 is displayed in an inoperable state, such as a gray state with the text displayed within the cell. When the first drag operation is finished, the first end position of the first movement track is located in the 10 th row, the target position can be determined to be between the 9 th row and the 10 th row, a row of cells is inserted between the 9 th row and the 10 th row, the first area 304 is obtained, the target area 301 is deleted, and data in each cell in the target cell sequence is displayed in the first area.
In practical application, if a merged cell exists around a target position, after the cell is inserted into the target position, the merged cell around the target position is completely disassembled, and at this time, a user needs to manually merge the disassembled merged cell after completing position adjustment operation, so that the operation is complicated and errors are easily caused. In order to avoid damaging the structure of the merging cells around the target position and simplify the operation, the table editing application may detect whether two adjacent cells in the merging cells around the target position in the table are located on both sides of the target position after the target position is determined according to the first dragging operation, if two adjacent cells in any merging cell are located on both sides of the target position, that is, the cells before and after the target position belong to the same merging cell, split any merging cell into two parts along the adjacent edges of the two adjacent cells, and then display the target cell sequence at the target position. Specifically, any merged cell may be split into two parts along adjacent edges of two adjacent cells, then a row or a column of cells is inserted between the split two parts (i.e., target positions), the inserted cell is a first region corresponding to the target position, data displayed in the target cell sequence is moved to the first region, and the cell of the target region is deleted.
Taking fig. 5 as an example, when the user starts to drag the cell in the 6 th row, the form editing application responds to the first drag operation, automatically performs cell splitting processing on the merged cell "module a" having a partial intersection with the 6 th row in the background, combines the cells A2 to A5 in the merged cell "module a" into a new merged cell, the data displayed in the new merged cell is "module a", the cell A6 is split into an independent cell, and the data displayed in the cell A6 is "module a". Similarly, the merged cell "wangsi" in the column D is split into two parts, one part is a new merged cell composed of the cell D4 and the cell D5, wherein the displayed data is "wangsi", the other part is the cell D6, and wherein the displayed data is "wangsi". At this time, the floating layer 502 corresponding to the target cell sequence dragged by the user is generated based on the data displayed in the cells A6 to D6, and the floating layer 502 corresponding to the target cell sequence is displayed along the first movement trajectory 503 of the first drag operation. When the first dragging operation is finished, the first end point position of the first moving track is located on the 8 th row, and it can be determined that the target position is between the 8 th row and the 9 th row, and at this time, it is detected that the cell A8 in the 8 th row and the cell A9 in the 9 th row belong to the same merged cell "module B", and the cell D8 in the 8 th row and the cell D9 in the 9 th row belong to the same merged cell "lie four", then along the adjacent edges of the cell A8 and the cell A9, the merged cell "module B" is split into two parts, one part is the cell A9, the other part is a new merged cell composed of the cells A7 and A8, and data displayed in each part of the cells is "module B", and similarly, the merged cell "lie four" is split into two parts. Then, a row of cells is inserted between the 8 th row and the 9 th row, that is, the first area 504, the target area 501 is deleted, and the data in each cell in the target cell sequence is displayed in the first area 504.
Through the first dragging operation mode, a user can conveniently move the target cell sequence required to be moved to any expected position in the table, the steps are simple, and the operation is convenient and fast.
In a specific implementation, the position adjustment operation may also be a cut-and-paste operation, and the position of the target cell sequence in the table is adjusted based on the cut-and-paste operation in a manner similar to the position of the target cell sequence adjusted based on the first drag operation. For example, in response to a cut operation for a target cell sequence displayed in a target area in the table, moving the target cell sequence, the target cell sequence including a partial cell in the merged cell; and responding to the pasting operation, and displaying a target cell sequence in a first area corresponding to the target position indicated by the pasting operation, wherein data displayed in a part of cells is data displayed in the merging cells. And determining a target cell sequence needing to be moved through a cutting operation, and determining a target position to which the target cell sequence is moved based on a pasting operation.
Taking fig. 6 as an example, a user selects the cell in the 6 th row, opens the function menu bar 601, clicks the cut button in the function menu bar 601, triggers the cut operation on the cell in the 6 th row, and the form editing application responds to the cut operation, automatically performs the cell splitting process on the merged cell "module a" which is partially intersected with the 6 th row in the background, combines the cells A2 to A5 in the merged cell "module a" into a new merged cell, the data displayed in the new merged cell is "module a", the cell A6 is split into an independent cell, and the data displayed in the cell A6 is "module a", similarly, the merged cell "wang di" in the column D is split into two parts, one part is a new merged cell composed of the cell D4 and the cell D5, wherein the displayed data is "wang di", the other part is the cell D6, wherein the displayed data is "wang di", the cells A6 to D6 at this time constitute a new merged cell, and the cells A6 to D6 are displayed in the whole cell display mode of the cut cells A6. The user then inputs a paste operation at the position of the 9 th row, specifically, the paste operation may be input through the function menu bar 601, the target position is determined to be between the 8 th row and the 9 th row according to the paste operation, at this time, it is detected that the cell A8 in the 8 th row and the cell A9 in the 9 th row belong to the same merged cell "module B", and the cell D8 in the 8 th row and the cell D9 in the 9 th row belong to the same merged cell "lie four", then along the adjacent edges of the cell A8 and the cell A9, the merged cell "module B" is split into two parts, one part is the cell A9, the other part is a new merged cell composed of the cells A7 and A9, and the data displayed in each part of the cells is "wang di", and similarly, the merged cell "lie four" is split into two parts. Then, a row of cells is inserted between the 8 th row and the 9 th row, that is, the first region 603, and the target region 602 is deleted, and the data in each cell in the target cell sequence is displayed in the first region 603.
When the position adjusting operation is an operation of sorting a row of cells in the target area in a designated sorting manner, the target area includes a plurality of target cell sequences, and at least one target cell sequence in the plurality of target cell sequences includes a partial cell in the merged cell, then the step S201 specifically includes: moving each target cell sequence within the target area in response to a sorting operation for a row of cells; step S202 specifically includes: and determining the target positions corresponding to the target cell sequences according to the designated sorting mode, and respectively displaying the target cell sequences at the target positions.
In specific implementation, in response to a sorting operation for a row of cells, data in the row of cells is sorted according to a specified sorting mode corresponding to the sorting operation, and a target position of each target cell sequence in the table is determined according to an obtained sorting result. The designated sorting mode can be selected by the user, such as ascending or descending according to the numerical value. If the sort operation is performed on a column of cells, the target cell sequence is a row of cells, and the row of cells contains one cell in the column of cells; if the sort operation is performed for a row of cells, the target sequence of cells is a column of cells and the column of cells contains one cell in the row of cells.
In specific implementation, the sorting operation may be responded first, the merged cells in the target area are subjected to cell splitting processing, then the target positions corresponding to the target cell sequences are determined according to the designated sorting mode, and the target cell sequences are displayed at the target positions respectively.
Specifically, for any merged cell in the target area, cell splitting processing is performed on any merged cell along a splitting direction, and the splitting direction is consistent with the arrangement direction of the target cell sequence. For example, when the target cell sequence is arranged horizontally, the splitting direction is horizontal, that is, the merged cell is split into a plurality of rows of cells, and when the target cell sequence is arranged vertically, the splitting direction is vertical, that is, the merged cell is split into a plurality of columns of cells. Taking fig. 7 as an example, the original merge cell is A2 × 2 merge cell, which includes cells A1, A2, B1, and B2; after the transverse splitting, the original merging cell is split into two transverse merging cells, one merging cell comprises cells A1 and B1, the other merging cell comprises cells A2 and B2, and data displayed in the original merging cell are respectively displayed in the two merging cells obtained after the splitting; after the longitudinal splitting, the original merging cell is split into two longitudinal merging cells, one merging cell comprises cells A1 and A2, the other merging cell comprises cells B1 and B2, and the data displayed in the original merging cell are respectively displayed in the two merging cells obtained after the splitting.
Taking fig. 8 as an example, after the user selects the C column cells, the sorting setting column 801 is opened, the sorting manner is selected through the sorting setting column 801, if the user selects ascending, the sorting manner is designated to be ascending, the dates in the C column cells are sorted in ascending order, and the target position of each target cell sequence in the table is determined according to the obtained sorting result, for example, the target position of the 2 nd row of target cell sequences before sorting is the 3 rd row, and the target position of the 3 rd row of target cell sequences before sorting is the 4 th row. Meanwhile, the merged cell in the target area is subjected to cell splitting, for example, the merged cell "module a" is split into 4 independent cells, and the merged cell "module B" is split into 3 independent cells. After splitting the merged cells, the target cell sequences are respectively displayed in the first areas corresponding to the target positions corresponding to the target cell sequences, for example, the 2 nd row of target cell sequences before sorting is displayed in the 3 rd row of the sorted table, and the 3 rd row of target cell sequences before sorting is displayed in the 4 th row of the sorted table.
Based on the above embodiment, when a complex table including merged cells is faced, a user can conveniently sort data in the table according to different dimensions.
On the basis of any of the above embodiments, after step S202, the table data control method according to the embodiment of the present application further includes the steps of: and if the data in any cell in the table is the same as the data in the cell adjacent to any cell, carrying out cell merging operation on any cell and the adjacent cell.
Taking fig. 9 as an example, after the user selects the C column cells in table 1, the sorting setting column is opened, the sorting manner is selected through the sorting setting column, if the user selects ascending, the sorting manner is designated to be ascending, dates in the C column cells are sorted in ascending order, and the target position of each target cell sequence in the table is determined according to the obtained sorting result, for example, the target position of the 2 nd row of target cell sequences before sorting is the 3 rd row, and the target position of the 3 rd row of target cell sequences before sorting is the 4 th row. Meanwhile, the merged cell in the target region is subjected to cell splitting, for example, the merged cell "module a" is split horizontally into 5 independent cells, the merged cell "module B" is split horizontally into 3 independent cells, and after splitting of the merged cell is completed, table 2 is obtained. Detecting downwards from the cell A1 at the upper left corner of the table 2, wherein the data displayed in the cell A2 is different from the data displayed in the cell A1, and the merging operation is not performed; continuing to detect downwards, wherein the data displayed in the cell A3 is the same as the data displayed in the cell A2, and the cell A3 and the cell A2 are combined into a combined cell U1; continuing to detect downwards, and combining the unit cell A4 and the combined unit cell U1 into a new combined unit cell when the data displayed in the unit cell A4 and the data displayed in the combined unit cell U1 are the same; continuing to detect downwards, finally merging the cells A2 to A5 into a merged cell, wherein the cell A6 is different from the data displayed in the adjacent cell, and the cell A7 is different from the data displayed in the adjacent cell, therefore, the cell A6 and the cell A7 are independent cells, the data displayed in the cell A8 and the cell A9 are the same, then the cell A8 and the cell A9 are merged into a cell, and the merging result refers to table 3 in fig. 9. In the same way, the detection is started from the cell A1 in the upper left corner of table 2 to the right until all the cells in the table are traversed, and the adjacent cells with the same display content are merged into a merged cell, and the final merged result is shown in table 3 in fig. 9. It should be noted that table 2 is an intermediate processing result, and table 2 may not be displayed to the user, that is, after the user performs the sorting operation on table 1, the result of table 3 can be directly seen.
The above-mentioned manner of performing the merge operation of traversing the entire table is too complicated, and in practical applications, only the cells adjacent to the target area and the first area may be detected, if the cells around the target area are the same as the data displayed in the adjacent cells in the target area, the cells with the same display data are merged, and if the cells around the first area are the same as the data displayed in the adjacent cells in the first area, the cells with the same display data are merged, that is, only the areas with changed relative positions and the cells around the areas are detected, so that the merge efficiency is improved.
In the related art, data in two cells can be replaced with each other usually by using a blank cell, for example, when data displayed in the cell D6 and the cell D7 need to be exchanged, data "lisse" displayed in the cell D6 needs to be copied and pasted into one blank cell first, data "wang bi" displayed in the cell D7 needs to be copied and pasted into the cell D6, and finally data "lisse" in the blank cell needs to be copied and pasted into the cell D7, that is, 3 times of copy and paste operations need to be performed, so that data in two cells can be replaced with each other, and the operations are complicated.
Based on this, the table data control method provided in the embodiment of the present application further includes the following steps: and responding to the data replacement operation aiming at any two cells in the table, and performing interchange display on the data respectively displayed in the two cells. The two cells for data replacement may be independent cells, or merged cells, or one is an independent cell and one is a merged cell.
In specific implementation, the data replacement operation may be a designated gesture operation, such as an operation of dragging the first cell to the second cell by long-pressing the first cell, and displaying data in the first cell and the second cell; or after the first cell is selected, selecting a data replacement button in the function menu bar, then selecting the second cell, and triggering the operation of exchanging and displaying the data respectively displayed in the two cells; or clicking a data replacement button in the function menu bar, then selecting the first cell and the second cell in sequence, and triggering the operation of exchanging and displaying the data respectively displayed in the two cells.
Specifically, the table editing application responds to a second dragging operation aiming at a first cell in the table, and obtains a second end point position of a moving track of the second dragging operation; determining a second cell corresponding to the second end point position in the table; and exchanging and displaying the data displayed in the first cell and the data displayed in the second cell.
Taking fig. 10A as an example, the user presses the cell D6 for a long time and drags the cell D6, displays the cell D6 in a floating layer form along a moving track of the second dragging operation, stops the second dragging operation when the cell D7 is dragged to the position, and determines to perform data replacement on the cell D6 and the cell D7, where data displayed in the cell D6 before replacement is "lisi", data displayed in the cell D7 is "wani", data displayed in the cell D6 after replacement is "wani", and data displayed in the cell D7 is "lisi". In addition, the cells D7, D8, and D9 may be merged into one merged cell based on an automatic merging function.
Taking fig. 10B as an example, the user presses the cell D6 for a long time and drags the cell D6, and when the cell D6 is dragged to the position of the merged cell formed by the cell D4 and the cell D5 along the moving track of the second dragging operation, the second dragging operation is stopped, and it is determined that data replacement is performed on the cell D6 and the merged cell, the data displayed in the cell D6 before replacement is "liquad", the data displayed in the merged cell is "zhang", the data displayed in the cell D6 after replacement is "zhang", and the data displayed in the merged cell is "liquad".
Further, before the data displayed in the first cell and the data displayed in the second cell are exchanged and displayed, the table data control method of the embodiment of the present application further includes the following steps: in response to the second drag operation, option information for prompting the user to select an operation type is displayed, the option information including data replacement and data overlay. When data replacement in the option information is triggered, data displayed in the first cell and data displayed in the second cell are displayed in an exchange manner; and when the data coverage in the option information is triggered, displaying the data displayed in the first cell in the second cell.
In a specific implementation, when the second drag operation starts or ends, option information for prompting the user to select the operation type may be displayed. Option information for prompting the user to select the operation type may also be displayed when the user presses the first cell for a long time.
Through the embodiment, a user can realize data replacement between the two cells by directly dragging the cells, and the operation is simple. In the process of dragging the cell by a user, providing prompt information for selecting data replacement or data coverage for the user, and performing data replacement or data coverage according to the selection of the user, so that the user can conveniently realize data replacement or data coverage in a cell dragging mode.
The following describes a specific implementation of the table data control method according to the embodiment of the present application in terms of background processing of the table editing application.
Referring to fig. 11, an embodiment of the present application provides a table data control method, which is applicable to a table editing application, and specifically includes the following steps:
s1101, according to the position adjustment operation of a target cell sequence displayed by a target area in a table, obtaining cell attribute data of each cell in the target cell sequence from a two-dimensional array corresponding to the table, wherein the target cell sequence comprises partial cells in a merged cell, and the cell attribute data comprises a display data value.
The data structure of the table in the table editing application is a two-dimensional array, rows of the two-dimensional array correspond to rows in the table, columns in the two-dimensional array correspond to columns in the table, for example, a table with n rows × m columns corresponds to an n × m two-dimensional array, each element in the two-dimensional array is cell attribute data of a corresponding independent cell in the table, a storage format of the cell attribute data is as shown in fig. 12 and includes a display data value and a merge attribute value, the display data value represents data displayed in the independent cell, the merge attribute value is used for representing a merge cell to which the cell belongs, and the data structure of merge parameters of the merge cell refers to fig. 12.
And S1102, updating the display data values of the partial cells into data displayed in the combined cells.
In specific implementation, the data displayed in the merged cell is the display data value of the main lattice of the merged cell, and therefore, step S1102 may specifically be: and updating the display data values of the partial cells into the display data values of the main cells of the combined cells.
In specific implementation, if a part of the cells are independent cells and the part of the cells are not the main cells of the merged cells, the display data values of the part of the cells are directly updated to the display data values of the main cells of the merged cells, and the merged attribute values of the part of the cells are modified to null. If the partial cells are independent cells and the partial cells are the main cells of the combined cells, the combined attribute values of the partial cells are modified to null, and the display data values of the partial cells do not need to be modified. If the partial unit cell comprises a plurality of independent unit cells, a new merged unit cell is created for the plurality of independent unit cells, the merged parameters of the merged unit cells are written into the merged attribute values of the plurality of independent unit cells, and the display data value of the main cell in the new merged unit cell is updated to the display data value of the main cell of the original merged unit cell.
S1103, moving the cell attribute data of each cell in the target cell sequence to an area corresponding to the target position indicated by the position adjustment operation in the two-dimensional array.
For convenience of description, the region corresponding to the target position in the two-dimensional array is subsequently referred to as a second region. The elements in the two-dimensional array are in one-to-one correspondence with the independent cells in the table, so that the elements in the independent cells in the first area corresponding to the target position in the table and the elements in the second area corresponding to the target position in the two-dimensional array are also in one-to-one correspondence.
Taking the table shown in fig. 3A as an example, if the user drags the cell in the 6 th row, and the end point position of the dragging operation is the 10 th row, it may be determined that the target position is between the 9 th row and the 10 th row, and the table editing application inserts a row of elements (corresponding to a row of cells) between the 9 th row and the 10 th row in the two-dimensional array, that is, the second area; meanwhile, with reference to the manner of step S1102, the display data values and the merged attribute values of the partial cells in the 6 th row of the two-dimensional array are updated; then, the element in the 6 th row in the two-dimensional array (i.e., the cell attribute data of the target cell sequence) is copied into the inserted element in the row, and the 6 th row in the two-dimensional array is deleted, that is, the position adjustment operation for the cell in the 6 th row is completed, and the adjusted table is shown in fig. 3A.
The form data control method provided by the embodiment of the application enables the form editing application to automatically perform merging cell splitting processing on merging cells which partially intersect with a target cell sequence in a background, namely, partial cells in the merging cells which belong to the target cell sequence are split from original merging cells to facilitate moving of the target cell sequence, meanwhile, the split partial cells inherit data displayed in the original merging cells, so that partial rows and partial columns in the merging cells can be independently moved.
When the position adjustment operation is a first drag operation of dragging the target cell sequence to the target position, step S1103 specifically includes: determining a target position according to a first end position of a first movement track of the first dragging operation in the table; determining a corresponding second area of the target position in the two-dimensional array; the cell attribute data for each cell in the target cell sequence is moved to the second region.
In particular, the target cell sequence can be displayed in a floating layer along the first moving track.
In specific implementation, before step S1103, the method for controlling table data provided in the embodiment of the present application further includes: and updating the merged attribute value of the cells except the partial cells in the merged cells, and updating the merged attribute value of the partial cells so as to split the part except the partial cells in the merged cells and the partial cells into two parts.
Taking the table shown in fig. 3A as an example, the cell in the 6 th row is dragged by the user, the cell A6 belongs to the merged cell "module a", the cells (A2 to A5) except the cell A6 in the merged cell are merged into a new merged cell U1, the background generates the merged parameter of the merged cell U1, the merged attribute values of the cells A2 to A5 are updated according to the newly generated merged cell U1, the merged attribute value of the cell A6 is updated to null, the display data value of the cell A6 is updated to "module a", and the table shown to the user is shown in fig. 3A.
In specific implementation, before step S1103, the method for controlling table data provided in the embodiment of the present application further includes: and if two adjacent cells in any merged cell are positioned on two sides of the target position, respectively updating the merged attribute values of the cells positioned on two sides of the target position in any merged cell so as to split any cell into two parts along the adjacent edges of the two adjacent cells.
Taking the table shown in fig. 5 as an example, when the first drag operation is finished, the first end position of the first movement track is located in the 8 th row, and it may be determined that the target position is between the 8 th row and the 9 th row, at this time, it is detected that the cell A8 in the 8 th row and the cell A9 in the 9 th row belong to the same merge cell "module B", and the cell D8 in the 8 th row and the cell D9 in the 9 th row belong to the same merge cell "lie four", then the cell A7 and the cell A8 are merged into a new merge cell U1, the background generates a merge parameter of the merge cell U1, updates the merge attribute values of the cells A7 and A8 according to the newly generated merge cell U1, and at the same time, updates the merge attribute value of the cell A9 to null, and updates the display data value of the cell A9 to "module B". Then, a row of elements is inserted between the 8 th row and the 9 th row of the two-dimensional array, the element of the 6 th row in the two-dimensional array is copied to the inserted row of elements, and the 6 th row in the two-dimensional array is deleted, that is, the position adjustment operation for the cell of the 6 th row is completed, and the adjusted table is shown in fig. 5.
When the position adjustment operation is an operation of sorting a row of cells in the target area in a designated sorting manner, the target area includes a plurality of target cell sequences, and at least one target cell sequence in the plurality of target cell sequences includes a partial cell in the merged cell, then step S1101 specifically includes: and respectively obtaining the cell attribute data of each cell in the target cell sequences from the two-dimensional arrays corresponding to the tables according to the sorting operation aiming at one row of cells. Step S1103 specifically includes: determining target positions corresponding to all the target cell sequences according to the designated sorting mode; determining second areas corresponding to the target positions in the two-dimensional array respectively; and moving the cell attribute data of each cell in each target cell sequence to a second area corresponding to each target cell sequence.
Further, before moving the cell attribute data of each cell in each target cell sequence to the second area corresponding to each target cell sequence, the table data control method in the embodiment of the present application further includes the following steps: and updating the merged attribute value of each cell in the merged cells in the target area to finish the cell splitting processing of the merged cells in the target area.
Taking fig. 7 as an example, the cell splitting process can be divided into horizontal splitting and vertical splitting. If the original merged cell is split longitudinally, the parameters of the two newly created MergeReference objects, namely, the mergeReference _1, the mergeReference _2, the mergeReference _1and the mergeReference _2, are respectively shown in FIG. 13, then the merged attribute value of the cell attribute data of the cells A1 and A2 is set to the mergeReference _1, the merged attribute value of the cell attribute data of the cells B1 and B2 is set to the mergeReference _2, finally the display data value of the cell B2 is updated to the display data value of the cell A1, and meanwhile, the display data value of the cell A1 is kept unchanged, and the result of the longitudinal split is shown in FIG. 7. If the original merged cell is split horizontally, a parameter diagram 13 showing that the two MergeReference objects are the mergeReference _3, the mergeReference _4, the mergeReference _3and the mergeReference _4 respectively is created, then the merged attribute value of the cells A1 and B1 is set as the mergeReference _3, the merged attribute value of the cells A2 and B2 is set as the mergeReference _4, and finally the display data value of the cell A2 is updated to the display data value of the cell A1, while the display data value of the cell A1 is kept unchanged.
Taking fig. 8 as an example, the cell splitting process is performed on the merged cell in the target region, for example, the merged cell "module B" is split into 3 independent cells, and the specific process includes: the merged attribute value for cells A7, A8, A9 is set to null, and the display data value for cells A7, A8, A9 is set to "Module B".
On the basis of any of the foregoing embodiments, after step S1103, the table data control method according to the embodiment of the present application further includes the steps of: and if the data in any cell in the table is the same as the data in the cell adjacent to any cell, updating the merged attribute value of any cell and the adjacent cell so as to merge any cell and the adjacent cell into a merged cell.
Taking table 2 in fig. 9 as an example, the data displayed in the cells A2 to A5 are the same, and the cells A2 to A5 need to be merged into one merged cell, and the specific process includes: a MergeReference object mergeReference _5 is newly created, the merged attribute value of the cells A2 to A5 is set as mergeReference _5, and the display data value of the cells A2 to A5 is set as Module A.
On the basis of any one of the above embodiments, the table data control method according to the embodiment of the present application further includes the steps of: the display data values for any two cells in the table are swapped according to a data replacement operation for the two cells.
Specifically, according to a second dragging operation for a first cell in the table, a second end point position of a movement trajectory of the second dragging operation may be acquired, a second cell corresponding to the second end point position in the table may be determined, and then a display data value of the first cell and a display data value of the second cell may be exchanged.
In specific implementation, if the two cells for data replacement are both independent cells, the display data values of the two cells are directly exchanged; if the two cells for data replacement are merging cells, exchanging the display data values of the main cells of the two merging cells; and if one of the two cells for data replacement is an independent cell and the other is a combined cell, exchanging the display data value of the independent cell with the display data value of the main cell of the combined cell.
Further, before exchanging the display data value of the first cell and the display data value of the second cell, the table data control method of the embodiment of the present application further includes the steps of: according to the second dragging operation, displaying option information for prompting the user to select the operation type, wherein the option information comprises data replacement and data coverage; when the data coverage in the option information is triggered, updating the display data value of the second cell into the display data value of the first cell; and when the data replacement in the option information is triggered, exchanging the display data value of the first cell and the display data value of the second cell.
As shown in fig. 14, based on the same inventive concept as the above table data control method, the embodiment of the present application further provides a table data control device 140, which includes a moving module 1401 and a display module 1402.
A moving module 1401, configured to move a target cell sequence in response to a position adjustment operation for the target cell sequence displayed in the target area in the table, where the target cell sequence includes a part of the cells in the merged cells;
the display module 1402 is configured to display the target cell sequence at the target position indicated by the position adjustment operation, where the data displayed in the partial cells is the data displayed in the merged cell.
Optionally, the position adjusting operation is a first dragging operation of dragging the target cell sequence to the target position, then:
a moving module 1401, specifically configured to move the target cell sequence according to a first moving trajectory of the first dragging operation;
the display module 1402 is specifically configured to: determining a target position according to a first end position of the first movement track in the table; and displaying the target cell sequence at the target location.
Optionally, the display module 1402 is specifically configured to display the target cell sequence in a floating layer along the first moving track.
Optionally, the display module 1402 is further configured to split and display a part of the merged cells except for a part of the cells in the merged cells as a new merged cell, and display the part of the cells and other cells in the target cell sequence in a combined manner, before moving the target cell sequence with the first movement trajectory.
Optionally, the table data control apparatus further includes a splitting module, configured to split any merged cell into two parts along adjacent edges of two adjacent cells if two adjacent cells in any merged cell are located on two sides of the target position before the target position displays the target cell sequence.
Optionally, the position adjusting operation is an operation of sorting a row of cells in the target area in a specified sorting manner, the target area includes a plurality of target cell sequences, and at least one target cell sequence in the plurality of target cell sequences includes a partial cell in the merged cell, then:
a moving module 1401, specifically configured to move each target cell sequence in the target area in response to the sorting operation for a row of cells;
a display module 1402, specifically configured to determine, according to a specified sorting manner, a target position corresponding to each target cell sequence; and respectively displaying each target cell sequence at each target position.
Optionally, the splitting module is further configured to perform cell splitting processing on the merged cell in the target area in response to the sorting operation before each target position displays each target cell sequence respectively.
Optionally, the splitting module is specifically configured to, for any merged cell in the target area, perform cell splitting on any merged cell along a splitting direction, where the splitting direction is consistent with an arrangement direction of the target cell sequence.
Optionally, the table data control apparatus further includes a merging module, configured to perform a cell merging operation on any cell and an adjacent cell if data in any cell in the table is the same as data in a cell adjacent to any cell after the target cell sequence is displayed at the target position indicated by the position adjustment operation.
Optionally, the table data control apparatus further includes a replacement module, configured to, in response to a data replacement operation for any two cells in the table, perform display exchange on data respectively displayed in the two cells.
Optionally, the replacement module is specifically configured to:
responding to a second dragging operation aiming at the first cell in the table, and acquiring a second end point position of a moving track of the second dragging operation;
determining a second cell corresponding to the second end point position in the table;
and displaying the data displayed in the first cell and the data displayed in the second cell in an exchange manner.
Optionally, the display module 1402 is further configured to display, in response to the second dragging operation, option information for prompting the user to select an operation type, where the option information includes data replacement and data overlay; when the data coverage in the option information is triggered, displaying the data displayed in the first cell in the second cell;
and the replacement module is specifically used for performing exchange display on the data displayed in the first cell and the data displayed in the second cell when the data replacement in the option information is triggered.
As shown in fig. 15, based on the same inventive concept as the above table data control method, the embodiment of the present application further provides a table data control device 150, which includes an obtaining module 1501, an updating module 1502, and a data moving module 1503.
An obtaining module 1501, configured to obtain cell attribute data of each cell in a target cell sequence from a two-dimensional array corresponding to a table according to a position adjustment operation on the target cell sequence displayed in a target area in the table, where the target cell sequence includes a part of cells in a merged cell, and the cell attribute data includes a display data value;
an update module 1502 for updating the display data values of the partial cells to the data displayed in the merged cell;
the data moving module 1503 is configured to move the cell attribute data of each cell in the target cell sequence to a region in the two-dimensional array corresponding to the target position indicated by the position adjustment operation.
Optionally, the position adjusting operation is a first dragging operation of dragging the target cell sequence to the target position, and then:
the data moving module 1503 is specifically configured to:
determining a target position according to a first end position of a first movement track of the first dragging operation in the table;
determining a corresponding area of the target position in the two-dimensional array;
and moving the cell attribute data of each cell in the target cell sequence to a corresponding area of the target position in the two-dimensional array.
Optionally, the cell attribute data further includes a merge attribute value, where the merge attribute value is used to indicate a merge cell to which the cell belongs, and the update module 1502 is further configured to move the cell attribute data of each cell in the target cell sequence to a position before the target position indicated by the position adjustment operation is in the corresponding region in the two-dimensional array, update the merge attribute values of cells outside the partial cells in the merge cell, and update the merge attribute values of the partial cells, so as to split the partial cells and the partial cells outside the partial cells in the merge cell into two parts.
Optionally, the updating module 1502 is further configured to, if two adjacent cells in any merged cell are located on two sides of the target location, respectively update the merged attribute values of the cells located on two sides of the target location in any merged cell, so as to split any cell into two parts along adjacent edges of the two adjacent cells.
Optionally, the position adjusting operation is an operation of sorting a row of cells in the target area in a specified sorting manner, the target area includes a plurality of target cell sequences, and at least one target cell sequence in the plurality of target cell sequences includes a partial cell in the merged cell, then:
the obtaining module 1 is specifically configured to obtain cell attribute data of each cell in a plurality of target cell sequences from a two-dimensional array corresponding to a table according to a sorting operation for a row of cells;
the data moving module 1503 is specifically configured to:
determining target positions corresponding to all the target cell sequences according to the designated sorting mode;
determining areas corresponding to the target positions in the two-dimensional array respectively;
and moving the cell attribute data of each cell in each target cell sequence to the corresponding area of each target position in the two-dimensional array.
Optionally, the updating module 1502 is further configured to update the merge attribute values of the respective cells in the merged cell in the target area, so as to complete the cell splitting process on the merged cell in the target area.
Optionally, the updating module 1502 is further configured to update the merge attribute value of any cell and the adjacent cell after the data moving module 1503 finishes executing, so that any cell and the adjacent cell are merged into one merge cell, if the data in any cell in the table is the same as the data in the cell adjacent to any cell.
Optionally, the updating module 1502 is further configured to swap the display data values of two cells according to a data replacement operation for any two cells in the table.
Optionally, the updating module 1502 is further configured to:
acquiring a second end point position of a moving track of second dragging operation according to the second dragging operation aiming at the first cell in the table;
determining a second cell corresponding to the second end point position in the table;
the display data value of the first cell and the display data value of the second cell are swapped.
Optionally, the updating module 1502 is further configured to:
according to the second dragging operation, displaying option information for prompting the user to select the operation type, wherein the option information comprises data replacement and data coverage;
when the data coverage in the option information is triggered, updating the display data value of the second cell into the display data value of the first cell;
and when the data replacement in the option information is triggered, exchanging the display data value of the first cell and the display data value of the second cell.
The table data control device and the table data control method provided by the embodiment of the application adopt the same inventive concept, can obtain the same beneficial effects, and are not repeated herein.
Based on the same inventive concept as the table data control method, the embodiment of the present application further provides an electronic device, which may be specifically a desktop computer, a portable computer, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), a server, and the like. As shown in fig. 16, the electronic device 160 may include a processor 1601 and a memory 1602.
The Processor 160l may be a general-purpose Processor, such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component, which may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in a processor.
The memory 1602, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1602 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function to store program instructions and/or data.
The embodiment of the present application provides a computer-readable storage medium for storing computer program instructions for the electronic device, which includes a program for executing the table data control method.
The computer storage media described above may be any available media or data storage device that can be accessed by a computer, including but not limited to magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid State Disks (SSDs)), etc.
The above embodiments are only used to describe the technical solutions of the present application in detail, but the above embodiments are only used to help understanding the method of the embodiments of the present application, and should not be construed as limiting the embodiments of the present application. Modifications and substitutions that may be readily apparent to those skilled in the art are intended to be included within the scope of the embodiments of the present application.

Claims (16)

1. A table data control method, comprising:
acquiring position adjustment operation of a target cell sequence displayed by a target area in a table, and acquiring cell attribute data of each cell in the target cell sequence from a two-dimensional array corresponding to the table;
when the position adjustment operation is that the cells in the row selected in the target area are sorted according to the designated sorting mode of the sorting setting control, splitting the merged cells in the table;
sorting the attribute data of the cells in the row of cells according to the designated sorting mode to obtain a sorting result;
determining a target position corresponding to a target cell sequence to which each cell in the row of cells belongs according to the sorting result, wherein the target cell sequence to which each cell belongs is a sequence formed by one row or one column of cells in the target area, and the arrangement direction of each target cell sequence is perpendicular to the arrangement direction of the row of cells;
and moving the cell attribute data of each target cell sequence to a target position corresponding to each target cell sequence, and merging the adjacent cells with the same cell attribute data in the table.
2. The method of claim 1, wherein the location adjustment operation is a first drag operation that drags the target sequence of cells to a first target location, wherein the target sequence of cells comprises a portion of cells in a merged cell, and wherein the cell attribute data comprises a display data value; the method further comprises the following steps:
splitting the partial cells from the merged cells, and updating the display data values of the partial cells into the data displayed in the merged cells;
determining a first target position according to a first end position of a first movement track of the first dragging operation in the table;
determining a corresponding area of the first target position in a two-dimensional array of a table;
and moving the cell attribute data of each cell in the target cell sequence to a corresponding area of the first target position in the two-dimensional array.
3. The method of claim 2, further comprising: in the process of moving the cell attribute data of each cell in the target cell sequence to the corresponding area of the first target position in the two-dimensional array, displaying the target cell sequence in a floating layer mode, and displaying the target cell sequence in an inoperable state.
4. The method of claim 2, wherein the cell attribute data further comprises a consolidated attribute value, the consolidated attribute value being used to represent a consolidated cell to which the cell belongs; splitting the partial cells from the merged cells, including:
and updating the merged attribute value of the cells except the partial cells in the merged cell, and updating the merged attribute value of the partial cells to split the part except the partial cells in the merged cell and the partial cells into two parts.
5. The method of claim 2, wherein prior to moving the cell attribute data for each cell in the target sequence of cells to the region where the first target location corresponds in the two-dimensional array, the method further comprises:
detecting whether two adjacent cells positioned at two sides of the first target position exist in the merging cells adjacent to the first target position;
when two adjacent cells in a merged cell are located on both sides of a first target location, the merged cell is split into two parts along adjacent edges of the two adjacent cells.
6. The method of claim 1,
the moving the cell attribute data of each target cell sequence to the target position corresponding to each target cell sequence includes:
determining areas corresponding to the target positions in the two-dimensional array respectively;
and moving the cell attribute data of each cell in each target cell sequence to the corresponding area of each target position in the two-dimensional array.
7. The method of claim 6, wherein merging adjacent cells in the table that have identical cell attribute data comprises:
and detecting the cell attribute data of each cell in the table, merging two adjacent cells if the cell attribute data of the adjacent cells are the same, and displaying the merged cell attribute data.
8. The method of claim 1, wherein the position adjustment operation comprises a cut operation and a paste operation on the target cell sequence, the target cell sequence comprising a partial cell in a merged cell, the cell attribute data comprising a display data value; the method further comprises the following steps:
responding to the cutting operation, splitting the partial cells from the merged cells, and updating the display data values of the partial cells into the data displayed in the merged cells;
determining a second target position in response to the paste operation;
determining a corresponding area of the second target position in a two-dimensional array of a table;
and moving the cell attribute data of each cell in the target cell sequence to a corresponding area of the second target position in the two-dimensional array.
9. The method of claim 8, wherein prior to moving the cell attribute data for each cell in the target sequence of cells to the region where the second target location corresponds in the two-dimensional array, the method further comprises:
detecting whether two adjacent cells positioned at two sides of the second target position exist in the merging cells adjacent to the second target position;
when two adjacent cells in a merged cell are located on both sides of a second target location, the merged cell is split into two parts along adjacent edges of the two adjacent cells.
10. A tabular data control method, comprising:
acquiring position adjustment operation of a target cell sequence displayed by a target area in a table, and acquiring cell attribute data of each cell in the target cell sequence from a two-dimensional array corresponding to the table;
when the position adjusting operation is in response to a second dragging operation on a first cell in the table, acquiring a second end point position of a moving track of the second dragging operation;
determining a second cell corresponding to the second end point position in the table, and displaying option information for prompting a user to select an operation type, wherein the option information comprises data replacement and data coverage;
and when the data replacement in the option information is triggered, exchanging and displaying the data displayed in the first cell and the data displayed in the second cell.
11. The method of claim 10, further comprising:
and when the data coverage in the option information is triggered, updating the display data value of the second cell into the display data value of the first cell.
12. The method of claim 10, wherein the location adjustment operation is a first drag operation that drags the target cell sequence to a first target location, wherein the target cell sequence comprises a portion of cells in a merged cell, and wherein the cell attribute data comprises a display data value; the method further comprises:
splitting the partial cells from the merged cells, and updating the display data values of the partial cells into the data displayed in the merged cells;
determining a first target position according to a first end position of a first movement track of the first dragging operation in the table;
determining a corresponding area of the first target position in a two-dimensional array of a table;
and moving the cell attribute data of each cell in the target cell sequence to the corresponding area of the first target position in the two-dimensional array.
13. A table data control apparatus, comprising:
the acquisition module is used for acquiring position adjustment operation of a target cell sequence displayed by a target area in a table and acquiring cell attribute data of each cell in the target cell sequence from a two-dimensional array corresponding to the table;
data moving module for
When the position adjustment operation is that the cells in the row selected in the target area are sorted according to the designated sorting mode of the sorting setting control, splitting the merged cells in the table;
sorting the cell attribute data in the row of cells according to the designated sorting mode to obtain a sorting result;
determining a target position corresponding to a target cell sequence to which each cell in the row of cells belongs according to the sorting result, wherein the target cell sequence to which each cell belongs is a sequence formed by one row or one column of cells in the target area, and the arrangement direction of each target cell sequence is perpendicular to the arrangement direction of the row of cells;
and moving the cell attribute data of each target cell sequence to a target position corresponding to each target cell sequence, and merging the adjacent cells with the same cell attribute data in the table.
14. A table data control apparatus, comprising:
an interaction module to:
acquiring position adjustment operation of a target cell sequence displayed by a target area in a table, and acquiring cell attribute data of each cell in the target cell sequence from a two-dimensional array corresponding to the table;
when the position adjusting operation is a second dragging operation responding to the first cell in the table, acquiring a second end point position of a moving track of the second dragging operation;
determining a second cell corresponding to the second end point position in the table, and displaying option information for prompting a user to select an operation type, wherein the option information comprises data replacement and data coverage;
and the processing module is used for performing exchange display on the data displayed in the first cell and the data displayed in the second cell when the data replacement in the option information is triggered.
15. A computer-readable storage medium having stored thereon computer instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1-12.
16. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor implements the method of any of claims 1-12 when executing the computer program.
CN202211480488.3A 2020-07-27 2020-07-27 Table data control method and device Pending CN115809646A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211480488.3A CN115809646A (en) 2020-07-27 2020-07-27 Table data control method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211480488.3A CN115809646A (en) 2020-07-27 2020-07-27 Table data control method and device
CN202010732822.4A CN112632930B (en) 2020-07-27 2020-07-27 Table data control method and device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202010732822.4A Division CN112632930B (en) 2020-07-27 2020-07-27 Table data control method and device

Publications (1)

Publication Number Publication Date
CN115809646A true CN115809646A (en) 2023-03-17

Family

ID=75300011

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202211480488.3A Pending CN115809646A (en) 2020-07-27 2020-07-27 Table data control method and device
CN202010732822.4A Active CN112632930B (en) 2020-07-27 2020-07-27 Table data control method and device

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202010732822.4A Active CN112632930B (en) 2020-07-27 2020-07-27 Table data control method and device

Country Status (1)

Country Link
CN (2) CN115809646A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114201258A (en) * 2021-12-10 2022-03-18 金蝶软件(中国)有限公司 Copy and paste method, device, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6442575B2 (en) * 1998-06-17 2002-08-27 Microsoft Corporation Method and system for merging cells in a table and for adding an integrated header and a nested table to a table in an electronic document
CN102103576B (en) * 2009-12-17 2013-04-17 珠海金山软件有限公司 Methods and systems for splitting table by utilizing computer
CN102467378A (en) * 2010-11-11 2012-05-23 深圳市金蝶友商电子商务服务有限公司 HTML (Hypertext Markup Language) form processing method based on two-dimensional matrix and computer
CN109885819B (en) * 2019-02-19 2022-12-20 携程旅游信息技术(上海)有限公司 Data table dynamic adjustment method, system, device and storage medium
CN111027294B (en) * 2019-12-12 2023-05-30 中国联合网络通信集团有限公司 Method, device and system for summarizing table

Also Published As

Publication number Publication date
CN112632930A (en) 2021-04-09
CN112632930B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
US11385786B2 (en) Spin control user interface for selecting options
CN109614424B (en) Page layout generation method, device, computing equipment and medium
US20220414326A1 (en) Document applet generation
CN101957730B (en) Messaging device and information processing method
US11270066B2 (en) Temporary formatting and charting of selected data
US20190324608A1 (en) Method and apparatus for homepage cluster system management based on tree structure
CN109408764B (en) Page area dividing method, device, computing equipment and medium
CN106951140A (en) The icon replacing options and electronic equipment of application program
CN113420355B (en) Floor processing method and device and electronic equipment
US20060294137A1 (en) Database application including split views
CN114021531A (en) Document collaborative editing method and device, electronic equipment and storage medium
CN113467669A (en) Information processing method and device, electronic equipment and readable medium
US11567635B2 (en) Online collaborative document processing method and device
CN112632930B (en) Table data control method and device
CN114239524A (en) Questionnaire generation method, questionnaire generation device, computer equipment and storage medium
KR102199668B1 (en) Method for providing a service of automatically creating a workflow for processing geo spatial information, and a computer readable storage medium
CN117078181A (en) Automatic method and system for power transaction business data processing flow
CN103970773A (en) Page updating method and device for web page
CN110968311A (en) Front-end page construction method and device and electronic equipment
CN115221852A (en) Vxe-table based dynamic calculation table implementation method, device and computer equipment
CN116700701B (en) Code-free software development method and device and electronic equipment
CN115509665B (en) Method, device, medium and equipment for recording control in window
US20240037325A1 (en) Ability to add non-direct ancestor columns in child spreadsheets
CN113988043B (en) Hardware bill of material management method and device, computer equipment and storage medium
CN114996406A (en) Standing book generation method and device, storage medium and electronic equipment

Legal Events

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