CN112632930B - Table data control method and device - Google Patents

Table data control method and device Download PDF

Info

Publication number
CN112632930B
CN112632930B CN202010732822.4A CN202010732822A CN112632930B CN 112632930 B CN112632930 B CN 112632930B CN 202010732822 A CN202010732822 A CN 202010732822A CN 112632930 B CN112632930 B CN 112632930B
Authority
CN
China
Prior art keywords
cell
target
cells
data
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010732822.4A
Other languages
Chinese (zh)
Other versions
CN112632930A (en
Inventor
徐杨
许永利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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
Priority to CN202010732822.4A priority patent/CN112632930B/en
Publication of CN112632930A publication Critical patent/CN112632930A/en
Application granted granted Critical
Publication of CN112632930B publication Critical patent/CN112632930B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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 form data control method and a device, which enable a user to move rows or columns with partial intersection with merging cells without manually canceling the merging function of the merging cells, are convenient to operate, are not easy to make mistakes, and are high in efficiency. 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 editing a table, it is often necessary to adjust the position of data in the table, for example, move the first row of data to the tenth row of data and move the fifth column of data to the second column of data. 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, the data displayed in the first cell and the data displayed in the second cell are displayed in an exchange manner.
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 a corresponding area of 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 represent a merge cell to which the 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, where 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:
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 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 moving 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, before the target position displays the target cell sequence, split any merged cell into two parts along adjacent edges of two adjacent cells if two adjacent cells in the merged cell are located on two sides of the target position.
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, before each target position displays each target cell sequence, perform cell splitting processing on the merged cell in the target area in response to the sorting operation.
Optionally, the splitting module is specifically configured to, for any merged cell in the target area, perform cell splitting processing 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 interchange 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:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring cell attribute data of each cell in a target cell sequence from a two-dimensional array corresponding to a table according to position adjustment operation of the target cell sequence displayed in a target area in the table, the target cell sequence comprises partial cells in merged cells, and the cell attribute data comprises display data values;
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 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 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, according to the sorting operation for the row of cells, cell attribute data of each cell in the target cell sequences from the two-dimensional array corresponding to the table;
the data moving module 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 is further configured to update the merge attribute value of each cell in 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 if the data in any cell in the table is the same as the data in the cell adjacent to the any cell after the data moving module executes the data, so that the any cell and the adjacent cell are merged into one merge 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:
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, 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 required 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 the 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 dragging 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 positions of target cell sequences 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 positions of target cell sequences in a table through a sorting operation according to an embodiment of the present application;
fig. 9 is a schematic diagram illustrating an operation of automatically merging 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 performed 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 merged 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 individual cells are named according to the row and column positions, for example: 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 (userEnterValue) and a merged attribute value (mergeReference). The display data values represent the data displayed within an individual cell, e.g., the display data values for individual cell B2 in FIG. 3A are: and (4) optimizing the authority, wherein data displayed in the independent cell at the intersection position of the column B and the row 2 in the table is as follows: and (4) optimizing the authority, wherein if the display data value of the independent cell is null, 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 display data 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 form of the merged cell; if the display data value of the independent cell is null, it indicates that the independent cell does not belong to any merged cell, and it is displayed in the form of an independent 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, the startcolindex indicates a start column of a merge cell coverage, the startrowindex indicates a start row of the merge cell coverage, the endColIndex indicates an end column of the merge cell coverage, and the endrowndex indicates an end row of the merge cell coverage, for example, if the startcolindex of a merge cell is a, the endColIndex is B, the startrowindex is 1, and the endRowIndex is 2, the merge cell includes four independent cells A1, A2, B1, and B2, and the positioncentrekey is a merge cell number, and the merge cells in the table have 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 at this time is the display data value of the independent cell. 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 has only one main cell, the independent cell at the upper left corner of the merged cell is generally taken 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, and can interact with users, for example, electronic maps, instant messaging tools, excel, etc. may 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.
Form editing application: the office software refers to office software capable of editing forms, such as various office software of Word, excel, online collaboration forms and the like.
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 solely for differentiation and not by way of limitation.
In a specific practical process, when a row or a column moved by a user contains a part of cells in merged cells, the user needs to manually cancel the merging function of the merged cells to move data of a certain row or a certain column, and the user needs to manually execute operation of merging cells according to the data in the moved cells to re-merge the split cells together before moving, so that the operation of the whole process is complicated and errors are easy to occur.
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 part of the cells is 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 a terminal device 101, a 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 manner 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, \8230;, terminal device 101-n) and server 102. The terminal device 101 and the server 102 are connected via a wireless or wired network, and the server 102 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, 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 collaborative 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 fig. 1B will be described together in the subsequent method embodiments, and will not be described in detail here.
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 an 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 the position adjustment operation of the target cell sequence displayed by the target area in the table, and moving the target cell sequence, wherein the target cell sequence comprises partial cells in the combined 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 through 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 refers to an operation of adjusting the position of the target cell sequence in the table, for example, the position of the cell in the 1 st row is adjusted to the 2 nd row, and the cell in the D column is adjusted to the a th column, which may be specifically a dragging operation, a cutting and pasting operation, a sorting operation, or the like, and is not particularly limited 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 a specific 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 cutting-pasting operation is adopted, the target position may be determined according to a position selected in the table when the pasting operation is performed, 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 by 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, data in each cell in the target cell sequence is displayed at the target position, that is, data in each cell in the target cell sequence is displayed in the first region corresponding to the target position, and a part of cells in the target cell sequence, which are overlapped with the merging cells, inherit the data displayed in the merging cells.
The embodiment of the present application mainly explains the position adjustment of a target cell sequence including a part of cells in a merged cell, and for a target cell sequence not including a merged cell and a case where the merged cell is completely located in the target cell sequence, the target cell sequence may be directly moved to a target position, which is the same as the implementation manner in the prior art and is not described again.
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 k-th line is located, and the target position is between the k-1 th line and the k-th line, that is, one or more lines of cells are inserted between the k-1 th line and the k-th 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-1 column and the kth column, namely, one or more columns of cells are inserted between the kth-1 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" 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". In a similar way, the merging unit grid 'WangChao' in the column D is split into two parts, and one part is as follows: the cell D4 and the cell D5 form a new merged cell, in which the displayed data is "wang chao", and the other part is the cell D6, in which the displayed data is "wang chao". 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 the text displayed within the cell is in a gray state. When the first drag operation is finished, the first end point 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 cells are the first area 304, the target area 301 is deleted, and data in each cell in the target cell sequence are 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 merging cell "wangtao" in the column D is split into two parts, one part is a new merging cell composed of the cell D4 and the cell D5, wherein the displayed data is "wangtao", the other part is the cell D6, and wherein the displayed data is "wangtao". 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 A8, and the other part is a new merged cell composed of the cells A8 and A9, and data displayed in each part of the cells is "wang chao", 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, namely the first area 504, the target area 501 is deleted at the same time, 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 adjusting 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 the data displayed in the partial cells are the data displayed in the combined 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 of row 6, opens the function menu bar 601, clicks the cut button in the function menu bar 601, triggers the cut operation on the cell of row 6, and the form editing application responds to the cut operation, automatically performs the cell splitting process on the merged cell "module a" which partially intersects with the row 6 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 super" 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 super", the other part is the cell D6, wherein the displayed data is "wang super", the cells A6 to D6 constitute an integral cell, and the cells A6 to D6 are displayed in the cut state of the cell A6 a display cell. 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, 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 A8, and the other part is a new merged cell composed of the cells A8 and A9, and data displayed in each part of the cells is "wang super", 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 sorting operation is performed for a column of cells, the target sequence of cells 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 cell sequence 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 region, 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 merging cell is A2 × 2 merging cell, which includes cells A1, A2, B1, and B2; after the horizontal splitting, the original merging cell is split into two horizontal 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 region is subjected to cell splitting, for example, the merged cell "module a" is split horizontally into 4 independent cells, and the merged cell "module B" is split horizontally into 3 independent cells. After splitting the merged cells is completed, each target cell sequence is respectively displayed in a first area corresponding to a target position corresponding to each target cell sequence, for example, the target cell sequence in the 2 nd row before sorting is displayed in the 3 rd row of the sorted table, and the target cell sequence in the 3 rd row 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 by the sorting setting column, if the user selects ascending, the sorting manner is designated as 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 target cell sequence before sorting is the 3 rd row, and the target position of the 3 rd row target cell sequence 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 4 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, wherein the data displayed in the cell A4 is the same as the data displayed in the merged cell U1, and merging the cell A4 and the merged cell U1 into a new merged cell; 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 practical application, data in the two cells can be mutually replaced by blank cells, for example, when data displayed in the cell D6 and the cell D7 need to be exchanged, the data displayed in the cell D6 needs to be copied and pasted into one blank cell "lie quiet" first, then the data displayed in the cell D7 needs to be copied and pasted into the cell D6 "wang chao", and finally the data in the blank cell needs to be copied and pasted into the cell D7 "lie quiet", that is, 3 times of copy and paste operations need to be performed, so that data in the two cells can be mutually replaced, 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 carrying out exchange display on 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 drags the cell D6 by pressing it for a long time, displays the cell D6 in a floating layer along the moving track of the second dragging operation, stops the second dragging operation when dragging it to the position of the merged cell formed by the cell D4 and the cell D5, and determines that data replacement is performed on the cell D6 and the merged cell, where the data displayed in the cell D6 before replacement is "lisfour", 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 "lisfour".
Further, before the data displayed in the first cell and the data displayed in the second cell are displayed in an exchange manner, the table data control method of the embodiment of the present application further includes the following steps: and displaying option information for prompting the user to select the operation type in response to the second dragging operation, wherein the option information comprises data replacement and data coverage. 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 that a user drags the cell, prompt information for selecting data replacement or data coverage is provided for the user, and the data replacement or the data coverage is carried out according to the selection of the user, so that the user can conveniently realize the data replacement or the data coverage in a cell dragging mode.
The following explains 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 the data displayed in the combined cells.
In specific implementation, the data displayed in the merge cell is the display data value of the main lattice of the merge cell, so step S1102 may specifically be: and updating the display data value of the partial cell into the display data value of the main cell of the combined cell.
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. And if the partial cell is an independent cell and the partial cell is the main cell of the merged cell, modifying the merged attribute value of the partial cell to null without modifying the display data value of the partial cell. 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 a corresponding area of 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 independent cells of the target position in the first area corresponding to the table are also in one-to-one correspondence with the elements of the target position in the second area corresponding to the two-dimensional array.
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 form editing application to automatically carry out merging cell splitting processing on merging cells with partial intersection with a target cell sequence in a background, namely, partial cells in the merging cells belonging 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, partial rows and partial columns in the merging cells can be moved independently, therefore, a user does not need to manually cancel the merging function of the merging cells, rows or columns with partial intersection with the merging cells can be moved, the operation is convenient, and mistakes are not easy to make.
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 according to 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 6 th row of cells 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 according to 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 into 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 6 th row of cells 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, 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 the merged cell, the step S1101 specifically includes: and respectively obtaining cell attribute data of each cell in a plurality of target cell sequences from the two-dimensional array corresponding to the table 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 above 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 two cells are swapped according to a data replacement operation for any two cells in the table.
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 obtained, and a second cell corresponding to the second end point position in the table is determined, and then a display data value of the first cell and a display data value of the second cell are 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 merged cells, exchanging the display data values of the main grids of the two merged cells; and if one of the two cells subjected to data replacement is an independent cell and the other one 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 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 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 table data control method described above, 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, and then:
a moving module 1401, specifically configured to move the target cell sequence according to a first moving trajectory of the first dragging operation, with the first moving trajectory;
the display module 1402 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 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 along the first movement track.
Optionally, the table data control apparatus further includes a splitting module, configured to split, before the target position displays the target cell sequence, 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.
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;
the display module 1402 is specifically configured to determine target positions corresponding to the target cell sequences according to a specified sorting manner; 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 processing 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 device 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, in response to the second dragging operation, display 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 displaying the data displayed in the first cell and the data displayed in the second cell in an exchange manner 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, 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 updating module 1502 is further configured to move the cell attribute data of each cell in the target cell sequence to a position before a target position indicated by the position adjustment operation is in a corresponding region in the two-dimensional array, update the merge attribute values of cells in the merge cell except for a part of the cells, and update the merge attribute values of a part of the cells, so as to split the part in the merge cell except for the part of the cells and the part of the cells 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:
an obtaining module 1501, configured to obtain cell attribute data of each cell in the multiple target cell sequences from the two-dimensional array corresponding to the 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 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 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 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 described in detail 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 1601 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, discrete Gate or transistor logic device, or discrete hardware components, and may implement or perform 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 a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
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 charged 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.
An 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 (13)

1. 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 adjustment operation is that a row of cells selected in the target area are sorted according to a designated sorting mode of a sorting setting control, splitting the merged cells in the target area;
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;
moving the cell attribute data of each target cell sequence to a target position corresponding to each target cell sequence, and merging adjacent cells with the same cell attribute data in the target area;
responding to a second dragging operation of 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 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.
2. The method of claim 1, wherein the location adjustment operation is a first drag operation that drags the target cell sequence to a 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:
updating the display data values of the partial cells into the data displayed in the merged cell;
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 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 target position in the two-dimensional array, displaying the target cell sequence in a floating layer form in the moving process, and displaying the target cell sequence in an inoperable state in the target area.
3. 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; before moving the cell attribute data of each cell in the target sequence of cells to the region of the target location corresponding in the two-dimensional array, the method further comprises:
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.
4. 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 of the target positions respectively corresponding to the two-dimensional arrays;
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.
5. The method of claim 4, wherein said merging adjacent cells in the target area having identical cell attribute data comprises:
and detecting the cell attribute data of each cell, merging two adjacent cells if the cell attribute data of the adjacent cells are the same, and displaying the merged cell attribute data.
6. A tabular data control method, comprising:
moving a target cell sequence displayed aiming at a target area in a table in response to a position adjustment operation of the target cell sequence, wherein the target cell sequence is displayed in a floating layer mode in the moving process, the target cell sequence in the target area is displayed in an inoperable state, and the target cell sequence comprises partial cells in a merged cell; when the position adjustment operation is to sort the selected row of cells in the target area according to a specified sorting mode of a sorting setting control, the moving the target cell sequence includes:
splitting the merging cells in the target area;
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;
moving the cell attribute data of each target cell sequence to a target position corresponding to each target cell sequence, and merging adjacent cells with the same cell attribute data in the target area;
displaying the target cell sequence at a target position indicated by the position adjusting operation, wherein the data displayed in the partial cells are the data displayed in the merged cells;
responding to a second dragging operation on 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 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, the data displayed in the first cell and the data displayed in the second cell are displayed in an exchange manner.
7. The method of claim 6, wherein the position adjustment operation is a first drag operation that drags the target sequence of cells to the target position, then:
the moving the target cell sequence in response to the position adjustment operation of the target cell sequence displayed in the target area in the table comprises:
moving the target cell sequence according to a first moving track of the first dragging operation;
the displaying the target cell sequence at the target position indicated by the position adjustment operation comprises:
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.
8. The method of claim 7, wherein prior to moving the target sequence of cells with the first movement trajectory, the method comprises:
and splitting and displaying the part of the merged cells except the part of the cells into new merged cells, and displaying the part of the cells and other cells in the target cell sequence in a combined manner.
9. The method of claim 7, wherein prior to displaying the target sequence of cells at the target location, the method comprises:
if two adjacent cells in any merged cell are located on two sides of the target position, splitting any merged cell into two parts along adjacent edges of the two adjacent cells.
10. The method according to any one of claims 6 to 9, wherein after the target position indicated by the position adjustment operation displays the target cell sequence, the method comprises:
and if the data in any cell in the table is the same as the data in the cell adjacent to the any cell, carrying out cell merging operation on the any cell and the adjacent cell.
11. 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 movement module for
When the position adjustment operation is that a row of cells selected in the target area are sorted according to a designated sorting mode of a sorting setting control, splitting the merged cells in the target area;
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;
moving the cell attribute data of each target cell sequence to a target position corresponding to each target cell sequence, and merging adjacent cells with the same cell attribute data in the target area;
responding to a second dragging operation on 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 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, the data displayed in the first cell and the data displayed in the second cell are displayed in an exchange manner.
12. A table data control apparatus, comprising:
a moving module, configured to move a target cell sequence displayed in a target area in a table in response to a position adjustment operation of the target cell sequence, where the target cell sequence is displayed in a floating layer form and the target cell sequence in the target area is displayed in an inoperable state, and the target cell sequence includes a part of cells in merged cells; when the position adjustment operation is to sort the selected row of cells in the target area according to a specified sorting mode of a sorting setting control, the moving the target cell sequence includes:
splitting the merging cells in the target area;
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;
moving the cell attribute data of each target cell sequence to a target position corresponding to each target cell sequence, and merging adjacent cells with the same cell attribute data in the target area;
a display module, configured to display the target cell sequence at a target position indicated by the position adjustment operation, where data displayed in the partial cells is data displayed in the merged cell;
the mobile module is further configured to: responding to a second dragging operation on 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 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, the data displayed in the first cell and the data displayed in the second cell are displayed in an exchange manner.
13. 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-10.
CN202010732822.4A 2020-07-27 2020-07-27 Table data control method and device Active CN112632930B (en)

Priority Applications (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

Applications Claiming Priority (1)

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

Related Child Applications (1)

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

Publications (2)

Publication Number Publication Date
CN112632930A CN112632930A (en) 2021-04-09
CN112632930B true CN112632930B (en) 2022-11-04

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 Before (1)

Application Number Title Priority Date Filing Date
CN202211480488.3A Pending CN115809646A (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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113869012A (en) * 2021-09-30 2021-12-31 珠海金山办公软件有限公司 Document processing method and device, electronic equipment and computer readable storage medium
CN114201258B (en) * 2021-12-10 2024-06-07 金蝶软件(中国)有限公司 Copy and paste method, apparatus, computer device 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
CN115809646A (en) 2023-03-17

Similar Documents

Publication Publication Date Title
US11763076B2 (en) Document applet generation
US10467315B2 (en) Codeless sharing of spreadsheet objects
CN109446570B (en) Business process display method, device, computer equipment and storage medium
CN101957730B (en) Messaging device and information processing method
CN107844297A (en) A kind of data visualization realizes system and method
CN110399420A (en) A kind of deriving method, electronic equipment and the medium of configurableization Excel format
CN112632930B (en) Table data control method and device
KR20140009297A (en) Formatting data by example
CN106951140A (en) The icon replacing options and electronic equipment of application program
CN103150165A (en) Frame and method for building outdoor data acquisition program
US11556702B2 (en) Orchestration of crud operations for a hierarchical web service data model in a spreadsheet
CN113420355B (en) Floor processing method and device and electronic equipment
CN106294740A (en) Data processing method, device and server
CN114021531A (en) Document collaborative editing method and device, electronic equipment and storage medium
US20060294137A1 (en) Database application including split views
CN114239524A (en) Questionnaire generation method, questionnaire generation device, computer equipment and storage medium
JP2012064207A (en) Host device and content display method of the same
US20220113847A1 (en) Online collaborative document processing method and device
CN112000630B (en) Log storage method, device, equipment and readable storage medium
CN113312052A (en) Component calling method and device, electronic 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
CN110619116A (en) Data processing method, device, terminal and storage medium
CN103970773A (en) Page updating method and device for web page
CN116127935A (en) Document creation method, device, electronic equipment and storage medium
CN116107557A (en) Page visual development 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40042472

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant