Table processing method and device, equipment and storage medium

By clicking on the designated position of the target cell in the spreadsheet to trigger the row/column insertion instruction and automatically adjusting the layout structure, the problem of cumbersome table insertion operation in the existing technology is solved, and the convenience and efficiency of user operations are improved.

CN119512412APending Publication Date: 2025-02-25ZHUHAI KINGSOFT OFFICE SOFTWARE +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411592813.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In existing spreadsheet processing software, the insertion of table rows/columns is cumbersome, time-consuming and labor-intensive, and the layout structure needs to be manually adjusted after insertion.

Method used

The click operation at the specified position on the target cell in the table triggers the row/column insertion instruction, determines the target position of the table element to be inserted according to the click position, and inserts the table element at that position, adjusts its layout structure with the target cell to establish an affiliation relationship.

Benefits of technology

It realizes that the insertion of table elements is triggered directly through click operations in the table, and its layout structure is automatically adjusted, so that the newly inserted table elements have an affiliation relationship with the target cell, improving the convenience and efficiency of users when editing tables.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512412A_ABST
    Figure CN119512412A_ABST
Patent Text Reader

Abstract

The invention relates to a table processing method and device, equipment and a storage medium, and the method comprises the steps: responding to a click operation at a specified position on a target cell in a table, and triggering a release / column insertion instruction; in response to the row / column insertion instruction, determining a target position of a table element to be inserted according to a click position corresponding to the click operation, and inserting the table element at the target position, the table element comprising at least one row of cells or at least one column of cells; and adjusting a layout structure of the table element and the target cell in the table to enable the table element and the target cell to have an affiliation relationship. Therefore, the insertion of the table elements can be triggered and the layout structure of the table elements and the target cell can be automatically adjusted by directly performing the click operation at the specified position on the target cell, so that the newly inserted table elements and the target cell have an affiliation relationship, and the convenience and the efficiency when a user edits the table are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a table processing method, device, equipment and storage medium. Background Art

[0002] In existing spreadsheet processing software, the operation of inserting rows or columns into a table usually relies on traditional menu options or complex keyboard shortcut combinations. When users perform such operations, they often need to first locate a specific position in the table, then use the mouse to search for the "Insert" option in the menu level by level, or memorize and execute a series of specific keyboard shortcut sequences. This operation method is very cumbersome.

[0003] In addition, after inserting a row or column, the user often needs to manually adjust the layout structure of the table to ensure that the layout structure between the newly inserted table elements and the original cells meets the user's expectations. This method of manually adjusting the table layout structure is also time-consuming and labor-intensive. Summary of the invention

[0004] The present application provides a table processing method, device, equipment and storage medium to solve the technical problem that the table row / column insertion method in the prior art is cumbersome, time-consuming and labor-intensive.

[0005] In a first aspect, the present application provides a table processing method, the method comprising:

[0006] In response to a click operation at a specified position on a target cell in the table, triggering a row / column insert instruction;

[0007] In response to the row / column insertion instruction, determining a target position of a table element to be inserted according to a click position corresponding to the click operation, and inserting the table element at the target position, wherein the table element includes at least one row of cells or at least one column of cells;

[0008] The layout structure of the table element and the target cell in the table is adjusted so that there is an ownership relationship between the table element and the target cell.

[0009] In a possible implementation, in response to a click operation at a specified position on a target cell in a table, triggering a row / column insert instruction includes:

[0010] In response to a click operation at any position on the border line of a target cell in the table, a row / column insert instruction is triggered; or,

[0011] In response to a click operation at any position on the content filling area of ​​the target cell in the table, a row / column insertion instruction is triggered.

[0012] In a possible implementation manner, determining the target position of the table element to be inserted according to the click position corresponding to the click operation includes:

[0013] An adjacent area of ​​the click position corresponding to the click operation is determined as a target position of the table element to be inserted, wherein the adjacent area includes at least one row or at least one column.

[0014] In a possible implementation manner, determining an adjacent area of ​​the click position corresponding to the click operation as a target position of the table element to be inserted includes:

[0015] In a case where the click position corresponding to the click operation is located on a first border line of the target cell, an adjacent area of ​​the first border line is determined as a target position of the table element to be inserted, the first border line is a border line of the target cell extending in a first direction, the first direction is an arrangement direction of the target cell and its belonging area, an edge of the adjacent area extending in the first direction overlaps with the first border line, and the belonging area refers to a cell area that has an belonging relationship with the target cell;

[0016] In a case where the click position corresponding to the click operation is located on the second border line of the target cell, an adjacent area in a specified direction of the merged row or column where the click position falls is determined as the target position of the table element to be inserted, the second border line is a border line of the target cell other than the first border line, the specified direction is a direction selected by the user, or a preset direction, and an edge of the adjacent area extending in the first direction overlaps with a border line of the merged row or column where the click position falls; or, in a case where the click position falls on a common border line of two merged rows or columns, an adjacent area between the two merged rows or columns is determined as the target position of the table element to be inserted.

[0017] In a possible implementation, adjusting the layout structure of the table element and the target cell in the table includes:

[0018] The cells in the table element that are located in the same row or the same column as the target cell are merged with the target cell.

[0019] In a possible implementation, inserting the table element at the target position includes:

[0020] Determining the layout structure of the table elements;

[0021] The table element is inserted at the target position according to the layout structure.

[0022] In a possible implementation, determining the layout structure of the table element includes:

[0023] Determine the layout structure of the specified area in the table as the layout structure of the table element; or,

[0024] Layout structure information input by a user is acquired, and a layout structure of the table element is determined according to the layout structure information.

[0025] In a possible implementation manner, determining the layout structure of the designated area in the table as the layout structure of the table element includes:

[0026] Determine the selected area in the table as the designated area, and determine the layout structure of the designated area as the layout structure of the table element; or,

[0027] A row area or a column area adjacent to the target position in the table is determined as a designated area, and a layout structure of the designated area is determined as a layout structure of the table element.

[0028] In a possible implementation, the method further includes:

[0029] When the layout structure of the designated area in the table is determined as the layout structure of the table element, the cell format of the designated area in the table is applied to the table element.

[0030] In a possible implementation manner, determining a target position of a table element to be inserted according to a click position corresponding to the click operation, and inserting the table element at the target position includes:

[0031] If it is determined that inserting the table element at the target position has an impact on other tables, creating a copy of the table, wherein the table and the other tables are located in the same table workspace;

[0032] In the copy, determining a target position of the table element to be inserted according to the click position corresponding to the click operation, and inserting the table element at the target position;

[0033] The adjusting the layout structure of the table element and the target cell in the table includes:

[0034] In the copy, adjusting the layout structure of the table element and the target cell in the table to obtain an adjusted copy;

[0035] The table is replaced in the table workspace with the adjusted copy.

[0036] In a possible implementation, the method further includes:

[0037] If it is determined that replacing the table with the adjusted copy will have an impact on other tables, positions of the other tables in the table workspace are adjusted.

[0038] In a second aspect, the present application provides a table processing device, the device comprising:

[0039] An instruction triggering module, for triggering a row / column insert instruction in response to a click operation at a specified position on a target cell in the table;

[0040] an inserting module, configured to respond to the row / column inserting instruction, determine a target position of a table element to be inserted according to a click position corresponding to the click operation, and insert the table element at the target position, wherein the table element includes at least one row of cells or at least one column of cells;

[0041] The layout adjustment module is used to adjust the layout structure of the table element and the target cell in the table so that the table element and the target cell have an attribution relationship.

[0042] In a possible implementation manner, the instruction triggering module is specifically used to:

[0043] In response to a click operation at any position on the border line of a target cell in the table, a row / column insert instruction is triggered; or,

[0044] In response to a click operation at any position on the content filling area of ​​the target cell in the table, a row / column insertion instruction is triggered.

[0045] In a possible implementation, the insertion module includes:

[0046] The target position determination unit is used to determine an adjacent area of ​​the click position corresponding to the click operation as a target position of the table element to be inserted, wherein the adjacent area includes at least one row or at least one column.

[0047] In a possible implementation manner, the target position determination unit is specifically configured to:

[0048] In a case where the click position corresponding to the click operation is located on a first border line of the target cell, an adjacent area of ​​the first border line is determined as a target position of the table element to be inserted, the first border line is a border line of the target cell extending in a first direction, the first direction is an arrangement direction of the target cell and its belonging area, an edge of the adjacent area extending in the first direction overlaps with the first border line, and the belonging area refers to a cell area that has an belonging relationship with the target cell;

[0049] In a case where the click position corresponding to the click operation is located on the second border line of the target cell, an adjacent area in a specified direction of the merged row or column where the click position falls is determined as the target position of the table element to be inserted, the second border line is a border line of the target cell other than the first border line, the specified direction is a direction selected by the user, or a preset direction, and an edge of the adjacent area extending in the first direction overlaps with a border line of the merged row or column where the click position falls; or, in a case where the click position falls on a common border line of two merged rows or columns, an adjacent area between the two merged rows or columns is determined as the target position of the table element to be inserted.

[0050] In a possible implementation manner, the layout adjustment module is specifically used to:

[0051] The cells in the table element that are located in the same row or the same column as the target cell are merged with the target cell.

[0052] In a possible implementation, the insertion module includes:

[0053] A layout determination unit, used to determine the layout structure of the table elements;

[0054] An inserting unit is used to insert the table element at the target position according to the layout structure.

[0055] In a possible implementation manner, the layout determining unit is specifically configured to:

[0056] Determine the layout structure of the specified area in the table as the layout structure of the table element; or,

[0057] Layout structure information input by a user is acquired, and a layout structure of the table element is determined according to the layout structure information.

[0058] In a possible implementation manner, the layout determining unit is specifically configured to:

[0059] Determine the selected area in the table as the designated area, and determine the layout structure of the designated area as the layout structure of the table element; or,

[0060] A row area or a column area adjacent to the target position in the table is determined as a designated area, and a layout structure of the designated area is determined as a layout structure of the table element.

[0061] In a possible implementation, the device further includes:

[0062] The format inheritance module is used to apply the cell format of the designated area in the table to the table element when the layout structure of the designated area in the table is determined as the layout structure of the table element.

[0063] In a possible implementation, the insertion module includes:

[0064] A copy creation unit, used for creating a copy of the table if it is determined that inserting the table element at the target position has an impact on other tables, wherein the table and the other tables are located in the same table workspace;

[0065] an inserting unit, configured to determine, in the copy, a target position of a table element to be inserted according to a click position corresponding to the click operation, and insert the table element at the target position;

[0066] The layout adjustment module is specifically used for:

[0067] In the copy, adjusting the layout structure of the table element and the target cell in the table to obtain an adjusted copy;

[0068] The table is replaced in the table workspace with the adjusted copy.

[0069] In a possible implementation, the device further includes:

[0070] The adaptive adjustment module is used to adjust the positions of the other tables in the table workspace when it is determined that replacing the table with the adjusted copy will have an impact on other tables.

[0071] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory, wherein the processor is used to execute a table processing program stored in the memory to implement the table processing method described in any one of the first aspects.

[0072] In a fourth aspect, the present application provides a storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the table processing method described in any one of the first aspects.

[0073] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application triggers a row / column insertion instruction in response to a click operation at a specified position on a target cell in a table, determines the target position of the table element to be inserted according to the click position corresponding to the click operation in response to the row / column insertion instruction, inserts the table element at the target position, adjusts the layout structure of the table element and the target cell in the table so that the table element and the target cell have an ownership relationship, and realizes the insertion of the table element by directly performing a click operation at a specified position on the target cell and automatically adjusting the layout structure of the table element and the target cell so that the newly inserted table element and the target cell have an ownership relationship. This method allows users to insert new table elements at specific positions in a table and set the ownership of the newly inserted table elements without complicated menu options and multiple manual operations, which can significantly improve the convenience and efficiency of users when editing tables. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0075] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0076] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0077] Figure 1 A flowchart of an embodiment of a table processing method provided in an embodiment of the present application;

[0078] Figure 2 A schematic diagram of a preset position on a target cell in a table;

[0079] Figure 3 Another schematic diagram of a preset position on a target cell in a table;

[0080] Figure 4 A schematic diagram of a table processing scenario;

[0081] Figure 5 for Figure 4 Schematic diagram of the corresponding table layout effect;

[0082] Figure 6 Another schematic diagram for table processing scenario;

[0083] Figure 7 A block diagram of an embodiment of a table processing device provided in an embodiment of the present application;

[0084] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0085] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0086] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0087] In order to solve the technical problems of the cumbersome, time-consuming and labor-intensive method of inserting table rows / columns in the prior art, the present application provides a table processing method, device, equipment and storage medium, which can trigger the insertion of table elements by directly clicking at a specified position on the target cell and automatically adjust the layout structure of the table elements and the target cell, so that there is an ownership relationship between the newly inserted table elements and the target cell. This method allows users to insert new table elements at specific positions in the table and set the ownership of the newly inserted table elements without going through cumbersome menu options and multiple manual operations, which can significantly improve the convenience and efficiency of users when editing tables.

[0088] Figure 1 A flowchart of an embodiment of a table processing method provided in an embodiment of the present application.

[0089] like Figure 1 As shown, the process includes the following steps:

[0090] Step 101 : In response to a click operation at a specified position on a target cell in a table, a row / column insert instruction is triggered.

[0091] The above-mentioned table can be any table, which can be a table in a traditional format, such as a table in .xls, .xlsx and other formats, or a new generation of smart table, online table, and the embodiment of the present application does not limit this.

[0092] From the perspective of access methods, the above-mentioned table can be a collaborative document, which allows multiple users to collaboratively edit it online, or allows multiple users to spread it to each other through mobile storage media (such as USB flash drives) to collaboratively edit it. Taking online collaborative editing as an example, there are currently two different document collaboration methods, namely online collaborative documents and collaborative documents within a local area network. Among them, online collaborative documents are a way to share and edit documents through the Internet, store documents on a cloud server, allow multiple users to access, edit and comment on documents at the same time, and provide real-time collaboration and communication functions. Collaborative documents within a local area network refer to a method in which multiple users can edit and modify the same document in a local area network by sharing folders or using professional collaborative editing software. The table in the embodiment of the present application can be any of the above-mentioned collaborative documents, and the embodiment of the present application does not limit this.

[0093] The target cell may be any cell in the table, which may be a merged cell, that is, a cell formed by merging at least two consecutive independent cells in the table, or an independent cell, which is not limited in this embodiment of the present application.

[0094] In one embodiment, the target cell is a selected cell, and subsequent triggered row / column insertion instructions are all applied to the target cell.

[0095] In one embodiment, the designated position on the target cell refers to a preset position on the target cell, that is, a predefined position, which is fixed and clear and has a specific purpose, namely, triggering a row / column insertion instruction. That is to say, when a click operation at a preset position on a cell in the table (i.e., the target cell) is detected, the row / column insertion instruction will be automatically triggered. When a click operation at other non-preset positions on the target cell is detected, the row / column insertion instruction will not be triggered. Among them, the click operation at the designated position on the target cell can be a single-click operation, a double-click operation, or a right-click selection operation.

[0096] In practical applications, there are usually multiple preset positions, which can be pre-defined by the software / system or by the user. It can be seen that the technical solution provided by the embodiment of the present application allows the user to customize the location of the preset position according to personal habits or needs, which can make the operation interface of the table more in line with the user's operating habits, thereby improving the user's experience, and can also be applied to a wider range of usage scenarios and needs, with higher flexibility and applicability.

[0097] Furthermore, as an optional implementation, the preset position on the target cell can be highlighted in a specific form in the table. For example, a small icon or special mark (such as a circle, a solid dot with a highlighted color, an arrow, a plus sign, a horizontal line, etc.) is set at the preset position, so that the user can easily identify the preset position on the target cell when browsing the table, and trigger the row / column insertion instruction by clicking the preset position.

[0098] As another optional implementation method, when the mouse pointer hovers over a preset position on the target cell, the preset position is highlighted in a specific form, or other prompts (such as displaying a floating prompt box) are used to inform the user that the current position is the preset position to facilitate user operation.

[0099] It can be seen from the above description that the application of the technical solution provided by the embodiment of the present application enables the user to intuitively select the row / column insertion position, which further enhances the flexibility and convenience of the technical solution of the present application.

[0100] See also Figure 2 , which is a schematic diagram of the preset position on the target cell in the table. Figure 2 In the figure, the target cell is a merged cell, and 5 preset positions (represented by circles in the figure) are set on the target cell.

[0101] See also Figure 3 , another schematic diagram of a preset position on a target cell in a table. Figure 3 In the figure, the target cell is an independent cell, and three preset positions (represented by circles in the figure) are set on the target cell.

[0102] pass Figure 2 and Figure 3As can be seen from the example, the vertex (one or several vertices) position of the target cell, the center point position of the cell, the midpoint position of the cell border line (one or several border lines), the 1 / 3 point position, the 2 / 3 point position and other preset point positions, and the intersection position of the cell border line with other cell border lines can be set as the preset position. Of course, in actual applications, there may also be other ways to set the preset position, and the technical solution of the embodiment of the present application does not limit the specific setting of the preset position.

[0103] In another embodiment, the designated position on the target cell refers to any position on the target cell, and the any position may be any position on the border line of the target cell. Of course, the border line here includes any border line of the target cell. The any position may also be any position on the content filling area of ​​the target cell. The content filling area of ​​a cell refers to the area surrounded by the border line of the cell.

[0104] Based on this, in this embodiment, in response to a click operation at a specified position on a target cell in a table, a specific implementation of triggering a row / column insertion instruction includes: in response to a click operation at any position on the border line of the target cell in the table, triggering a row / column insertion instruction; or in response to a click operation at any position on the content filling area of ​​the target cell in the table, triggering a row / column insertion instruction. The click operation at any position on the target cell can be a single-click operation, a double-click operation, or a right-click selection operation.

[0105] It can be seen from this embodiment that the technical solution provided by the embodiment of the present application allows the user to trigger a row / column insertion instruction by clicking any position on a cell in a table. Compared with the prior art method of selecting a cell or row / column, calling up a function menu, and then selecting the Insert row / column function in the function menu to trigger a row / column insertion instruction, the operation is simpler and more flexible, and user interaction is more convenient.

[0106] Step 102 : In response to the row / column insert instruction, determine the target position of the table element to be inserted according to the click position corresponding to the click operation, and insert the table element at the target position.

[0107] Wherein, the table element to be inserted includes at least one row of cells or at least one column of cells. In a simple case, the table element to be inserted includes a row of cells or a column of cells, that is, a row is inserted or a column is inserted at the target position of the table. In a complex case, the table element to be inserted includes a plurality of cells arranged according to a certain layout structure, and the layout structure of the table element to be inserted is not limited in the embodiment of the present application. In this regard, when inserting the table element at the target position, the layout structure of the table element is first determined, and then the table element is inserted at the target position according to the layout structure. It can be seen from this that the technical solution provided by the embodiment of the present application allows the table elements of various layout structures to be inserted flexibly in the table, which can be applied to a wider range of usage scenarios and requirements, and has higher flexibility and applicability. As for how to determine the table element to be inserted, it is explained by the embodiment hereinafter, and it is not described in detail here.

[0108] In the technical solution of the embodiment of the present application, different click positions may correspond to different target positions. For example, taking the table element to be inserted as an example, if the click position corresponding to the click operation is Figure 2 In the example, the preset position 3 is used, the third row is determined as the target position for inserting the table element, and a new row of cells is inserted at the target position. In addition, it can be understood that the original third row and all subsequent rows (if any) will be moved down together with the insertion of the new row. For the table display effect at this time, please refer to Figure 2 For example, Figure 2 In the figure, the rows with bold borders are the newly inserted table elements.

[0109] If the click position corresponding to the click operation is the preset position 4, the second row is determined as the target position for inserting the table element, and a new row of cells is inserted at the target position. Similarly, the original second row and all subsequent rows (if any) will be moved down together due to the insertion of the new row. For the table display effect at this time, please refer to Figure 2 For example, Figure 2 In the figure, the rows with bold borders are the newly inserted table elements.

[0110] For another example, if the table element to be inserted includes a row of cells, if the click position corresponding to the click operation is Figure 3 In the example of preset position 2, the second row is determined as the target position for inserting the table element, and a new row of cells is inserted at the target position. In addition, it can be understood that the original second row and all subsequent rows (if any) will be moved down together due to the insertion of the new row. For the table display effect at this time, please refer to Figure 3 For example, Figure 3 In the figure, the rows with bold borders are the newly inserted table elements.

[0111] It can also be seen from the above examples that even if different click positions can correspond to different target positions, the target position of the table element to be inserted is always adjacent to the click position corresponding to the click operation. Therefore, when determining the target position of the table element to be inserted according to the click position corresponding to the click operation, the adjacent area of ​​the click position corresponding to the click operation is determined as the target position of the table element to be inserted. Here, the adjacent area includes at least one row or at least one column, and its specific number of rows and columns is usually the same as the number of rows and columns of the table element to be inserted, so that the adjacent area can just accommodate the table element to be inserted. As for how to determine the target position of the table element to be inserted according to the click position corresponding to the click operation, it will be explained through embodiments in the following, and will not be described in detail here.

[0112] In particular, by right-clicking a designated position on a target cell, that is, selecting the target cell, a row / column insertion instruction can be triggered, and the adjacent area of ​​the target cell is determined as the target position of the table element to be inserted. Figure 3 In the example, a target cell is selected, and the area in the upper row of the target cell is determined as the target position of the table element to be inserted.

[0113] Step 103: Adjust the layout structure of the table element and the target cell in the table so that the table element and the target cell have an ownership relationship.

[0114] From the perspective of table layout, the existence of an ownership relationship between the table element after layout adjustment and the target cell means that: the table element after layout adjustment is adjacent to the target cell after layout adjustment, and the table element after layout adjustment is located in the merged row or merged column of the target cell after layout adjustment. The merged row (or merged column) of the target cell after layout adjustment refers to the row (or column) where the subcells that merge to form the target cell are located. For example, the target cell after layout adjustment is formed by the merger of cell A1 (the cell located in row 1 of column A in the table) and cell A2, then the merged rows of the target cell after layout adjustment include row 1 and row 2. If the table element after layout adjustment is located in row 1 or row 2 and is adjacent to the target cell after layout adjustment, it is considered that the table element after layout adjustment and the target cell after layout adjustment have an ownership relationship.

[0115] In this regard, in one embodiment, the cells in the table element that are located in the same row or column as the target cell are merged with the target cell to adjust the layout of the table element and the target cell, so that the target cell is a merged cell, and the table element after the layout adjustment is adjacent to the target cell and located in the merged row or merged column of the target cell, so that the table element after the layout adjustment belongs to the target cell.

[0116] See also Figure 2 or Figure 3 , an example is given of merging the cells in the table element that are located in the same column as the target cell with the target cell, so that the target cell is a merged cell, and the table element after layout adjustment is adjacent to the target cell and is located in the merged row of the target cell.

[0117] The cells in the table element that are located in the same row as the target cell are merged with the target cell, so that the target cell is a merged cell, and the table element after layout adjustment is adjacent to the target cell and located in the merged column area (ie, belonging area) of the target cell.

[0118] It can be seen from the above description that in the technical solution of the embodiment of the present application, after inserting a new table element for a target cell in a table, the new table element will automatically establish an ownership relationship with the target cell, and reflect this ownership relationship in the table layout, thereby eliminating the need for users to manually adjust the layout structure of the table, thereby improving the convenience and efficiency of table processing, reducing the error rate of manual operations, and improving user experience.

[0119] In particular, the above description has also mentioned that the row / column insertion instruction can be triggered by selecting the target cell, and the execution of the above steps 102 and 103 can be triggered. Then in an exemplary application scenario, if the user wants to set the belonging area for a cell in the table (which can be a merged cell or an independent cell), the cell can be selected. In response to the cell being selected, a table element will be automatically inserted into the adjacent area of ​​the cell, and the belonging relationship between the table element and the cell will be automatically determined. It can be seen that compared with the operation process in the prior art, this process does not require a series of operations such as calling up the menu, selecting the insert row / column function, merging cells or other cell layout adjustment operations. The operation is simpler and the user interaction is more convenient.

[0120] The technical solution provided by the embodiment of the present application triggers a row / column insertion instruction in response to a click operation at a specified position on a target cell in a table, determines the target position of the table element to be inserted according to the click position corresponding to the click operation in response to the row / column insertion instruction, inserts the table element at the target position, adjusts the layout structure of the table element and the target cell in the table so that the table element and the target cell have an ownership relationship, and realizes the insertion of the table element by directly performing a click operation at a specified position on the target cell and automatically adjusting the layout structure of the table element and the target cell so that the newly inserted table element and the target cell have an ownership relationship. This method allows the user to insert a new table element at a specific position in the table and set the ownership of the newly inserted table element without going through cumbersome menu options and multiple manual operations, which can significantly improve the convenience and efficiency of users when editing tables.

[0121] In one embodiment, the designated position on the target cell refers to a preset position or any position on the border line of the target cell. The specific implementation of determining the adjacent area of ​​the click position corresponding to the click operation as the target position of the table element to be inserted includes:

[0122] In the case where the click position corresponding to the click operation is located on the first border line of the target cell, the adjacent area of ​​the first border line is determined as the target position of the table element to be inserted, the first border line is the border line of the target cell extending in the first direction, the first direction is the arrangement direction of the target cell and its belonging area, an edge of the adjacent area at the target position extending in the first direction overlaps with the first border line, the belonging area refers to the cell area that has an belonging relationship with the target cell, and the adjacent area is a partial area in the belonging area. Among them, the belonging area of ​​the target cell is adjacent to the target cell, and the number of rows (or columns) contained in the belonging area is the same as the number of merged rows (or columns) of the target cell, and the row (or column) where the belonging area is located is located in the merged row (or merged column) of the target cell.

[0123] In the case where the click position corresponding to the click operation is located on the second border line of the target cell, the adjacent area of ​​the merged row (or merged column) where the click position falls on the specified orientation is determined as the target position of the table element to be inserted, the second border line is the border line of the target cell other than the first border line, the specified orientation is the orientation selected by the user, or is a preset orientation, and an edge of the adjacent area extending in the first direction overlaps with a border line of the merged row (or merged column) where the click position falls. In the case where the click position falls on the common border line of two merged rows (or merged columns), the adjacent area between the two merged rows (or merged columns) is determined as the target position of the table element to be inserted.

[0124] The arrangement direction of the target cell and its belonging area refers to the relative position relationship between the target cell and its belonging area. If the target cell and its belonging area are adjacent to each other on the left and right, then the arrangement direction of the target cell and its belonging area is the horizontal direction. If the target cell and its belonging area are adjacent to each other on the top and bottom, then the arrangement direction of the target cell and its belonging area is the vertical direction. The arrangement direction can be determined by analyzing the overall structure of the table or specified by the user, such as specifying the arrangement direction when triggering a row / column insertion instruction.

[0125] by Figure 2 Taking the shown table as an example, the target cells (including cells with "target cell" content) and their belonging areas (including at least cells with "original 2nd row" and cells with "original 3rd row" content) are arranged in a horizontal direction. Then, the first direction is the horizontal direction, the first border line is the upper border line and the lower border line of the target cell, and the second border line is the left border line and the right border line of the target cell.

[0126] It should be noted that the cell vertex is a special type of position, and its particularity is reflected in that the cell vertex is the intersection of two different extension direction border lines of the cell. Then, from the position point of view, the cell vertex belongs to the border lines of two different extension directions. For example, the upper right corner vertex of the cell belongs to the upper border line and the right border line of the cell. Further, the arrangement direction of the adjacent areas of the border lines of different extension directions is different, and the arrangement direction of the adjacent areas also determines the arrangement direction of the table elements to be inserted. For example, for the adjacent area located above or below the border line in the horizontal extension direction, the adjacent area also extends in the horizontal direction, so the arrangement direction of the adjacent area is horizontal, which means that the table elements to be inserted will be arranged horizontally in the table, that is, the table elements to be inserted include one or more rows. For the adjacent area located on the left and right sides of the border line in the longitudinal extension direction, the adjacent area also extends in the longitudinal direction, so the arrangement direction of the adjacent area is longitudinal, which means that the table elements to be inserted will be arranged longitudinally in the table, that is, the table elements to be inserted include one or more columns.

[0127] It can be seen that there are two feasible table element insertion schemes when cell vertices are involved. However, in actual applications, users often do not need to insert new rows and columns at the same time, but implement one of the insertion schemes, that is, inserting rows or inserting columns.

[0128] In this regard, in one embodiment, it is proposed to determine the border line to which the cell vertex belongs according to the arrangement direction of the target cell and the region to which it belongs.

[0129] When the target cell and its region are arranged in a horizontal direction, the border line extending in the horizontal direction is determined as the border line to which the cell vertex belongs. Figure 2 The preset positions 1, 2, 4 and 5 are located on the first border line of the target cell, and the preset position 3 is located on the second border line of the target cell.

[0130] When the target cell and its belonging area are arranged in a vertical direction, the border line extending along the vertical direction is determined as the border line to which the cell vertex belongs.

[0131] In practical applications, which border lines include vertices and which border lines do not include vertices can be preset according to the above principle. For example, it is preset that the first border line includes vertices and the second border line does not include vertices, so as to determine that preset position 1, preset position 2, preset position 4 and preset position 5 are located on the first border line of the target cell.

[0132] For further information, see Figure 4 , when the click position corresponding to the click operation is located at the first border line of the target cell, for example, the click position corresponding to the click operation is preset position 1 or preset position 2, then the adjacent area of ​​the first border line, that is, the original 4th row, is determined as the target position of the table element to be inserted. At this time, a row is inserted on the original 4th row, recorded as the new 4th row. At the same time, the original 4th row and all rows after it (if any) are moved down one row. Furthermore, the cells in the new 4th row that are located in the same column as the target cell are merged with the target cell to form a new merged target cell. At this time, the layout effect of the newly inserted 4th row belonging to the target cell will be presented.

[0133] For example, see Figure 2 , the click position corresponding to the click operation is preset position 4 or preset position 5, then the adjacent area of ​​the first border line, that is, the original 2nd row, is determined as the target position of the table element to be inserted. At this time, a row is inserted on the original 2nd row, recorded as the new 2nd row. At the same time, the original 2nd row and all rows after it (if any) are moved down one row. Furthermore, the cells in the new 2nd row that are located in the same column as the target cell are merged with the target cell to form a new merged target cell. At this time, the layout effect of the newly inserted 2nd row belonging to the target cell will be presented.

[0134] See also Figure 2 , when the click position corresponding to the click operation is located on the second border line of the target cell, for example, the click position corresponding to the click operation is preset position 6 (assuming that preset position 6 is located on the second border line and between preset position 3 and preset position 4, Figure 2(not shown in the figure). At this time, according to the above description, it is determined that the merged behavior where the click position falls displays the merged row with the content of "the original 2nd row", and then the merged row is determined as the target position of the table element to be inserted in the specified position, such as the adjacent area below, that is, the original 3rd row. At this time, a row is inserted on the original 3rd row, recorded as the new 3rd row. At the same time, the original 3rd row and all rows after it (if any) are moved down one row. Furthermore, in the new 3rd row, the cells in the same column as the target cell are merged with the target cell to form a new merged target cell. At this time, the layout effect of the newly inserted 3rd row belonging to the target cell will be presented (see Figure 2 ).

[0135] In addition, see Figure 2 , there is also a special position on the second border line, which is located at the intersection of two merged rows, such as the preset position 3. For this type of position, as an optional implementation method, you can directly insert a table element between the two merged rows. The effect presented at this time is to insert a row on the original 3rd row, recorded as the new 3rd row. At the same time, the original 3rd row and all rows after it (if any) are moved down one row. Furthermore, in the new 3rd row, the cells in the same column as the target cell are merged with the target cell to form a new merged target cell. At this time, the layout effect of the newly inserted 3rd row belonging to the target cell will be presented (see Figure 2 ).

[0136] See also Figure 4 Effect 1, the click position corresponding to the click operation is preset position 6 (located between preset position 2 and preset position 3, not shown in the figure). At this time, preset position 6 only falls into one cell, so the adjacent area of ​​the cell in the specified position, such as the bottom, that is, the original 4th row is determined as the target position of the table element to be inserted. At this time, insert a row on the original 4th row, recorded as the new 4th row. At the same time, the original 4th row and all rows after it (if any) are moved down one row. Furthermore, the cells in the new 4th row that are located in the same column as the target cell are merged with the target cell to form a new merged target cell. At this time, the layout effect of the newly inserted 4th row belonging to the target cell will be presented.

[0137] It can be seen from the above embodiments that the technical solution of the present application can trigger the insertion of a table element by directly clicking on the border line of the target cell, and automatically set the ownership relationship between the table element and the target cell. This method allows users to insert new table elements at specific locations in the table and set the ownership of the newly inserted table elements without going through cumbersome menu options and multiple manual operations, which can significantly improve the convenience and efficiency of users when editing tables.

[0138] It should be noted that, in the above embodiment, only one row is inserted as an example to make an exemplary explanation. In practical applications, multiple rows, such as two rows or three rows, can also be inserted. In this regard, as an optional implementation, after the user clicks the specified position of the target cell, a pop-up menu can be used to allow the user to select the number of rows (or columns) to be inserted. This allows for more flexible row / column insertion in a table.

[0139] Furthermore, the above embodiment only illustrates the example of inserting a row below the cell where the click position falls. In actual application, a row can also be inserted above the cell where the click position falls. As an optional implementation method, after the user clicks the designated position of the target cell, a pop-up menu can be used for the user to select the direction of the inserted row. This allows for more flexible row / column insertion in a table.

[0140] In one embodiment, the designated position on the target cell refers to a preset position or any position on the target cell content filling area. The specific implementation of determining the adjacent area of ​​the click position corresponding to the click operation as the target position of the table element to be inserted includes: determining the adjacent area of ​​the cell where the click position falls in the designated position as the target position of the table element to be inserted. Here, the cell where the click position falls refers specifically to an independent cell. Among them, in the case where the target cell is an independent cell, the cell where the click position falls is naturally the target cell. In the case where the target cell is a merged cell, the cell where the click position falls refers to one of the cells included in the target cell. The above-mentioned designated position can be a preset position, or a position specified by the user. The above-mentioned designated position can also be determined by the relative position relationship between the click position and the cell where it falls. For example, the click position is relatively upper in the content filling area of ​​the cell where it falls, then the corresponding designated position is above. For another example, the click position is relatively lower in the content filling area of ​​the cell where it falls, then the corresponding designated position is below.

[0141] For example, the click position for a click action is Figure 2 The positions indicated by the black solid points in Figure 2It can be seen that the click position corresponding to the click operation falls into the cell located in the second row of the target cell, and the click position falls in a relatively upper position in the content filling area of ​​the cell. Then, the adjacent area above the cell, that is, the original first row, is determined as the target position of the table element to be inserted. At this time, a row is inserted on the original first row, recorded as the new first row. At the same time, the original first row and all the rows before it (if any) are moved up one row. Furthermore, the cells in the new first row that are located in the same column as the target cell are merged with the target cell to form a new merged target cell. At this time, the layout effect of the newly inserted first row belonging to the target cell will be presented.

[0142] It can be seen from the above embodiments that the technical solution of the present application can trigger the insertion of a table element by directly clicking on the internal filling area of ​​the target cell, and automatically set the ownership relationship between the table element and the target cell. This method allows users to insert new table elements at specific locations in the table and set the ownership of the newly inserted table elements without going through cumbersome menu options and multiple manual operations, which can significantly improve the convenience and efficiency of users when editing tables.

[0143] Here is another special scenario: Figure 4 , the cell displaying the content of the "target cell" belongs to the belonging area of ​​another merged cell. In this scenario, if the technical solution of the embodiment of the present application is applied to the merged cell, the preset position 1 and the preset position 5 are also the preset positions on the merged cell that can trigger the row / column insertion instruction.

[0144] Taking preset position 1 as an example, for a cell displaying the "target cell" content, the table layout effect that a user wants to obtain by clicking preset position 1 is usually as follows: Figure 4 As shown in effect 1 in the figure. For a merged cell that displays the "merged cell" content, the table layout effect that the user wants to obtain by clicking the preset position 1 is usually as follows Figure 4 As shown in Effect 2. It can be seen that for different cells, the table layout effects that users want to obtain by clicking the same preset position are also different.

[0145] In order to obtain an accurate table layout effect, as an optional implementation method, when the preset position clicked by the user involves two cells that may form two table layout effects, a pop-up window is used to remind the user to select a target cell, that is, to select a cell for which to insert a new table element that has an attribution relationship. Once the user selects a cell, the position clicked by the user is used as the designated position on the cell, and the above solution is applied based on the cell to insert table elements and adjust the layout structure, thereby obtaining a table layout effect that meets the user's expectations.

[0146] As another optional implementation method, the user first selects a cell (i.e., determines the target cell), and then only the preset position that can trigger the row / column insertion instruction is presented for the cell selected by the user. Subsequently, in response to the user clicking operation on any of the presented preset positions, the cell selected by the user is determined as the target cell, and the above-mentioned scheme is applied based on the target cell to insert table elements and adjust the layout structure, thereby obtaining a table layout effect that meets the user's expectations.

[0147] For example, if the user previously selected Figure 4 In the example of "Merge Cells", the cell with "Merge Cells" content is displayed, and then click position 1, then you will get the example of effect 2. If the user has selected Figure 4 Select the cell that displays the content of the "target cell" and then click position 1, then you will get an example of effect 1.

[0148] In addition, see Figure 4 It can be seen from the example of effect 1 that, when the target cell also has a parent cell, the parent cell of the target cell refers to the cell to which the target cell belongs, such as Figure 4 The cell with "Merge Cell" content displayed is the parent cell of the target cell, and it also involves adjusting the layout structure of the parent cell of the target cell and the table element in the table to maintain the belonging relationship between the target cell and its parent cell unchanged.

[0149] In one embodiment, the specific implementation of determining the layout structure of the table element includes: determining the layout structure of the specified area in the table as the layout structure of the table element. It can be seen from this that the technical solution of the embodiment of the present application allows the existing layout structure in the table to be reused on the newly inserted table element. This method can simply and conveniently determine the layout structure of the newly inserted table element. Of course, in actual applications, the layout structure of the newly inserted table element can also be fine-tuned on this basis to meet specific needs or optimize the display effect.

[0150] As an optional implementation, the specific implementation of determining the layout structure of the designated area in the table as the layout structure of the table element includes: determining the selected area in the table as the designated area.

[0151] The above selection operation can be a copy operation or a cut operation. Figure 4 For example, suppose the user wants to Figure 4 The layout structure of the table area selected by the dotted box in the above example is reused to other areas of the merged cell (referring to other areas of the merged cell except the table area), and the result is Figure 5 The table layout effect shown in the example. According to the above description, users can select Figure 4 In the table area selected by the dotted box, the copy is triggered, and then the preset position 1 on the border line of the merged cell is clicked. Then, the row / column insertion instruction will be triggered for the merged cell, and a target position will be determined based on the preset position 1. The target position is an area with two rows, such as Figure 5 As shown in the new 4th and 5th rows in the table. Then, insert table elements in the new 4th and 5th rows according to the layout structure of the copied table area. Finally, merge the cells in the table element that are in the same column as the merged cell with the merged cell to obtain a new merged cell. So far, we have Figure 5 The layout effect of the example.

[0152] As another optional implementation method, the row area or column area adjacent to the target position in the table is determined as the designated area, and the layout structure of the designated area is determined as the layout structure of the table element. It can be seen from this that the technical solution of the embodiment of the present application allows the newly inserted table element to automatically inherit the existing layout structure in the table. This method eliminates the need for the user to manually specify complex layout parameters, including eliminating the need for the user to reuse complex layout structures by copying / cutting, etc., and only requires the position where the new table element should be inserted to be determined, and the adjacent area can be automatically selected as the layout structure template, thereby making the table insertion operation simpler and more convenient.

[0153] still Figure 4 For example, suppose the user clicks on the preset position 1 for the merged cell, then the row / column insertion instruction is triggered, and a target position is determined based on the preset position 1, which is an area with two rows, such as Figure 5 As shown in the new 4th and 5th rows in . Then, according to the layout structure of the original 2nd and 3rd rows, table elements are inserted in the new 4th and 5th rows. Finally, the cells in the table element that are in the same column as the merged cell are merged with the merged cell to obtain a new merged cell. So far, we have Figure 5 The layout effect of the example.

[0154] Further, in this embodiment, when the layout structure of the designated area in the table is determined as the layout structure of the table element, the cell format of the designated area in the table is applied to the table element.

[0155] The above cell format refers to a collection of properties such as the display mode, alignment, font style, border, background color, number format, etc. of the data in the cell. By setting the cell format, users can control the appearance of the data to make it more in line with actual needs.

[0156] It can be seen from this that in the technical solution of the embodiment of the present application, when the newly inserted table element reuses the layout structure of the existing area in the table, the format of the cells in the area can also be reused. This can automatically set the cell format of the newly inserted table element, and also make the newly inserted table element and the cell format of the reused area in the table consistent. This method fully maintains the consistency of the table context, so that the newly inserted table element can be naturally integrated into the table.

[0157] In another embodiment, the specific implementation of determining the layout structure of the table element includes: acquiring layout structure information input by the user, and determining the layout structure of the table element according to the layout structure information.

[0158] The above-mentioned layout structure information can be completely input by the user, for example, the user can directly input the desired layout structure information through the input tool on the interface (such as a text box, a drop-down menu, a graphical layout editor, etc.). Or the user can select from the recommended layout structure templates. The recommended layout structure template can be a set of standard layout structures defined when the table software is designed, and can also include a layout structure template identified from the table, such as a layout structure that appears frequently in the table. The embodiment of the present application does not limit this.

[0159] It can be seen from the above embodiments that the technical solution provided by the embodiments of the present application allows users to flexibly insert table elements of various layout structures into a table, which can meet a wider range of scenarios and needs and improve user experience.

[0160] In one embodiment, the target position of the table element to be inserted is determined according to the click position corresponding to the click operation, and the specific implementation of inserting the table element at the target position includes: when it is determined that inserting the table element at the target position has an impact on other tables, a copy of the table is created, and the table and other tables are located in the same table workspace; in the copy, the target position of the table element to be inserted is determined according to the click position corresponding to the click operation, and the table element is inserted at the target position. Adjusting the layout structure of the table element and the target cell in the table includes: in the copy, adjusting the layout structure of the table element and the target cell in the table to obtain an adjusted copy; in the table workspace, replacing the table with the adjusted copy.

[0161] Further, when it is determined that replacing the table with the adjusted copy will have an impact on other tables, the positions of the other tables in the table workspace are adjusted.

[0162] In the above embodiment, the table refers to a closed table area in the table workspace, and the table workspace may include one or more tables. Then, when the user operates on one of the tables, it may affect other tables in the table workspace.

[0163] For example, see Figure 6 , in which there are two tables, respectively denoted as Table 1 and Table 2. Assume that the user only wants to apply the technical solution provided in the embodiment of the present application to perform row / column insertion operations in Table 1, but does not want to affect Table 2. In this regard, according to the technical solution described in the above embodiment, a copy of Table 1 is created, such as creating a new table workspace, creating a copy of Table 1 in the newly created table workspace, and then performing a series of operations in the copy of Table 1, including determining the target position of the table element to be inserted according to the click position corresponding to the click operation, inserting the table element at the target position, and adjusting the layout structure of the table element and the target cell in the table. Finally, the adjusted copy of the table replaces Table 1 in the original table workspace. It can be understood by those skilled in the art that this method does not affect the layout structure of Table 2.

[0164] Further, assuming Figure 6 There is also Table 3 (not shown in the figure), which is below Table 1. After adding a row to Table 1, the number of rows and columns occupied by Table 1 increases, and it is possible that Table 1 and Table 3 partially overlap after the added row. In order to avoid affecting Table 3, Table 3 can be moved down. In this way, the position of Table 3 in the table workspace is adjusted to avoid the impact of Table 3 caused by the insertion of rows / columns in Table 1.

[0165] It can be seen from the above embodiments that the technical solution provided in the embodiments of the present application fully considers the integrity and completeness of the original table workspace, achieves the goal of inserting and adjusting table elements without affecting other tables, and significantly improves the flexibility of table editing and user experience.

[0166] Figure 7 This is a block diagram of an embodiment of a table processing device provided in an embodiment of the present application. Figure 7 As shown, the device comprises:

[0167] The instruction triggering module 71 is used to trigger the row / column inserting instruction in response to a click operation at a designated position on a target cell in the table;

[0168] An inserting module 72, configured to respond to the row / column inserting instruction, determine a target position of a table element to be inserted according to a click position corresponding to the click operation, and insert the table element at the target position, wherein the table element includes at least one row of cells or at least one column of cells;

[0169] The layout adjustment module 73 is used to adjust the layout structure of the table element and the target cell in the table so that the table element and the target cell have an attribution relationship.

[0170] In a possible implementation manner, the instruction triggering module 71 is specifically configured to:

[0171] In response to a click operation at any position on the border line of a target cell in the table, a row / column insert instruction is triggered; or,

[0172] In response to a click operation at any position on the content filling area of ​​the target cell in the table, a row / column insertion instruction is triggered.

[0173] In a possible implementation, the insertion module 72 includes:

[0174] The target position determination unit is used to determine an adjacent area of ​​the click position corresponding to the click operation as a target position of the table element to be inserted, wherein the adjacent area includes at least one row or at least one column.

[0175] In a possible implementation manner, the target position determination unit is specifically configured to:

[0176] In a case where the click position corresponding to the click operation is located on a first border line of the target cell, an adjacent area of ​​the first border line is determined as a target position of the table element to be inserted, the first border line is a border line of the target cell extending in a first direction, the first direction is an arrangement direction of the target cell and its belonging area, an edge of the adjacent area extending in the first direction overlaps with the first border line, and the belonging area refers to a cell area that has an belonging relationship with the target cell;

[0177] In a case where the click position corresponding to the click operation is located on the second border line of the target cell, an adjacent area in a specified direction of the merged row or column where the click position falls is determined as the target position of the table element to be inserted, the second border line is a border line of the target cell other than the first border line, the specified direction is a direction selected by the user, or a preset direction, and an edge of the adjacent area extending in the first direction overlaps with a border line of the merged row or column where the click position falls; or, in a case where the click position falls on a common border line of two merged rows or columns, an adjacent area between the two merged rows or columns is determined as the target position of the table element to be inserted.

[0178] In a possible implementation manner, the layout adjustment module 73 is specifically used to:

[0179] The cells in the table element that are located in the same row or the same column as the target cell are merged with the target cell.

[0180] In a possible implementation, the insertion module 72 includes:

[0181] A layout determining unit, used to determine the layout structure of the table elements;

[0182] An inserting unit is used to insert the table element at the target position according to the layout structure.

[0183] In a possible implementation manner, the layout determining unit is specifically configured to:

[0184] Determine the layout structure of the specified area in the table as the layout structure of the table element; or,

[0185] Layout structure information input by a user is acquired, and a layout structure of the table element is determined according to the layout structure information.

[0186] In a possible implementation manner, the layout determining unit is specifically configured to:

[0187] Determine the selected area in the table as the designated area, and determine the layout structure of the designated area as the layout structure of the table element; or,

[0188] A row area or a column area adjacent to the target position in the table is determined as a designated area, and a layout structure of the designated area is determined as a layout structure of the table element.

[0189] In a possible implementation, the device further includes:

[0190] The format inheritance module is used to apply the cell format of the designated area in the table to the table element when the layout structure of the designated area in the table is determined as the layout structure of the table element.

[0191] In a possible implementation, the insertion module 72 includes:

[0192] A copy creation unit, used for creating a copy of the table if it is determined that inserting the table element at the target position has an impact on other tables, wherein the table and the other tables are located in the same table workspace;

[0193] an inserting unit, configured to determine, in the copy, a target position of a table element to be inserted according to a click position corresponding to the click operation, and insert the table element at the target position;

[0194] The layout adjustment module 73 is specifically used for:

[0195] In the copy, adjusting the layout structure of the table element and the target cell in the table to obtain an adjusted copy;

[0196] The table is replaced in the table workspace with the adjusted copy.

[0197] In a possible implementation, the device further includes:

[0198] The adaptive adjustment module is used to adjust the positions of the other tables in the table workspace when it is determined that replacing the table with the adjusted copy will have an impact on other tables.

[0199] like Figure 8 As shown, an embodiment of the present application provides a device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0200] Memory 113, used for storing computer programs;

[0201] In one embodiment of the present application, the processor 111 is used to implement the table processing method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 113, including:

[0202] In response to a click operation at a specified position on a target cell in the table, triggering a row / column insert instruction;

[0203] In response to the row / column insertion instruction, determining a target position of a table element to be inserted according to a click position corresponding to the click operation, and inserting the table element at the target position, wherein the table element includes at least one row of cells or at least one column of cells;

[0204] The layout structure of the table element and the cell in the table is adjusted so that the table element has an attribution relationship with the target cell.

[0205] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the table processing method provided in any of the aforementioned method embodiments are implemented.

[0206] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0207] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0208] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0209] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A table processing method, characterized in that: The method comprises: In response to a click operation at a specified position on a target cell in the table, triggering a row / column insert instruction; In response to the row / column insertion instruction, determining a target position of a table element to be inserted according to a click position corresponding to the click operation, and inserting the table element at the target position, wherein the table element includes at least one row of cells or at least one column of cells; The layout structure of the table element and the target cell in the table is adjusted so that there is an ownership relationship between the table element and the target cell.

2. The method according to claim 1, characterized in that The triggering of the row / column insert instruction in response to a click operation at a designated position on a target cell in the table includes: In response to a click operation at any position on the border line of a target cell in the table, a row / column insert instruction is triggered; or, In response to a click operation at any position on the content filling area of ​​the target cell in the table, a row / column insertion instruction is triggered.

3. The method according to claim 1 or 2, characterized in that: The step of determining a target position of a table element to be inserted according to a click position corresponding to the click operation includes: An adjacent area of ​​the click position corresponding to the click operation is determined as a target position of the table element to be inserted, wherein the adjacent area includes at least one row or at least one column.

4. The method according to claim 3, characterized in that: The step of determining an adjacent area of ​​the click position corresponding to the click operation as a target position of the table element to be inserted includes: In a case where the click position corresponding to the click operation is located on a first border line of the target cell, an adjacent area of ​​the first border line is determined as a target position of the table element to be inserted, the first border line is a border line of the target cell extending in a first direction, the first direction is an arrangement direction of the target cell and its belonging area, an edge of the adjacent area extending in the first direction overlaps with the first border line, and the belonging area refers to a cell area that has an belonging relationship with the target cell; In a case where the click position corresponding to the click operation is located on the second border line of the target cell, an adjacent area in a specified direction of the merged row or column where the click position falls is determined as the target position of the table element to be inserted, the second border line is a border line of the target cell other than the first border line, the specified direction is a direction selected by the user, or a preset direction, and an edge of the adjacent area extending in the first direction overlaps with a border line of the merged row or column where the click position falls; or, in a case where the click position falls on a common border line of two merged rows or columns, an adjacent area between the two merged rows or columns is determined as the target position of the table element to be inserted.

5. The method according to claim 1, characterized in that The adjusting the layout structure of the table element and the target cell in the table includes: The cells in the table element that are located in the same row or the same column as the target cell are merged with the target cell.

6. The method according to claim 1, characterized in that The inserting the table element at the target position comprises: Determining the layout structure of the table elements; The table element is inserted at the target position according to the layout structure.

7. The method according to claim 6, characterized in that Determining the layout structure of the table elements includes: Determine the layout structure of the specified area in the table as the layout structure of the table element; or, Layout structure information input by a user is acquired, and a layout structure of the table element is determined according to the layout structure information.

8. The method according to claim 7, characterized in that The step of determining the layout structure of the designated area in the table as the layout structure of the table element includes: Determine the selected area in the table as the designated area, and determine the layout structure of the designated area as the layout structure of the table element; or, A row area or a column area adjacent to the target position in the table is determined as a designated area, and a layout structure of the designated area is determined as a layout structure of the table element.

9. The method according to claim 7, characterized in that: The method further comprises: When the layout structure of the designated area in the table is determined as the layout structure of the table element, the cell format of the designated area in the table is applied to the table element.

10. The method according to claim 1, characterized in that The step of determining a target position of a table element to be inserted according to a click position corresponding to the click operation, and inserting the table element at the target position, comprises: If it is determined that inserting the table element at the target position has an impact on other tables, creating a copy of the table, wherein the table and the other tables are located in the same table workspace; In the copy, determining a target position of the table element to be inserted according to the click position corresponding to the click operation, and inserting the table element at the target position; The adjusting the layout structure of the table element and the target cell in the table includes: In the copy, adjusting the layout structure of the table element and the target cell in the table to obtain an adjusted copy; The table is replaced in the table workspace with the adjusted copy.

11. The method according to claim 10, characterized in that The method further comprises: If it is determined that replacing the table with the adjusted copy will have an impact on other tables, positions of the other tables in the table workspace are adjusted.

12. A table processing device, characterized in that: The device comprises: An instruction triggering module, for triggering a row / column insert instruction in response to a click operation at a specified position on a target cell in the table; an inserting module, configured to respond to the row / column inserting instruction, determine a target position of a table element to be inserted according to a click position corresponding to the click operation, and insert the table element at the target position, wherein the table element includes at least one row of cells or at least one column of cells; The layout adjustment module is used to adjust the layout structure of the table element and the target cell in the table so that the table element and the target cell have an attribution relationship.

13. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a table processing program stored in the memory to implement the table processing method according to any one of claims 1 to 11.

14. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the table processing method according to any one of claims 1 to 11.