Cell adjusting method and electronic equipment
By automatically adjusting the column width and row height of cells in the spreadsheet to make them consistent with the benchmark cells, the problem of cumbersome adjustment of row height and column width in the existing technology is solved, and the user experience and the neatness of the table are improved.
Patent Information
- Application Number
- CN202411425571.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-13
- Publication Date
- 2025-03-18
AI Technical Summary
When existing spreadsheet software adjusts the row height and column width of the table, it is often difficult to match other rows or columns, resulting in the table looking confusing, and users need to manually adjust it multiple times, which is cumbersome.
By judging the width and height difference between the cell to be adjusted and the benchmark cell in real time, when the difference is less than or equal to the predetermined value, the column width and row height of the cell are automatically adjusted to make it consistent with the benchmark cell.
It reduces the cumbersomeness of the cell adjustment process, improves the user experience, and ensures the neat and beautiful tables.
Smart Images

Figure CN119647427A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data editing, and in particular to a cell adjustment method and electronic equipment. Background Art
[0002] The electronic spreadsheet software installed in the electronic device has brought great convenience to the data processing work of the user. Among them, the existing electronic spreadsheet software includes: Excel, Kingsoft WPS and the like in office software.
[0003] When adjusting the row height and column width of a table, it is often not easy to adjust them to be consistent with other rows or columns, which makes the entire table look very messy. Users need to visually measure the position of the adjustable dividing line, and then drag the adjustable dividing line to the determined position to adjust the cell. However, this method of adjusting cells requires users to measure the position of the adjustable dividing line, and the user's visual measurement may not be accurate enough or the dragging hand mark may not be precise enough, so that one adjustment cannot be completely matched and multiple adjustments are required. These undoubtedly make the adjustment process more cumbersome; and if the cells to be adjusted include multiple cells or multiple divisible lines need to be adjusted, the cumbersomeness is even more obvious, resulting in a poor user experience. Summary of the invention
[0004] The main purpose of the present invention is to provide a cell adjustment method and electronic device to solve the problem in the prior art that row height and column width are often difficult to adjust to be consistent with other rows or columns, causing the entire table to look very messy.
[0005] In order to achieve the above-mentioned purpose, a cell method is provided according to the present invention, which determines in real time according to the size of the column width of the reference cell the difference △H2 between the widths Hb of the left and right columns of the cells in the target area to be adjusted and the column width HB of the reference cell, and when the difference △H2 is less than or equal to the predetermined value H2, the cell column width Hb in the target area is automatically adjusted to be consistent with the column width of the reference cell, and\or, determines in real time the difference △H1 between the heights Ha of the upper and lower rows of the cells in the target area to be adjusted and the row height HA of the reference cell, and when the difference is less than or equal to the predetermined value H1, the row height Ha of the cells in the target area is automatically adjusted to be consistent with the row height of the reference cell.
[0006] Preferably, according to the size of the target cell column width HB and the target row height HA, the height difference △H1 between the height of the upper and lower rows and the width of the left and right columns of the cells in the target area to be adjusted and the row height difference △H2 of the target cell are determined in real time, and the preset values H1 and H2 are set. When the row height difference △H1≤H1, the row height of the cells in the target area is automatically adjusted to be consistent with the row height of the target cell. Or when the column width difference △H2≤H2, the column width of the cells in the target area is automatically adjusted to be consistent with the column width of the target cell.
[0007] Preferably, when the cell column width in the target area to be adjusted is adjusted to be consistent with the benchmark cell column width, it also includes displaying all cells in the current table with the same cell column width as the benchmark cell in a matching color block, and\or, displaying the column width value HB for all cells in the current table whose cell column width is HB.
[0008] Preferably, when the cell row height in the target area is consistent with the target cell row height, it also includes all cells in the current table whose color blocks are consistent with the target cell row height, and\or, all cell values HA displayed in the current table that are consistent with the target cell row height.
[0009] Preferably, when at least one of the row height or column height of the cells in the target area is adjusted to be consistent with the width or height of the reference cell, the cell width value HB and the cell height value HA of the cells in the current target area and the reference cell are displayed in real time.
[0010] Preferably, when the row height and column width of the cells in the target area are consistent with the row height and column width of the target cells, it also includes all cells in the current table whose row height and column width are consistent with the target cells in the same color block. And\or, all cell column width values HB and cell row height HA values consistent with the target cells are displayed in the current table.
[0011] Preferably, the cell selected by the mouse is the cell to be adjusted in the target area, or the cell selected by the keyboard is the cell to be adjusted.
[0012] Preferably, when the mouse selects a cell between two rows or columns, the cell selected by the mouse is a cell in the target area; or when the mouse cursor selects a cell just on the row or column line of two cells, both cells are cells in the target area.
[0013] The preferred predetermined value range H1 is 3 pounds to 5 pounds and / or the predetermined value range H2 is 3 pounds to 25 pounds, or the user can set it.
[0014] Preferably, the electronic device can be installed with software having the table typesetting method as described in any one of claims 1-9. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0016] Figure 1 An example of a specific benchmarking cell of the present invention is shown;
[0017] Figure 2 The present invention shows that the column width of the cell to be adjusted is automatically adjusted to HB, that is, after automatic control, all cells with a column width of HB in the table are displayed with the same color block;
[0018] Figure 3 A specific embodiment of the present invention is shown. The column width of the cell to be adjusted is automatically adjusted to HB, that is, after automatic control, all cells with a column width of HB in the table are displayed with the same color block, and the specific value of the corresponding column width HB is displayed;
[0019] Figure 4 A flow chart of a cell adjustment method in embodiment 1 of the present invention is shown; Figure 5 A flow chart of a cell adjustment method according to embodiment 2 of the present invention is shown; Figure 6 A flow chart of a cell adjustment method according to embodiment 3 of the present invention is shown. DETAILED DESCRIPTION
[0020] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0021] It should be noted that, unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs.
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] In order to reduce the complexity of the cell adjustment process and thus improve user experience, an embodiment of the present invention provides a cell adjustment method and device.
[0024] First, a cell adjustment method provided by an embodiment of the present invention is introduced.
[0025] It should be noted that the cell adjustment method provided in the embodiment of the present invention is applicable to an electronic device in which electronic spreadsheet software is installed. In practical applications, the electronic device may be a touch-screen mobile phone, a laptop computer, a tablet computer, etc., and the electronic spreadsheet software may be Excel, Kingsoft WPS, etc. in office software.
[0026] Example 1
[0027] like Figure 4 As shown, a cell adjustment method may include:
[0028] S101, such as Figure 1 Determine the reference cell as shown. For example, you can right-click the mouse to select it as the reference cell, or use other methods such as keyboard to select the reference cell.
[0029] S102, determining the cell to be adjusted;
[0030] The first method to determine the cells to be adjusted is: Figure 2 When a dragging operation of the adjustable dividing line is detected, determining that the adjustable cell corresponding to the dragged adjustable dividing line is a cell to be adjusted;
[0031] In spreadsheet software, when a user needs to adjust certain columns or rows of a table to the same column width or the same row height for aesthetic layout requirements, the user will drag the corresponding adjustable dividing line; and when the electronic device detects that the adjustable dividing line is dragged, it can determine that the adjustable cell corresponding to the dragged adjustable dividing line is the cell to be adjusted, and then perform subsequent processing.
[0032] It should be noted that there are multiple adjustable cells corresponding to the adjustable dividing line, for example, a whole row of cells or a whole column of cells, so there are also multiple cells to be adjusted.
[0033] Subsequent processing is performed based on the row height HA of the benchmark cell and the corresponding row height Ha of the cell to be adjusted.
[0034] S103, calculate △H1=|HA-Ha|,
[0035] S104, when △H1≤H1, the row height of the cell to be adjusted is automatically adjusted to HA. That is, the adjustable dividing line is automatically controlled to be positioned at the position where the row height is HA. Then, all cells in the table with a row height of HA are displayed in the same color block, and the specific value of the corresponding row height HA is displayed;
[0036] When △H1>H1, the cell to be adjusted will not be automatically adjusted.
[0037] When the adjustable dividing line is dragged, the adjustable dividing line can be automatically controlled to be positioned at the same position as the row height of the corresponding cell. The process of automatically controlling the adjustable dividing line to be positioned at a position matching the position in the cell to be adjusted can be defined as an automatic adsorption process.
[0038] Example 2
[0039] like Figure 5 As shown, a cell adjustment method may include:
[0040] S201, such as Figure 1 Determine the reference cell as shown. You can right-click and select Reference Cell.
[0041] S202, determining the cell to be adjusted;
[0042] The first method to determine the cells to be adjusted is: Figure 2 When a dragging operation of the adjustable dividing line is detected, determining that the adjustable cell corresponding to the dragged adjustable dividing line is a cell to be adjusted;
[0043] In spreadsheet software, when a user needs to adjust certain columns or rows of a table to the same column width or the same row height for aesthetic layout requirements, the user will drag the corresponding adjustable dividing line; and when the electronic device detects that the adjustable dividing line is dragged, it can determine that the adjustable cell corresponding to the dragged adjustable dividing line is the cell to be adjusted, and then perform subsequent processing.
[0044] It should be noted that there are multiple adjustable cells corresponding to the adjustable dividing line, for example, a whole row of cells or a whole column of cells, so there are also multiple cells to be adjusted.
[0045] Subsequent processing is performed based on the column width HB of the reference cell and the row height Hb corresponding to the cell to be adjusted.
[0046] S203, after determining the cell to be adjusted, for example, after determining that the adjustable cell corresponding to the dragged adjustable dividing line is the cell to be adjusted.
[0047] Based on the column width HB of the reference cell and the column width Hb of the cell to be adjusted, calculate △H2=|HB-Hb|.
[0048] S205, △H2≤H2, if Figure 3 Adjust the column width of the cell to be adjusted to HB, then display all cells in the table whose row height is the column width HB in the same color block, and display the corresponding specific value of the column width HB.
[0049] When △H2>H2, the cell to be adjusted will not be automatically adjusted.
[0050] Example 3
[0051] S301, such as Figure 1 Determine the benchmark cell as shown, for example, you can right-click and select it as the benchmark cell;
[0052] Select the reference cell, which can be a cell, a row of cells, or a column of cells.
[0053] S302, determining the cell to be adjusted;
[0054] In spreadsheet software, when a user needs to adjust certain columns or rows of a table to the same column width or the same row height for aesthetic layout requirements, at this time, the adjustable cells selected by the user with the mouse or keyboard are the cells to be adjusted for subsequent processing.
[0055] There may be multiple adjustable cells, for example, a whole row of cells or a whole column of cells or multiple rows of cells or multiple columns of cells, so there may also be multiple cells to be adjusted.
[0056] Subsequent processing is performed based on the row height HA and column width HB of the reference cell and the corresponding row height Ha and column width Hb of the cell to be adjusted.
[0057] S303, calculate △H1=|HA-Ha|, △H2=|HB-Hb|;
[0058] S304, when △H1≤H1, the row height of the cell to be adjusted is automatically adjusted to HA. That is, the adjustable dividing line is automatically controlled to be positioned at the position where the row height is HA. Then all cells with a row height of HA in the table are displayed in the same color block, and the specific value of the corresponding row height HA is displayed.
[0059] When △H1>H1, the cell to be adjusted will not be automatically adjusted.
[0060] S305, △H2≤H2, if Figure 3 Adjust the column width of the cell to be adjusted to HB, then display all cells in the table whose row height is the column width HB in the same color block, and display the corresponding specific value of the column width HB.
[0061] When △H2>H2, the cell to be adjusted will not be automatically adjusted.
[0062] It is understandable that the preset distance value can be set according to the screen size of the electronic device. For example, the preset distance value can be 25 pounds, 10 pounds, 5 pounds, 3 pounds, etc., but is certainly not limited to this. Moreover, the preset distance values corresponding to different electronic devices may be different, and different preset distance values may be set in the same electronic device in different application scenarios, which is all reasonable.
[0063] Automatically locate the row height and column width of the cell to be adjusted to a matching position, thereby avoiding multiple manual adjustments caused by visual measurement and inaccurate visual measurement, reducing the tediousness of the cell adjustment process and improving the user experience.
[0064] △H1 can be 30 pounds, 20 pounds, 10 pounds, 5 pounds, 3 pounds, etc. It can be the system default or set by the user. △H1 can be equal to △H2 or not equal to △H2, and no specific limitation is made here.
[0065] In short, when it is detected that the difference between the row height or column width of the cell to be adjusted and the row height or column width of the target cell is less than or equal to the preset value, the cell to be adjusted is automatically adjusted to make it consistent with the row height or column width of the target cell.
[0066] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A cell adjustment method, characterized in that, according to the size of the reference cell column width, the difference △H2 between the widths Hb of the left and right columns of the cells in the target area to be adjusted and the column width HB of the reference cell is determined in real time; when the difference △H2 is less than or equal to the predetermined value H2, the cell column width Hb in the target area is automatically adjusted to be consistent with the reference cell column width; and\or, according to the size of the reference cell row height, the difference △H1 between the heights Ha of the upper and lower rows of the cells in the target area to be adjusted and the row height HA of the reference cell is determined in real time; when the difference is less than or equal to the predetermined value H1, the row height Ha of the cells in the target area is automatically adjusted to be consistent with the row height of the reference cell.
2. A cell adjustment method and device according to claim 1, characterized in that: According to the column width HB of the reference cell and the row height HA, the height difference △H1 between the height of the upper and lower rows and the width of the left and right columns of the cells in the target area to be adjusted and the row height difference △H2 of the reference cell are determined in real time, and the preset values H1 and H2 are set. When the row height difference △H1≤H1, the row height of the cells in the target area is automatically adjusted to be consistent with the row height of the reference cell. Or when the column width difference △H2≤H2, the column width of the cells in the target area is automatically adjusted to be consistent with the column width of the reference cell.
3. The cell adjustment method according to claim 1, when adjusting the cell column width in the target area to be adjusted to be consistent with the reference cell column width, further comprising: Displaying all cells in the current table with the same column width as the corresponding cell in a color block of the same color; And\or, display the column width value HB for all cells in the current table whose column width is HB.
4. The cell adjustment method according to claim 1, when the cell row height in the target area is consistent with the reference cell row height, further comprising: All cells in the current table whose color blocks are the same as the corresponding cell row height; And\or, all cell values HA that are consistent with the corresponding cell row height are displayed in the current table.
5. A cell adjustment method according to claim 1-2, characterized in that: When at least one of the row height or column height of the cells in the target area is adjusted to be consistent with the width or height of the reference cell, the cell width value HB and the cell height value HA of the cells in the target area and the reference are displayed in real time.
6. A cell adjustment method and device according to claim 2, when the row height and column width of the cells in the target area are consistent with the row height and column width of the reference cell, further comprising: All cells in the current table whose row height and column width are consistent with the corresponding cell in the same color block; And\or, all cell column width values HB and cell row height values HA that are consistent with the referenced cells are displayed in the current table.
7. A cell adjustment method according to any one of claims 1 to 6, further comprising selecting a cell with a mouse as the cell to be adjusted in the target area, or selecting a cell with a keyboard as the cell to be adjusted.
8. A cell adjustment method according to claim 7, when the position selected by the mouse is between two upper and lower rows or two left and right columns of a cell, the cell selected by the mouse is a cell in the target area; Or when the position selected by the mouse cursor is exactly on the row line or column line of two cells, then the two cells are both cells in the target area.
9. According to any one of the table typesetting methods of claims 1-2, the predetermined value range H1 is 3 pounds to 25 pounds and / or the predetermined value range H2 is 3 pounds to 25 pounds, or the user can set it by himself.
10. An electronic device, characterized in that: The electronic device may be installed with software having a table typesetting method as described in any one of claims 1-9.