Table processing method and device, electronic equipment and storage medium
By folding and displaying the content of the merged cells and their target cell areas in the table, the problems of confusing table layout and missing content in the prior art are solved, and compact display and efficient data processing are achieved.
Patent Information
- Application Number
- CN202411249757.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-20
AI Technical Summary
When existing table processing software collapses merging cells in tables, it lacks comprehensive consideration of the impact on other parts of the folded table, resulting in confusion in layout and missing content.
By responding to the collapse operation of merging cells in the table, the merged cells and their corresponding target cell areas are collapsed, and the display content is determined based on the original content of the target cell area, and the scroll view mode is set to display the content of other cells. Implement compact display of tables and content summary.
Avoid confusion in the layout of the table after collapse, ensure content integrity and user experience, and improve data processing efficiency and readability.
Smart Images

Figure CN119167905A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a table processing method, device, electronic device and storage medium. Background Art
[0002] Table is a commonly used data structure, which is used to clearly display row and column data. In some cases, in order to improve the readability of the table or save display space, part of the content in the table needs to be folded.
[0003] However, existing table processing software often lacks comprehensive consideration of the impact on other parts of the folded table when folding merged cells in the table. Summary of the invention
[0004] The present application provides a table processing method, device, electronic device and storage medium to solve the technical problem in the prior art that when merging cells in a folded table, there is a lack of comprehensive consideration of the impact on other parts of the folded table, which easily leads to a chaotic layout and missing content of the folded table.
[0005] In a first aspect, the present application provides a table processing method, the method comprising:
[0006] In response to a folding operation on a merged cell in a table, the merged cell and its corresponding target cell region are folded to obtain a folded region, wherein the target cell region refers to a cell region that has an attribution relationship with the merged cell;
[0007] Determine display content according to original cell content of cells in the target cell area, and display the display content in the folded area.
[0008] In a possible implementation manner, determining the display content according to the original cell content of the cells in the target cell area includes:
[0009] Output the preset cell folding display strategy set;
[0010] Determine the cell folding display strategy selected from the cell folding display strategy set as the target cell folding display strategy;
[0011] According to the target cell folding display strategy, display content is determined according to original cell content of cells in the target cell area.
[0012] In a possible implementation manner, determining the display content according to the original cell content of the cells in the target cell area includes:
[0013] Determine a target cell from the target cell region;
[0014] The original cell content of the target cell is determined as the display content.
[0015] In a possible implementation manner, determining the target cell from the target cell region includes:
[0016] Determine cells in the target cell area that meet preset conditions as target cells;
[0017] Alternatively, a selected cell in the target cell area is determined as the target cell.
[0018] In a possible implementation, the method further includes:
[0019] Setting a scrolling viewing mode for the folded area;
[0020] In response to a scrolling view operation on the folded area, the original cell contents of other cells in the target cell area are determined as new display contents, and the new display contents are displayed in the folded area; the other cells refer to cells in the target cell area except the current cell, and the current cell refers to the cell corresponding to the current display content in the folded area.
[0021] In a possible implementation manner, determining the display content according to the original cell content of the cells in the target cell area includes:
[0022] Determine the target data processing function;
[0023] The original cell contents of the cells in the target cell area are processed according to the target data processing function, and the processing results are determined as display contents.
[0024] In a possible implementation, determining the target data processing function includes:
[0025] Determine a preset data processing function as a target data processing function;
[0026] Alternatively, a preset data processing function set is output, and a data processing function selected from the data processing function set is determined as a target data processing function;
[0027] Alternatively, the input data processing function is determined as the target data processing function.
[0028] In a possible implementation, the method further includes:
[0029] Setting a scrolling viewing mode for the folded area;
[0030] In response to a scrolling view operation on the folded area, the original cell contents of the cells in the target cell area are processed according to other data processing functions, the processing results are determined as new display contents, and the new display contents are displayed in the folded area; the other data processing functions refer to data processing functions in a preset data processing function set, except for the data processing functions applied to the current display content in the folded area.
[0031] In a possible implementation manner, determining the display content according to the original cell content of the cells in the target cell area includes:
[0032] The original cell contents of at least two cells in the target cell area are spliced, and the spliced contents are determined as display contents.
[0033] In a possible implementation, the step of splicing original cell contents of at least two cells in the target cell region includes:
[0034] splicing original cell contents of at least two cells in the target cell area according to a preset order;
[0035] Alternatively, the original cell contents of at least two cells in the target cell area are concatenated in an order specified by the user.
[0036] In a possible implementation manner, determining the display content according to the original cell content of the cells in the target cell area includes:
[0037] Inputting the original cell content of the cells in the target cell area into the trained content generation model to obtain the generated content of the content generation model;
[0038] The generated content is determined as display content.
[0039] In a possible implementation, displaying the display content in the folded area includes:
[0040] Determine the target display format;
[0041] The display content is displayed in the folded area according to the target display format.
[0042] In a possible implementation manner, folding the merged cell and its corresponding target cell region includes:
[0043] Rendering a table view of the table;
[0044] In the table view, the merged cell and its corresponding target cell area are collapsed.
[0045] In a possible implementation, the method further includes:
[0046] In response to an expansion operation on the folded area, the folded area is restored to the original layout of the merged cell and its corresponding target cell area, and the corresponding original cell content is displayed in the restored cell.
[0047] In a second aspect, the present application provides a table processing device, the device comprising:
[0048] A cell folding module, configured to, in response to a folding operation on a merged cell in a table, fold the merged cell and its corresponding target cell region to obtain a folded region, wherein the target cell region refers to a cell region that has an attribution relationship with the merged cell;
[0049] The content display module is used to determine the display content according to the original cell content of the cells in the target cell area, and display the display content in the folded area.
[0050] In a possible implementation, the content display module includes:
[0051] A strategy output unit, used for outputting a preset cell folding display strategy set;
[0052] A strategy selection unit, used to determine the cell folding display strategy selected from the cell folding display strategy set as a target cell folding display strategy;
[0053] The strategy display unit is used to determine the display content according to the target cell folding display strategy and the original cell content of the cells in the target cell area.
[0054] In a possible implementation, the content display module includes:
[0055] A target cell determining unit, used for determining a target cell from the target cell area;
[0056] The content determination unit is used to determine the original cell content of the target cell as the display content.
[0057] In a possible implementation manner, the target cell determination unit is specifically used to:
[0058] Determine cells in the target cell area that meet preset conditions as target cells;
[0059] Alternatively, a selected cell in the target cell area is determined as the target cell.
[0060] In a possible implementation, the device further includes:
[0061] A first scrolling viewing module, used to set a scrolling viewing mode for the folded area;
[0062] In response to a scrolling view operation on the folded area, the original cell contents of other cells in the target cell area are determined as new display contents, and the new display contents are displayed in the folded area; the other cells refer to cells in the target cell area except the current cell, and the current cell refers to the cell corresponding to the current display content in the folded area.
[0063] In a possible implementation, the content display module includes:
[0064] A function determination unit, used for determining a target data processing function;
[0065] The content processing unit is used to process the original cell content of the cells in the target cell area according to the target data processing function, and determine the processing results as display content.
[0066] In a possible implementation manner, the function determination unit is specifically configured to:
[0067] Determine a preset data processing function as a target data processing function;
[0068] Alternatively, a preset data processing function set is output, and a data processing function selected from the data processing function set is determined as a target data processing function;
[0069] Alternatively, the input data processing function is determined as the target data processing function.
[0070] In a possible implementation, the device further includes:
[0071] A second scrolling viewing module, used to set a scrolling viewing mode for the folded area;
[0072] In response to a scrolling view operation on the folded area, the original cell contents of the cells in the target cell area are processed according to other data processing functions, the processing results are determined as new display contents, and the new display contents are displayed in the folded area; the other data processing functions refer to data processing functions in a preset data processing function set, except for the data processing functions applied to the current display content in the folded area.
[0073] In a possible implementation, the content display module includes:
[0074] The content splicing unit is used to splice the original cell contents of at least two cells in the target cell area and determine the spliced content as the display content.
[0075] In a possible implementation manner, the content splicing unit is specifically used to:
[0076] splicing original cell contents of at least two cells in the target cell area according to a preset order;
[0077] Alternatively, the original cell contents of at least two cells in the target cell area are concatenated in an order specified by the user.
[0078] In a possible implementation manner, the content display module is specifically used to:
[0079] Inputting the original cell content of the cells in the target cell area into the trained content generation model to obtain the generated content of the content generation model;
[0080] The generated content is determined as display content.
[0081] In a possible implementation, the content display module includes:
[0082] a format determination unit, used for determining a target display format;
[0083] A format display unit is configured to display the display content in the folded area according to the target display format.
[0084] In a possible implementation, the cell folding module comprises:
[0085] A view rendering unit, used for rendering to obtain a table view of the table;
[0086] The view processing unit is used to collapse the merged cell and its corresponding target cell area in the table view.
[0087] In a possible implementation, the device further includes:
[0088] The restoring module is used to restore the folded area to the original layout of the merged cell and its corresponding target cell area in response to the expansion operation on the folded area, and display the corresponding original cell content in the restored cell.
[0089] 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.
[0090] 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.
[0091] The above-mentioned technical scheme 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, by responding to the folding operation of the merged cells in the table, folds the merged cells and their corresponding target cell areas to obtain the folded area, which can achieve compact display of the table while avoiding affecting the layout of other parts of the table, so that the user can more clearly focus on the part of the table data they want to pay attention to and reduce the interference of other information; by determining the display content according to the original cell content of the cells in the target cell area, and displaying the display content in the folded area, the original cell content in the folded area can be summarized and displayed or quickly browsed, thereby improving the efficiency of data processing and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] 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.
[0093] 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.
[0094] 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.
[0095] Figure 1 A flowchart of an embodiment of a table processing method provided in an embodiment of the present application;
[0096] Figure 2 A schematic diagram of a table layout containing merged cells;
[0097] Figure 3 For Figure 2A schematic diagram showing the display effect of the folded area obtained when the merged cells in the table trigger the folding operation;
[0098] Figure 4 A flowchart of another table processing method provided in an embodiment of the present application;
[0099] Figure 5 A flowchart of another table processing method provided in an embodiment of the present application;
[0100] Figure 6 A flowchart of another table processing method provided in an embodiment of the present application;
[0101] Figure 7 A flowchart of another table processing method provided in an embodiment of the present application;
[0102] Figure 8 A flowchart of another table processing method provided in an embodiment of the present application;
[0103] Fig. 9 Another schematic diagram of a table layout containing merged cells;
[0104] Fig.10 For Fig. 9 A schematic diagram of the display effect of the folded area obtained when the merged cell 1 in the table triggers the folding operation;
[0105] Fig.11 For Fig. 9 Another schematic diagram of the display effect of the folded area obtained by the merged cell 1 in the table triggering the folding operation;
[0106] Fig.12 For Fig. 9 A schematic diagram showing the display effect of the folded area obtained when the merged cell 2 in the table triggers a folding operation;
[0107] Fig.13 Examples of two different folding effects obtained by folding merged cells and their corresponding target cell areas in a table;
[0108] Fig.14 A block diagram of an embodiment of a table processing device provided in an embodiment of the present application;
[0109] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0110] 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.
[0111] 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.
[0112] In order to solve the technical problem in the prior art that when merging cells in a table is folded, there is a lack of comprehensive consideration of the impact on other parts of the folded table, which easily leads to chaotic layout, missing content and other phenomena after the folded table, the present application provides a table processing method, device, electronic device and storage medium, which can fold merged cells and their corresponding target cell areas, thereby achieving a compact display of the table while avoiding affecting the layout of other parts of the table, and achieving a summary display or quick browsing of the original cell contents in the folded area, thereby improving data processing efficiency and user experience.
[0113] Figure 1 A flowchart of an embodiment of a table processing method provided in an embodiment of the present application.
[0114] like Figure 1 As shown, the process includes the following steps:
[0115] Step 101: In response to a folding operation on a merged cell in a table, the merged cell and its corresponding target cell area are folded to obtain a folded area, where the target cell area refers to a cell area that has an ownership relationship with the merged cell.
[0116] Step 102: Determine display content according to original cell content of cells in the target cell area, and display the display content in the folded area.
[0117] For ease of understanding, step 101 and step 102 are described in a unified manner as follows:
[0118] 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.
[0119] 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.
[0120] A merged cell is a cell formed by merging at least two consecutive independent cells in a table, wherein the at least two consecutive cells may include cells in two or more adjacent rows and / or cells in two or more adjacent columns.
[0121] The target cell area corresponding to the merged cell refers to the cell area that has an affiliation relationship with the merged cell. The above-mentioned affiliation relationship is reflected in the table layout as follows: the merged cell and its corresponding target cell area are adjacent in the table layout, which can be horizontally adjacent or vertically adjacent, and the number of rows (or columns) merged by the merged cell is the same as the number of rows (or columns) contained in its corresponding target cell area. In terms of content, it is reflected as follows: there is a certain association relationship between the content in the merged cell and the content in its corresponding target cell area. The association relationship can be a superior-subordinate, superior-subordinate, or inclusion relationship. For example, the merged cell contains a summary title or overview, and the target cell area contains detailed information related to the title or overview. For another example, the merged cell contains a field name, and the target cell area contains the various field values of the field.
[0122] See also Figure 2 , which is a schematic diagram of a table layout containing merged cells. Figure 2The table shown contains merged cell 2. According to the above description, for merged cell 2, its corresponding target cell area refers to the area composed of cells 3, 4, 5, and 6 (hereinafter referred to as area 1 for the convenience of description). It can be seen that the number of rows contained in area 1 is the same as the number of rows merged by merged cell 2, which is 2 rows.
[0123] In one embodiment, a merged cell is determined; a side of a border formed by the merged cell is determined as a first target side; an adjacent cell to the first target side is determined, wherein the adjacent cell refers to: if a side of a border formed by a cell overlaps with the first target side, the cell is determined to be an adjacent cell to the first target side; the side length of the first target side is determined as a first side length, wherein the side length refers to the number of rows or columns contained in a side of the cell; the sum of the side lengths of the sides overlapping with the target side of all adjacent cells is determined to be a second side length; when the first side length is equal to the second side length, the area enclosed by the adjacent cells is determined to be a target cell area that has an affiliation relationship with the merged cell, wherein the affiliation relationship is that the area enclosed by the adjacent cells is a subordinate area of the merged cell, and the merged cell is a superordinate area of the area enclosed by the adjacent cells.
[0124] In one embodiment, the first target side of the merged cell is a side of the merged cell having a side length of at least two rows or at least two columns.
[0125] In another embodiment, a merged cell is determined; a side of a border formed by the merged cell is determined as a second target side; an adjacent cell to the second target side is determined, wherein the adjacent cell refers to: if a side of a border formed by a cell overlaps with the second target side, the cell is determined to be an adjacent cell to the second target side; the side length of a side overlapping with the second target edge of the adjacent cell is determined as a third side length, and the side length of the second target edge is determined as a fourth side length, and when the third side length is greater than or equal to the fourth side length, the area enclosed by the adjacent cells is determined to be a target cell area having an affiliation relationship with the merged cell, wherein the affiliation relationship is that the area enclosed by the adjacent cells is a superior area to the merged cell, and the merged cell is a subordinate area to the area enclosed by the adjacent cells.
[0126] In one embodiment, when the merged cell is folded along the first direction, the edge of the merged cell extending along the first direction is used as the first target edge or the second target edge; or, when the merged cell is folded along the first direction, the target cell area is determined in at least one cell adjacent to the merged cell in the second direction, wherein, when the first direction is the direction of the rows in the table, the second direction is the direction of the columns in the table; when the second direction is the direction of the rows in the table, the first direction is the direction of the columns in the table. For example, the horizontal direction of the table is the direction of the rows in the table, and the vertical direction of the table is the direction of the columns in the table.
[0127] Collapsing merged cells in a table means collapsing some of the rows or columns contained in the merged cells, or hiding some of the rows or columns contained in the merged cells. When folding merged cells in a table along the row direction, some of the rows contained in the merged cells are folded; when folding merged cells in a table along the column direction, some of the columns contained in the merged cells are folded. For example, Figure 2 In the example, the first or second row of merged cell 2 is hidden so that merged cell 2 is displayed as only one row. In practical applications, the display area of merged cells can be reduced by collapsing merged cells to hide the area adjacent to the merged cells or the data that does not need to be viewed in the area enclosed by the merged cells, so as to better view and manage other parts of the table.
[0128] As an optional implementation method, when the user wants to collapse the merged cell in the table, the user can move the mouse cursor to the merged cell, and then a collapse icon, such as a collapse icon represented by a minus sign, will be displayed in the upper right corner of the merged cell (it can also be other positions, which is just an exemplary description here). After that, the user clicks the collapse icon to trigger the collapse operation of the merged cell.
[0129] As another optional implementation, when the user wants to collapse the merged cells in the table, the user can trigger a shrink operation for the row or column that he wants to hide, and hide the row or column by shrinking the row height to 0 or the column width to 0. For example, shrink the second row in merged cell 2 to shrink merged cell 2 itself, and shrink the sub-area corresponding to the second row in the target cell area of merged cell 2 (such as the area corresponding to cell 5 and cell 6). When the row height of the row is reduced to zero, the display area of the second row is hidden.
[0130] pass Figure 2As can be seen from the example and the above description of the merged cell and its corresponding target cell area, due to the association between the merged cell and its corresponding target cell area in the table layout, when the merged cell is folded, the merged cell and its corresponding target cell area are also folded synchronously, so as to avoid affecting the layout of other parts in the table. Therefore, in step 101, in response to the folding operation of the merged cell in the table, the merged cell and its corresponding target cell area are folded together to obtain the folded area.
[0131] See also Figure 3 , for Figure 2 The schematic diagram of the display effect of the folded area obtained by the merged cells in the table shown above triggering the folding operation. Figure 2 and Figure 3 It can be seen that merged cell 2 is collapsed into one cell, that is, an area of one row and one column, cell 3 and cell 5 are collapsed into one cell, and cell 4 and cell 6 are collapsed into one cell.
[0132] In one embodiment, when the target cell area includes multiple columns (or multiple rows), each column (or row) is folded as an independent area. Figure 2 and Figure 3 In the example, cells 3 and 5 in column 3, and cells 4 and 6 in column 4 are collapsed as two independent areas.
[0133] Furthermore, after the merged cell and its corresponding target cell area are collapsed, the problem of displaying the content in the collapsed area will be involved. In this regard, the embodiment of the present application proposes the following technical solutions:
[0134] First, for merged cells, since the original cell contents are a whole, the original cell contents of the merged cells can continue to be displayed after the merged cells are folded. Of course, in actual applications, there may be other display methods. For example, if the original cell contents in the merged cells are not fully displayed due to the reduction of the display area of the merged cells, the original cell contents in the merged cells can be summarized and displayed in the folded merged cells. What we are more concerned about here is the display content of the target cell area corresponding to the merged cells after folding. Therefore, the folded area mentioned here usually includes the area in the form of the target cell area corresponding to the merged cells after folding, for example Figure 3 The folded area 1 is shown in the example.
[0135] It can be seen from the description of step 102 that the display content of the folded area is determined according to the original cell content of the cells in the target cell area.
[0136] The technical solution provided by the embodiment of the present application, by responding to the folding operation of the merged cells in the table, folding the merged cells and their corresponding target cell areas to obtain the folded area, can achieve compact display of the table while avoiding affecting the layout of other parts of the table, so that the user can more clearly focus on the part of the table data that they want to pay attention to and reduce the interference of other information; by determining the display content according to the original cell content of the cells in the target cell area, and displaying the display content in the folded area, the original cell content in the folded area can be summarized and displayed or quickly browsed, thereby improving the efficiency of data processing and user experience.
[0137] The following shows different embodiments to exemplify the specific implementation of determining the display content of the collapsed area according to the original cell content of the cells in the target cell area:
[0138] Figure 4 A flowchart of another table processing method provided in an embodiment of the present application. Figure 4 The process shown in Figure 1 Based on the process shown, the following steps are included:
[0139] Step 401: In response to a folding operation on a merged cell in a table, the merged cell and its corresponding target cell area are folded to obtain a folded area, where the target cell area refers to a cell area that has an ownership relationship with the merged cell.
[0140] The detailed description of step 401 can be found in Figure 1 The relevant descriptions in the process shown will not be repeated here.
[0141] Step 402: determine a target cell from the target cell area, and determine the original cell content of the target cell as the display content.
[0142] It can be seen from the description of step 402 that after the target cell area is folded, only the original cell content of a cell in the target cell area can be retained. Figure 3 In the example, the original cell content of cell 3 or cell 5 is retained in the column 3 area corresponding to merged cell 2, and the original cell content of cell 4 or cell 6 is retained in the column 4 area corresponding to merged cell 2.
[0143] As an optional implementation, the specific implementation of determining the target cell from the target cell region includes: determining the cell in the target cell region that meets the preset condition as the target cell. That is, after the target cell region is folded, the original cell content of the cell in the target cell region that meets the preset condition is retained.
[0144] Optionally, the above preset condition is used to indicate the cell position. For example, the preset condition is: the first row (or the first column). That is, the cell located in the first row of the target cell area is determined as the target cell, so that after the target cell area is folded, the cell located in the first row of the target cell area is retained. For example, Figure 3 In the example, the original cell content of cell 3 is retained in the column 3 area corresponding to merged cell 2, and the original cell content of independent cell 4 is retained in the column 4 area corresponding to merged cell 2.
[0145] Optionally, the above preset conditions are used to indicate the conditions that the original cell content should meet. For example, the preset condition is: the maximum content length. That is, the cell with the largest original cell content length in the target cell area is determined as the target cell, so that after the target cell area is folded, the original cell content in the target cell is retained. For another example, the preset condition is: the content appears the most times. That is, the cell with the most original cell content in the target cell area in the table is determined as the target cell, so that after the target cell area is folded, the original cell content in the target cell is retained. For another example, the preset condition is: the largest number of occupied rows and columns. That is, the cell with the largest number of rows and columns occupied by the original cell in the target cell area is determined as the target cell, so that after the target cell area is folded, the original cell content in the target cell is retained. In practical applications, the maximum length of the content and the largest number of content occurrences usually mean that the content is more important. Therefore, by retaining the original cell content with the largest content length and the largest number of content occurrences, it is usually possible to retain more important content, which is convenient for users to better understand the table content.
[0146] As another optional implementation, the specific implementation of determining the target cell from the target cell area includes: determining the selected cell in the target cell area as the target cell.
[0147] That is to say, in the technical solution provided by the embodiment of the present application, the user is allowed to select cells whose original cell contents need to be retained from the target cell area. For example, when the folding operation is about to be performed, a dialog box pops up to ask the user which cell, row or column the user wants to retain the original cell contents in, and the user can select the target cell in the dialog box or in a table in a selected manner. After the target cell area is folded, the original cell contents in the cell selected by the user are retained. This method can flexibly meet user needs.
[0148] Furthermore, in one embodiment, a scrolling view mode may be set for the folded area. Based on this, in response to a scrolling view operation on the folded area, the original cell contents of other cells in the target cell area are determined as new display contents, and the new display contents are displayed in the folded area. Here, other cells refer to cells other than the current cell in the target cell area, and the current cell refers to a cell corresponding to the current display contents in the folded area.
[0149] For example, Figure 3 The current display content of the collapsed area in the example is the original cell content of cell 3, that is, the current cell is cell 3. In response to the scroll view operation on the collapsed area, the original cell content of cell 5 is displayed in the collapsed area. Afterwards, in response to the scroll view operation on the collapsed area, the original cell content of cell 3 is displayed in the collapsed area again.
[0150] It can be seen from the above description that the technical solution of the embodiment of the present application allows that after the target cell area is folded, all the original cell contents folded in the target cell area can still be scrolled in the folded area. This processing allows the user to quickly browse the hidden information without expanding the entire area, ensuring the integrity and accessibility of the data.
[0151] In a specific implementation, the scroll view mode may be set for the folded area by setting a scroll bar or a content switching control (such as an up and down control or a Spinbox control) in the folded area.
[0152] Figure 5 A flowchart of another embodiment of a table processing method provided in an embodiment of the present application. Figure 5 The process shown in Figure 1 Based on the process shown, the following steps are included:
[0153] Step 501: In response to a folding operation on a merged cell in a table, the merged cell and its corresponding target cell area are folded to obtain a folded area, where the target cell area refers to a cell area that has an ownership relationship with the merged cell.
[0154] The detailed description of step 501 can be found in Figure 1 The relevant descriptions in the process shown will not be repeated here.
[0155] Step 502: determine the target data processing function, process the original cell contents of the cells in the target cell area according to the target data processing function, determine the processing results as display contents, and display the display contents in the folded area.
[0156] It can be seen from the description of step 502 that after the target cell area is folded, the original cell contents of the cells in the target cell area can be processed according to the target data processing function, and the processing results are displayed in the folded area. This provides an effective method for improving the flexibility and practicality of data display.
[0157] Optionally, the target data processing function is one of the following data processing functions: a data processing function for finding the sum, a data processing function for finding the average, a data processing function for finding the maximum value, a data processing function for finding the minimum value, a trigonometric function, a data processing function for finding the data range, a data processing function for calculating true and false values according to a logical formula, and the like.
[0158] As an optional implementation, the specific implementation of determining the target data processing function includes: determining a preset data processing function as the target data processing function. The preset data processing function may be any of the above data processing functions.
[0159] As another optional implementation, the specific implementation of determining the target data processing function includes: outputting a preset data processing function set, and determining a data processing function selected from the data processing function set as the target data processing function. The preset data processing function set includes but is not limited to the data processing functions described above.
[0160] That is to say, in the technical solution provided by the embodiment of the present application, the user is allowed to select the data processing function to be applied to the target cell area from the preset data processing function set. For example, when the folding operation is about to be executed, a dialog box pops up to display the preset data processing function set and ask the user which data processing function in the data processing function set he wants to apply to the target cell area. The user can select the target data processing function in the dialog box in a selected manner. After the target cell area is folded, the original cell content in the target cell area is processed according to the target data processing function, and the processing result is determined as the display content.
[0161] As another optional implementation, the specific implementation of determining the target data processing function includes: determining the input data processing function as the target data processing function.
[0162] That is to say, the technical solution provided in the embodiment of the present application also allows the user to customize the target data processing function. For example, a custom icon is also displayed in the above dialog box, and when the user wants to customize the target data processing function, the custom icon is triggered. Further, an input box pops up for the user to enter the data processing function in the input box. This method can meet user needs more flexibly.
[0163] Further, in one embodiment, similar to allowing all original cell contents folded in the target cell area to be scrolled and viewed in the folded area after the target cell area is folded, a method for allowing switching of the target data processing function is provided. Specifically, a scrolling viewing mode is set for the folded area. Based on this, in response to the scrolling viewing operation on the folded area, the original cell contents of the cells in the target cell area are processed according to other data processing functions, the processing results are determined as new display contents, and the new display contents are displayed in the folded area. Other data processing functions refer to data processing functions in a preset data processing function set, except for the data processing functions applied to the current display contents in the folded area.
[0164] For example, Figure 3The current display content of the folded area of the example is the average value of the original cell content in cell 3 and cell 5, that is, the data processing function applied to the current display content of the folded area is the data processing function for finding the average value. In response to the scrolling operation on the folded area, the original cell content in cell 3 and cell 5 is processed according to the data processing function for finding the maximum value, and the maximum value of the original cell content in cell 3 and cell 5 is displayed in the folded area. After that, in response to the scrolling operation on the folded area, the original cell content in cell 3 and cell 5 is processed according to the data processing function for finding the minimum value, and the minimum value of the original cell content in cell 3 and cell 5 is displayed in the folded area. And so on, which will not be repeated here.
[0165] From the above description, it can be seen that the technical solution of the embodiment of the present application allows that after the target cell area is folded, the processing results of all original cell contents in the target cell area according to different data processing functions can be quickly browsed, thereby quickly meeting the user's complex data processing needs and improving the user experience.
[0166] Similar to the above, in a specific implementation, the scroll view mode can be set for the folded area by setting a scroll bar or a content switching control (such as an up and down control, a spinbox control) in the folded area. Here, the data processing function supported by the scroll view mode has been pre-set.
[0167] Figure 6 A flowchart of another table processing method provided in an embodiment of the present application. Figure 6 The process shown in Figure 1 Based on the process shown, the following steps are included:
[0168] Step 601: In response to a folding operation on a merged cell in a table, the merged cell and its corresponding target cell area are folded to obtain a folded area, where the target cell area refers to a cell area that has an ownership relationship with the merged cell.
[0169] The detailed description of step 601 can be found in Figure 1 The relevant descriptions in the process shown will not be repeated here.
[0170] Step 602: splice original cell contents of at least two cells in the target cell area, determine the spliced contents as display contents, and display the display contents in the folded area.
[0171] It can be seen from the description of step 602 that after the target cell area is folded, all original cell contents in the target cell area can be displayed in the folded area by splicing and integrating the contents, which provides an effective method for improving the integrity of data display.
[0172] As an optional implementation, the specific implementation of splicing the original cell contents of at least two cells in the target cell area includes: splicing the original cell contents of at least two cells in the target cell area in a preset order. The preset order is, for example, from top to bottom or from left to right. Figure 3 In the example, the displayed content in the column 3 area corresponding to the merged cell 2 is "cell 3|cell 5", and the displayed content in the column 4 area corresponding to the merged cell 2 is "cell 4|cell 6".
[0173] As another optional implementation, the specific implementation of splicing the original cell contents of at least two cells in the target cell area includes: splicing the original cell contents of at least two cells in the target cell area in the order specified by the user. Figure 3 In the example, the order specified by the user is from bottom to top, so the display content in the column 3 area corresponding to the merged cell 2 is "Cell 5|Cell 3", and the display content in the column 4 area corresponding to the merged cell 2 is "Cell 6|Cell 4".
[0174] That is to say, in the technical solution provided in the embodiment of the present application, the user is allowed to customize the splicing order of the original cell contents in the target cell area according to actual needs. For example, when the folding operation is about to be performed, a dialog box pops up to ask the user in what order he wants to splice the original cell contents in the target cell area. The user can define the above splicing order by inputting or dragging the corresponding icon of the cell in the dialog box.
[0175] Figure 7 A flowchart of another table processing method provided in an embodiment of the present application. Figure 7 The process shown in Figure 1 Based on the process shown, the following steps are included:
[0176] Step 701: In response to a folding operation on a merged cell in a table, the merged cell and its corresponding target cell area are folded to obtain a folded area, where the target cell area refers to a cell area that has an ownership relationship with the merged cell.
[0177] The detailed description of step 701 can be found in Figure 1 The relevant descriptions in the process shown will not be repeated here.
[0178] Step 702: input the original cell content of the cells in the target cell area into the trained content generation model to obtain the generated content of the content generation model, determine the generated content as the display content, and display the display content in the folded area.
[0179] Optionally, the generated content is a summary of all original cell contents in the target cell area. By using the summary of the original cell contents as the display content of the folded area, readers can grasp key information more quickly and improve reading efficiency.
[0180] Figure 8 A flowchart of another table processing method provided in an embodiment of the present application. Figure 8 The process shown in Figure 1 Based on the process shown, the following steps are included:
[0181] Step 801: In response to a folding operation on a merged cell in a table, the merged cell and its corresponding target cell area are folded to obtain a folded area, where the target cell area refers to a cell area that has an ownership relationship with the merged cell.
[0182] The detailed description of step 801 can be found in Figure 1 The relevant descriptions in the process shown will not be repeated here.
[0183] Step 802: output a preset cell folding display strategy set, and determine the selected cell folding display strategy in the cell folding display strategy set as the target cell folding display strategy.
[0184] Step 803: According to the target cell folding display strategy, determine the display content of the folded area according to the original cell content of the cells in the target cell area, and display the display content in the folded area.
[0185] Specifically, in this embodiment, a cell folding display strategy set is defined, and the cell folding display strategy set includes a series of cell folding display strategies. These strategies can determine how to fold the original cell content in the target cell area based on different methods. For example, the cell folding display strategy set includes but is not limited to the following strategies: displaying a content summary, retaining the original cell content of a cell, retaining all the original cell content in a splicing and integration manner, retaining the content after the original cell content is processed according to a specified data processing function, and so on. As for the specific operation methods corresponding to these strategies, please refer to the description in the above embodiment, and will not be repeated here one by one.
[0186] In addition, new cell folding display strategies can be adjusted or added based on user feedback and actual needs.
[0187] The above embodiment allows the user to flexibly select the cell folding display strategy, so as to flexibly meet various needs of the user and help improve the user experience.
[0188] Furthermore, in the post-folding region, e.g. Figure 3 In the folded area 1 of the example, no content may be displayed, or a specific symbol / icon (such as *) may be displayed to indicate that there is content there. Then, in response to the user's triggering operation on the folded area, the displayed content therein may be expanded. This embodiment of the application is not limited to this.
[0189] In addition, based on any of the above embodiments, when displaying the content in the folded area, a target display format may be determined, and the content may be displayed in the folded area according to the target display format. Here, the display format includes but is not limited to: font, font size, color, background color, etc.
[0190] As an optional implementation method, the display format applied to the original cell content in the target cell area is determined as the target display format. This processing method can maintain the consistency of the content display format before and after the cell is folded.
[0191] As another optional implementation, the target display format is different from the display format applied to the original cell content in the target cell area. For example, the target display format is a display format customized by the user. This processing method can mark the folded display content in the table by the display format, meeting the user's need to quickly determine the folded display content.
[0192] Combination of the above Figure 2 and Figure 3 The example of the technical solution provided by the embodiment of the present application is explained. However, in actual applications, there are other more complex table layouts. In some complex table layouts, folding and merging cells not only involves synchronously folding the target cell area described in the above embodiment, but may also involve synchronously folding other cell areas. In this regard, the following supplementary explanation is made:
[0193] See also Fig. 9 , which is another diagram of a table layout with merged cells. Fig. 9The table shown contains merged cell 1 and merged cell 2. According to the above description, for merged cell 1, its corresponding target cell area refers to merged cell 2, and the area consisting of cell 3, cell 4, cell 5, cell 6, cell 7, cell 8 and cell 9 (hereinafter referred to as area 2 for the convenience of description). It can be seen that the number of rows contained in area 2 is the same as the number of rows merged by merged cell 1, both of which are 3 rows. For merged cell 2, its corresponding target cell area includes area 1, that is, the area consisting of cell 3, cell 4, cell 5 and cell 6.
[0194] For the merged cell 1, when the merged cell 1 and its corresponding target cell area are folded and the display content of the folded area is determined, the technical solution provided by any of the above embodiments may be adopted.
[0195] It should be noted that when retaining the original cell content of a cell, if the original cell content of a merged cell in the target cell area is retained, the subordinate cell areas of the merged cell can be retained simultaneously. For example, see Fig.10 In the example, while retaining the merged cell 2, the subordinate cell area of the merged cell 2 is also retained: the area composed of cells 3 to 6. It can be seen that the collapsed area does not have only one row or one column.
[0196] In the case of retaining independent cells or using other methods, fold the merged cell 1 and its corresponding target cell area to obtain the display effect of the folded area. Fig.11 .
[0197] pass Fig.10 and Fig.11 It can be seen that when the target cell area corresponding to the merged cell area includes the merged cell, different layout effects will be presented depending on the collapsed cells. Fig.11 The method for determining the displayed content in the folded area 2 can be found in the description of the above embodiment and will not be repeated here.
[0198] Continue to see Fig. 9, for merged cell 2, the area that has an affiliation relationship with it includes not only area 2, but also the area formed by merged cell 1 (hereinafter referred to as area 3 for the convenience of description). The difference between area 2 and area 3 is that area 2 is the subordinate cell area of merged cell 2, and area 3 is the parent cell area of merged cell 2. In other words, area 2 belongs to merged cell 2, and merged cell 2 belongs to area 3. The parent / child relationship mentioned here is usually determined by the hierarchical relationship of the content. In the table layout, it is usually reflected as follows: the subordinate cell area of the merged cell is located on the right or below the merged cell, and the parent cell area of the merged cell is located on the left or above the merged cell. This is determined by the user's visual and table layout habits.
[0199] pass Fig. 9 As can be seen from the example, when the merged cell to be folded has a parent cell area, since the merged cell and its corresponding parent cell area are also associated in the table layout, when the merged cell is folded, the parent cell area of the merged cell is also folded synchronously to avoid affecting the layout of other parts of the table.
[0200] Based on this, in the technical solution of the embodiment of the present application, the target cell area corresponding to the merged cell is defined to include the subordinate cell area and the superior cell area (if any) of the merged cell. In addition, the number of rows (or columns) contained in the superior cell area of the merged cell is greater than or equal to the number of rows (or columns) merged by the merged cell, which can be regarded as the superior cell area of the merged cell can cover the merged cell in the row direction (or column direction).
[0201] See also Fig.12 , for Fig. 9 The schematic diagram of the display effect of the folded area obtained by the merged cell 2 in the table triggering the folding operation. Fig.12 As shown, the target cell area corresponding to the collapsed merged cell 2 includes the subordinate cell area (area 2) and the superior cell area (area 3) of the collapsed merged cell 2. In other words, the target cell area corresponding to the collapsed merged cell 2 can obtain two collapsed areas. Fig.12 In the example, for the convenience of description, the two folded areas are respectively recorded as folded area 3 and folded area 4.
[0202] The method for determining the displayed content in the folded area 3 is the same as Figure 3 The example shows a method of determining the content displayed in the folded area 1.
[0203] In one embodiment, when the parent cell area is folded synchronously, the original content in the parent cell area can be retained. Fig.12 In the folded area 4, since its original cell is a merged cell, the original cell content therein is originally a whole, so the original cell content of the merged cell can continue to be displayed after folding. Of course, in actual applications, there may be other display methods. For example, if the original cell content in the merged cell is not fully displayed due to the reduction of the display area of the merged cell, the original cell content in the merged cell can be extracted for summary, and the summary content is displayed in the folded merged cell. The embodiments of the present application are not limited to this.
[0204] Here we need to add one more point. Fig. 9 In the complex table layout form shown in the example, when the function is used to determine the display content of the folded area, that is, applying Figure 5 In the case of the illustrated embodiment process, it also involves determining the scope of action of the target data processing function in the target cell area according to the actual table layout form, so as to process the original cell contents of the cells within the scope.
[0205] In one embodiment, when the merged cells are retained in the folded area, the subordinate cell area of the merged cells is determined as the scope of action of the target data processing function, and the original cell contents of the cells within the scope are processed according to the target data processing function.
[0206] Wherein, when the target cell area is folded along the third direction, the original cell contents of the cells in each sub-area in the third direction within the scope of action are processed one by one according to the target data processing function. The third direction is the direction of the rows in the table, such as the horizontal direction of the table is the direction of the rows in the table; or the third direction is the direction of the columns in the table, such as the vertical direction of the table is the direction of the columns in the table.
[0207] In one embodiment, when the merged cells are folded in the row direction, a target data processing function may be set for each column belonging to the merged cells, wherein each column has the same or different target data processing functions.
[0208] In one embodiment, when the merged cells are folded in the column direction, a target data processing function may be set for each row belonging to the merged cells, wherein each row may be the same or different target data processing function.
[0209] For example, see Fig.10 Example, merged cells are retained in the collapsed area 2, or see Fig.11In the example, when the original cell content in merged cell 2 is displayed in column 2 of area 2 after folding, the subordinate cell area of merged cell 2, that is, the area formed by cell 3, cell 4, cell 5 and cell 6, is determined as the scope of the target data processing function, so that only the original cell content in cell 3, cell 4, cell 5 and cell 6 is processed according to the target data processing function, and the original cell content in cell 8 and cell 9 is not involved in processing.
[0210] In a specific example, Fig.10 For Fig. 9 The schematic diagram of the result obtained by folding the merged cell 1 in the row direction is as follows Fig.10 As shown in the figure, after folding the merged cell 1 in the row direction, Fig.10 As shown, it is set that all columns in the subordinate area (column 2, column 3 and column 4) of merged cell 1 keep the original cell contents.
[0211] In another specific example, Fig.10 On the basis of , set the target data processing function corresponding to column 3 to the sum function, and the target data processing function corresponding to column 4 to the maximum function. After application, in the case of merged cell 2 displayed in column 2, column 3 displays the sum result of cell 3 and cell 5, and column 4 displays the maximum result of cell 4 and cell 6. Similarly, in the case of cell 7 displayed in column 2, since cell 7 is not a merged cell, column 3 displays the sum result of a value in cell 8, and column 4 displays the maximum result of a value in cell 9.
[0212] Fig.10 The folding direction of the example is the direction of the columns in the table, and the sub-areas in each third direction within the scope of the target data processing function include: the area formed by cell 3 and cell 5, and the area formed by cell 4 and cell 6. That is to say, the original cell contents in cell 3 and cell 5 are processed according to the target data processing function to obtain the display content of column 3 in the folded area, and the original cell contents in cell 4 and cell 6 are processed according to the target data processing function to obtain the display content of column 4 in the folded area.
[0213] In one embodiment, when the display content of the folded area is switched from the original cell content in the merged cell to the original cell content in other cells, the scope of the target data processing function is switched to the subordinate cell area of the other cells, and then the original cell content in the subordinate cell area of the other cells is processed according to the target data processing function.
[0214] Here, the other cells can be merged cells or independent cells. When the other cells are independent cells, the subordinate cell area of the other cells refers to the cell area in the same row or column as the other cells and located in the first orientation of the other cells. The first orientation is the opposite orientation of the merged cell corresponding to the folding operation compared to the orientation of the other cells.
[0215] For example, see Fig. 9 In the example, assuming that cell 7 is the other cell mentioned above, and the merged cell 1 corresponding to the folding operation is on the left side of cell 7, then the first position mentioned above is the right position, and the subordinate cell area of cell 7 refers to the cell area formed by cell 8 and cell 9.
[0216] As for the case where the displayed content of the folded area is switched from the original cell content in other cells to the original cell content in the merged cell, the determination of the scope of the target data processing function is described above and will not be repeated here.
[0217] Combination of the above Figures 9 to 12 An example is given of an implementation method for folding merged cells and their corresponding target cell areas in a more complex table layout. Those skilled in the art should understand that, for any other form of table layout, the implementation method for folding merged cells and their corresponding target cell areas in the table layout can be reasonably derived through the above embodiments, which will be included in the protection scope of the embodiments of the present application.
[0218] Based on any of the above embodiments, the technical solution of the embodiments of the present application also includes: in response to an expansion operation on the folded area, restoring the folded area to the original layout of the merged cell and its corresponding target cell area, and displaying the corresponding original cell content in the restored cell.
[0219] Among them, in specific implementation, the execution subject of the embodiment of the present application records the original cell content and original layout when folding the merged cell and its corresponding target cell area. Afterwards, once the expansion operation is recognized, the original cell content and original layout of the folded area are obtained from the internal storage, and the folded area is restored to its layout and cell content before being folded according to the original cell content and original layout.
[0220] The above embodiments can ensure that the user can see a complete and consistent table without folding after expanding the folding area, thereby providing the user with a richer and more flexible table data interaction experience.
[0221] In addition, in the table processing method, the view display and the underlying data operation can be separated for the table. The separation here means: when displaying, the processing result of the table is displayed in the form of a view, while the underlying data remains in its original state, that is, each cell still has its own independent original cell content, and maintains its original position and layout. The layout operation of the table, such as the folding operation of the merged cell and its corresponding target cell area, does not change the underlying data. This approach can provide a friendly view display while maintaining accurate and efficient operation of the underlying data.
[0222] Based on this, in one embodiment, the specific implementation of folding the merged cell and its corresponding target cell area includes: rendering a table view of the table, and folding the merged cell and its corresponding target cell area in the table view.
[0223] When rendering a table view, it is usually necessary to calculate the starting and ending positions of the table area, and merge the areas at different positions into a visually complete table when rendering. When the table area changes, the view is re-rendered.
[0224] In the technical solution of the embodiment of the present application, the above table area includes but is not limited to the table area composed of the merged cells triggered by the folding operation and their corresponding target cell areas, other areas in the table except the aforementioned areas, etc. The folding effect of the merged cells and their corresponding target cell areas is not achieved by changing the original layout of the table, but is a display effect presented by rendering the view.
[0225] For example, see Fig.13 , which are examples of two different folding effects obtained by folding the merged cells in the table and their corresponding target cell areas. Fig.13 From Effect 1 and Effect 2, we can see that Effect 1 achieves the folding effect of the merged cells and their target cell areas by hiding the corresponding rows / columns, for example, hiding row 3. This method will change the layout of the table. Effect 2 can be achieved by rendering the table view, such as rendering the view Figure 1 And Vision Figure 2 , and then view Figure 1 And Vision Figure 2 Just splice and display. In essence, no row / column is hidden in this way. It only forms the display effect from the table view level. Of course, in actual applications, the folding effect shown in effect 1 can also be achieved by re-determining the position and layout of the merged cells and their corresponding target cell areas. The embodiments of the present application are not limited to this.
[0226] The above is only a simple illustration of achieving a folding effect through rendering of a table view. In actual applications, other operations may also exist in the process of achieving folding rendering through rendering of a table view, such as adjusting the view size so that two adjacent views can maintain an alignment effect to maintain the visual integrity of the table. The embodiments of the present application do not limit this.
[0227] Fig.14 This is a block diagram of an embodiment of a table processing device provided in an embodiment of the present application. Fig.14 As shown, the device comprises:
[0228] A cell folding module 141 is used for folding the merged cell and its corresponding target cell area in response to a folding operation on the merged cell in the table to obtain a folded area, wherein the target cell area refers to a cell area that has an attribution relationship with the merged cell;
[0229] The content display module 142 is used to determine display content according to the original cell content of the cells in the target cell area, and display the display content in the folded area.
[0230] In a possible implementation, the content display module 142 includes:
[0231] A strategy output unit, used for outputting a preset cell folding display strategy set;
[0232] A strategy selection unit, used to determine the cell folding display strategy selected from the cell folding display strategy set as a target cell folding display strategy;
[0233] The strategy display unit is used to determine the display content according to the target cell folding display strategy and the original cell content of the cells in the target cell area.
[0234] In a possible implementation, the content display module 142 includes:
[0235] A target cell determining unit, used for determining a target cell from the target cell area;
[0236] The content determination unit is used to determine the original cell content of the target cell as the display content.
[0237] In a possible implementation manner, the target cell determination unit is specifically used to:
[0238] Determine cells in the target cell area that meet preset conditions as target cells;
[0239] Alternatively, a selected cell in the target cell area is determined as the target cell.
[0240] In a possible implementation, the device further includes:
[0241] A first scrolling viewing module, used to set a scrolling viewing mode for the folded area;
[0242] In response to a scrolling view operation on the folded area, the original cell contents of other cells in the target cell area are determined as new display contents, and the new display contents are displayed in the folded area; the other cells refer to cells in the target cell area except the current cell, and the current cell refers to the cell corresponding to the current display content in the folded area.
[0243] In a possible implementation, the content display module 142 includes:
[0244] A function determination unit, used for determining a target data processing function;
[0245] The content processing unit is used to process the original cell content of the cells in the target cell area according to the target data processing function, and determine the processing results as display content.
[0246] In a possible implementation manner, the function determination unit is specifically configured to:
[0247] Determine a preset data processing function as a target data processing function;
[0248] Alternatively, a preset data processing function set is output, and a data processing function selected from the data processing function set is determined as a target data processing function;
[0249] Alternatively, the input data processing function is determined as the target data processing function.
[0250] In a possible implementation, the device further includes:
[0251] A second scrolling viewing module, used to set a scrolling viewing mode for the folded area;
[0252] In response to a scrolling view operation on the folded area, the original cell contents of the cells in the target cell area are processed according to other data processing functions, the processing results are determined as new display contents, and the new display contents are displayed in the folded area; the other data processing functions refer to data processing functions in a preset data processing function set, except for the data processing functions applied to the current display content in the folded area.
[0253] In a possible implementation, the content display module 142 includes:
[0254] The content splicing unit is used to splice the original cell contents of at least two cells in the target cell area and determine the spliced content as the display content.
[0255] In a possible implementation manner, the content splicing unit is specifically used to:
[0256] splicing original cell contents of at least two cells in the target cell area according to a preset order;
[0257] Alternatively, the original cell contents of at least two cells in the target cell area are concatenated in an order specified by the user.
[0258] In a possible implementation, the content display module 142 is specifically configured to:
[0259] Inputting the original cell content of the cells in the target cell area into the trained content generation model to obtain the generated content of the content generation model;
[0260] The generated content is determined as display content.
[0261] In a possible implementation, the content display module 142 includes:
[0262] a format determination unit, used for determining a target display format;
[0263] A format display unit is configured to display the display content in the folded area according to the target display format.
[0264] In a possible implementation, the cell folding module comprises:
[0265] A view rendering unit, used for rendering to obtain a table view of the table;
[0266] The view processing unit is used to collapse the merged cell and its corresponding target cell area in the table view.
[0267] In a possible implementation, the device further includes:
[0268] The restoring module is used to restore the folded area to the original layout of the merged cell and its corresponding target cell area in response to the expansion operation on the folded area, and display the corresponding original cell content in the restored cell.
[0269] like Fig.15As shown, an embodiment of the present application provides an electronic 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.
[0270] Memory 113, used for storing computer programs;
[0271] 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:
[0272] In response to a folding operation on a merged cell in a table, the merged cell and its corresponding target cell region are folded to obtain a folded region, wherein the target cell region refers to a cell region that has an attribution relationship with the merged cell;
[0273] Determine display content according to original cell content of cells in the target cell area, and display the display content in the folded area.
[0274] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. 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.
[0275] 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.
[0276] 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.
[0277] 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.
[0278] 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 folding operation on a merged cell in a table, the merged cell and its corresponding target cell region are folded to obtain a folded region, wherein the target cell region refers to a cell region that has an attribution relationship with the merged cell; Determine display content according to original cell content of cells in the target cell area, and display the display content in the folded area.
2. The method according to claim 1, characterized in that: The step of determining the display content according to the original cell content of the cells in the target cell area includes: Output the preset cell folding display strategy set; Determine the cell folding display strategy selected from the cell folding display strategy set as the target cell folding display strategy; According to the target cell folding display strategy, display content is determined according to original cell content of cells in the target cell area.
3. The method according to claim 1 or 2, characterized in that: The step of determining the display content according to the original cell content of the cells in the target cell area includes: Determine a target cell from the target cell region; The original cell content of the target cell is determined as the display content.
4. The method according to claim 3, characterized in that The step of determining a target cell from the target cell region comprises: Determine cells in the target cell area that meet preset conditions as target cells; Alternatively, a selected cell in the target cell area is determined as the target cell.
5. The method according to claim 3, characterized in that: The method further comprises: Setting a scrolling viewing mode for the folded area; In response to a scrolling view operation on the folded area, the original cell contents of other cells in the target cell area are determined as new display contents, and the new display contents are displayed in the folded area; the other cells refer to cells in the target cell area except the current cell, and the current cell refers to the cell corresponding to the current display content in the folded area.
6. The method according to claim 1 or 2, characterized in that: The step of determining the display content according to the original cell content of the cells in the target cell area includes: Determine the target data processing function; The original cell contents of the cells in the target cell area are processed according to the target data processing function, and the processing results are determined as display contents.
7. The method according to claim 6, characterized in that The determining of the target data processing function comprises: Determine a preset data processing function as a target data processing function; Alternatively, a preset data processing function set is output, and a data processing function selected from the data processing function set is determined as a target data processing function; Alternatively, the input data processing function is determined as the target data processing function.
8. The method according to claim 6, characterized in that The method further comprises: Setting a scrolling viewing mode for the folded area; In response to a scrolling view operation on the folded area, the original cell contents of the cells in the target cell area are processed according to other data processing functions, the processing results are determined as new display contents, and the new display contents are displayed in the folded area; the other data processing functions refer to data processing functions in a preset data processing function set, except for the data processing functions applied to the current display content in the folded area.
9. The method according to claim 1 or 2, characterized in that: The step of determining the display content according to the original cell content of the cells in the target cell area includes: The original cell contents of at least two cells in the target cell area are spliced, and the spliced contents are determined as display contents.
10. The method according to claim 9, characterized in that The step of splicing original cell contents of at least two cells in the target cell area includes: splicing original cell contents of at least two cells in the target cell area according to a preset order; Alternatively, the original cell contents of at least two cells in the target cell area are concatenated in an order specified by the user.
11. The method according to claim 1 or 2, characterized in that: The step of determining the display content according to the original cell content of the cells in the target cell area includes: Inputting the original cell content of the cells in the target cell area into the trained content generation model to obtain the generated content of the content generation model; The generated content is determined as display content.
12. The method according to claim 1, characterized in that The displaying the display content in the folded area includes: Determine the target display format; The display content is displayed in the folded area according to the target display format.
13. The method according to claim 1, characterized in that The folding of the merged cell and its corresponding target cell area includes: Rendering a table view of the table; In the table view, the merged cell and its corresponding target cell area are collapsed.
14. The method according to claim 1, characterized in that The method further comprises: In response to an expansion operation on the folded area, the folded area is restored to the original layout of the merged cell and its corresponding target cell area, and the corresponding original cell content is displayed in the restored cell.
15. A table processing device, characterized in that: The device comprises: A cell folding module, configured to, in response to a folding operation on a merged cell in a table, fold the merged cell and its corresponding target cell region to obtain a folded region, wherein the target cell region refers to a cell region that has an attribution relationship with the merged cell; The content display module is used to determine the display content according to the original cell content of the cells in the target cell area, and display the display content in the folded area.
16. 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 14.
17. 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 14.
