Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for adjusting the row and column areas of an electronic form, which are convenient for a user to use and improve the user experience. The technical scheme is as follows:
a spreadsheet row and column area adjusting method is used for realizing addition or deletion of spreadsheet rows and columns, and comprises the following steps:
receiving an adjustment triggering operation of a user for a current spreadsheet row and column area;
determining the type of an adjusting object, the type of an adjusting action and the adjusting quantity;
adjusting the row and column areas of the current spreadsheet according to the determination result;
wherein,
the determining of the adjustment object type includes: determining that the number of rows needs to be adjusted currently or the number of columns needs to be adjusted currently;
the determining an adjustment action type comprises: determining that an adding operation or a deleting operation is required to be carried out at present;
the determining the adjustment amount comprises: displaying an adjusting quantity inquiry interface; and determining the adjustment quantity according to the numerical value input or selected by the user on the adjustment quantity inquiry interface.
In one embodiment of the present invention,
the receiving of the adjustment triggering operation of the user for the line and column area of the current spreadsheet comprises:
receiving a click operation of a user on a first type adjusting button of a row and column area of a current electronic form, wherein different rows and columns of the current electronic form correspond to different first type adjusting buttons respectively;
accordingly, the adjustment object type is determined by:
and determining the type of the adjustment object according to the corresponding relation between the first type of adjustment button clicked by the user and the line and row of the current spreadsheet.
In one embodiment of the invention, the adjustment action type is determined by:
displaying an adjustment action type option corresponding to a first type of adjustment button clicked by the user;
and determining the adjustment action type according to the selection of the user in the adjustment action type option.
In one embodiment of the present invention,
the receiving of the adjustment triggering operation of the user for the line and column area of the current spreadsheet comprises:
receiving the clicking operation of a user on a second type of adjusting buttons of a row and column area of the current electronic form, wherein different rows and columns of the current electronic form correspond to different second type of adjusting buttons respectively;
correspondingly, the type of the adjustment object and the type of the adjustment action are determined through the following steps:
determining the type of an adjusting object according to the corresponding relation between the second type of adjusting button clicked by the user and the line and row of the current spreadsheet;
determining the number of times of clicking the second type of adjusting button by the user according to the clicking operation of the user;
and determining the type of the adjusting action according to the relation between the preset click times and the type of the adjusting action.
In one embodiment of the invention, the adjustment action type is determined and the adjustment number is determined by the following steps:
displaying an adjustment quantity selection interface, wherein the adjustment quantity selection interface comprises at least one option, and each option provides a combination of an adjustment quantity and an adjustment action type for a user;
and determining the type of the adjustment action and determining the adjustment quantity according to the selection of the user on the adjustment quantity selection interface.
In an embodiment of the present invention, in a case that the determined adjustment action type is an add operation, the adjusting the current spreadsheet line and column area according to the determination result includes:
increasing the rows or the columns with the corresponding number according to the determined type and the adjustment number of the adjustment objects;
the format of the new added line is determined according to the format of the adjacent line of the new added line, the adjacent line of the new added line is determined according to a preset first rule, and the adjacent line of the new added line comprises: one row at the lower side of the new row or one row at the upper side of the new row;
determining the format of the new added column according to the format of the adjacent column of the new added column, determining the adjacent column of the new added column according to a preset second rule, wherein the adjacent column of the new added column comprises: the column to the left of the newly added column, or the column to the right of the newly added column.
An apparatus for adjusting columns and rows of a spreadsheet, for adding or deleting columns and rows of the spreadsheet, the apparatus comprising:
the receiving module is used for receiving the adjustment triggering operation of a user aiming at the row and column areas of the current spreadsheet;
the determining module is used for determining the type of the adjusting object, the type of the adjusting action and the adjusting quantity;
the adjusting module is used for adjusting the row and column areas of the current electronic form according to the determination result of the determining module;
wherein,
the determining module is specifically configured to: determining that the number of rows needs to be adjusted currently or the number of columns needs to be adjusted currently;
the determining module is specifically configured to: determining that an adding operation or a deleting operation is required to be carried out at present;
the determining module is specifically configured to: displaying an adjusting quantity inquiry interface; and determining the adjustment quantity according to the numerical value input or selected by the user on the adjustment quantity inquiry interface.
In one embodiment of the present invention,
the receiving module is specifically configured to:
receiving a click operation of a user on a first type adjusting button of a row and column area of a current electronic form, wherein different rows and columns of the current electronic form correspond to different first type adjusting buttons respectively;
correspondingly, the determining module is specifically configured to:
and determining the type of the adjustment object according to the corresponding relation between the first type of adjustment button clicked by the user and the line and row of the current spreadsheet.
In an embodiment of the present invention, the determining module is specifically configured to:
displaying an adjustment action type option corresponding to a first type of adjustment button clicked by the user;
and determining the adjustment action type according to the selection of the user in the adjustment action type option.
In one embodiment of the present invention,
the receiving module is specifically configured to:
receiving the clicking operation of a user on a second type of adjusting buttons of a row and column area of the current electronic form, wherein different rows and columns of the current electronic form correspond to different second type of adjusting buttons respectively;
correspondingly, the determining module is specifically configured to:
determining the type of an adjusting object according to the corresponding relation between the second type of adjusting button clicked by the user and the line and row of the current spreadsheet;
determining the number of times of clicking the second type of adjusting button by the user according to the clicking operation of the user;
and determining the type of the adjusting action according to the relation between the preset click times and the type of the adjusting action.
In an embodiment of the present invention, the determining module is specifically configured to:
displaying an adjustment quantity selection interface, wherein the adjustment quantity selection interface comprises at least one option, and each option provides a combination of an adjustment quantity and an adjustment action type for a user;
and determining the type of the adjustment action and determining the adjustment quantity according to the selection of the user on the adjustment quantity selection interface.
In an embodiment of the present invention, the adjusting module is specifically configured to:
under the condition that the determined adjustment action type is the adding operation, adding a corresponding number of rows or adding a corresponding number of columns according to the determined adjustment object type and the adjustment number;
the format of the new added line is determined according to the format of the adjacent line of the new added line, the adjacent line of the new added line is determined according to a preset first rule, and the adjacent line of the new added line comprises: one row at the lower side of the new row or one row at the upper side of the new row;
determining the format of the new added column according to the format of the adjacent column of the new added column, determining the adjacent column of the new added column according to a preset second rule, wherein the adjacent column of the new added column comprises: the column to the left of the newly added column, or the column to the right of the newly added column.
By applying the technical scheme provided by the embodiment of the invention, when a user needs to adjust the row and column areas of the electronic form, the adjustment quantity is determined by displaying the adjustment quantity inquiry interface to the user and inputting or selecting the corresponding numerical value on the adjustment quantity inquiry interface by the user, the determined adjustment quantity is in accordance with the actual requirement of the user, corresponding addition and deletion operations can be completed without repeated adjustment of the user, the use of the electronic form is facilitated, and the user experience can be improved.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 2, an implementation flowchart of a method for adjusting a rank area of an electronic form according to an embodiment of the present invention is shown, where the method includes the following steps:
s210: receiving an adjustment triggering operation of a user for a current spreadsheet row and column area;
in practical applications, when the number of rows or columns of the current electronic table does not meet the current requirements of the user, the row and column area of the current electronic table needs to be adjusted, such as adding a row with a certain number of rows, adding a column with a certain number of columns, deleting a row with a certain number of rows, or deleting a column with a certain number of columns. When the user has such adjustment requirement, it needs to issue a corresponding adjustment instruction to trigger the triggering operation of the current spreadsheet line and column region. In practical application, a corresponding adjusting button or adjusting option can be set in the spreadsheet and provided to the user, so that the user operates the adjusting button or adjusting option to trigger the adjusting operation on the row and column areas of the spreadsheet. For example, an adjustment button may be set in a spreadsheet row and column area or an adjustment option may be set in a menu of spreadsheet software, and a user may consider that an adjustment instruction is issued by clicking the adjustment button or selecting a corresponding adjustment option.
After receiving the user' S adjustment triggering operation for the line and column area of the current spreadsheet, the step S220 may be continuously executed.
S220: determining the type of an adjusting object, the type of an adjusting action and the adjusting quantity;
wherein the determining of the adjustment object type comprises: determining that the number of rows needs to be adjusted currently or the number of columns needs to be adjusted currently;
the determining an adjustment action type comprises: determining that an adding operation or a deleting operation is required to be carried out at present;
the determining the adjustment amount comprises: displaying an adjusting quantity inquiry interface; and determining the adjustment quantity according to the numerical value input or selected by the user on the adjustment quantity inquiry interface.
It will be appreciated that before the adjustment to the spreadsheet line area is made, the adjustment object type, the adjustment action type, and the adjustment amount are determined, i.e., how many rows need to be added, or how many columns need to be added, or how many rows need to be deleted, or how many columns need to be deleted.
When the adjustment quantity is determined, specific numerical value options can be provided in the displayed adjustment quantity inquiry interface, and the adjustment quantity is determined according to the numerical value selected by the user; an adjustment quantity input box can be further provided, a user inputs a corresponding numerical value according to actual requirements, and the adjustment quantity is determined according to the numerical value input by the user. The display form of the specific numerical value options and the adjustment quantity input box can be designed according to the characteristics of a terminal operating system, for example, in an intelligent terminal, a user can scratch each option to select a numerical value meeting the actual requirement, and in a computer terminal, the user can scroll each option to select a numerical value meeting the actual requirement by setting a scroll bar. The invention is not limited in this regard.
It is to be understood that the adjustment object type, the adjustment action type, and the adjustment amount may be determined separately or simultaneously.
In an embodiment of the present invention, the step S210 of receiving a user' S adjustment triggering operation for a current spreadsheet line and column area may include the following steps:
receiving a click operation of a user on a first type adjusting button of a row and column area of a current electronic form, wherein different rows and columns of the current electronic form correspond to different first type adjusting buttons respectively;
accordingly, the adjustment object type may be determined by:
and determining the type of the adjustment object according to the corresponding relation between the first type of adjustment button clicked by the user and the line and row of the current spreadsheet.
In practical applications, there may be a plurality of adjustment buttons of the first type, which correspond to different rows and columns of the spreadsheet respectively. The position of each first type adjustment button in the spreadsheet may be preset, such as on the axis of each row of the spreadsheet, on the axis of each column, or between rows and columns of the spreadsheet, and in particular, the positions shown in fig. 3a and fig. 3b may be referred to, where the button 310 and the button 330 correspond to column 1, the button 320 and the button 340 correspond to row 3, and the other buttons are similar.
It will be appreciated that no matter where the first type adjustment buttons are pre-positioned in the spreadsheet, different first type adjustment buttons correspond to different rows and columns of the spreadsheet. When a user clicks a certain first-type adjusting button, the user can be considered to send an adjusting instruction, and according to the corresponding relation between the first-type adjusting button clicked by the user and the line and column of the current spreadsheet, the type of an adjusting object can be determined, namely, the user needs to adjust the number of rows or the number of columns. For example, if the user clicks on the button 310 shown in FIG. 3a, it may be determined that the number of columns currently needs to be adjusted.
In another embodiment of the present invention, the adjustment action type may be determined by:
the method comprises the following steps: displaying an adjustment action type option corresponding to a first type of adjustment button clicked by the user;
step two: and determining the adjustment action type according to the selection of the user in the adjustment action type option.
It can be understood that the first-type adjustment buttons may have an add operation function and a delete operation function at the same time, and when a user clicks a certain first-type adjustment button, an adjustment action type option corresponding to the first-type adjustment button is displayed, and specifically, the add operation button and the delete operation button may be expanded on the basis of the first-type adjustment button, so that the user further selects the adjustment action type option. The add operation option may be clicked when the actual demand of the user is to add a row or a column, or the delete operation option may be clicked when the actual demand of the user is to delete a row or a column. And determining the adjustment action type according to the selection of the user on the adjustment action type option.
In an embodiment of the present invention, the step S210 of receiving a user' S adjustment triggering operation for a current spreadsheet line and column area may include the following steps:
receiving the clicking operation of a user on a second type of adjusting buttons of a row and column area of the current electronic form, wherein different rows and columns of the current electronic form correspond to different second type of adjusting buttons respectively;
accordingly, the adjustment object type and the adjustment action type can be determined by the following steps:
the first step is as follows: determining the type of an adjusting object according to the corresponding relation between the second type of adjusting button clicked by the user and the line and row of the current spreadsheet;
the second step is that: determining the number of times of clicking the second type of adjusting button by the user according to the clicking operation of the user;
the third step: and determining the type of the adjusting action according to the relation between the preset click times and the type of the adjusting action.
Similar to the first type of adjustment buttons, there may be a plurality of second type of adjustment buttons, each corresponding to a different row or column of the spreadsheet. The position of each second type of adjustment button in the spreadsheet may be preset, such as on the axis of each row of the spreadsheet, on the axis of each column, or between rows and columns of the spreadsheet, and specifically, the positions shown in fig. 3a and 3b may be referred to, where the button 310 and the button 330 correspond to column 1, the button 320 and the button 340 correspond to row 3, respectively, and the other buttons are similar.
It will be appreciated that no matter where the second type of adjustment buttons are preset in the spreadsheet, different second type of adjustment buttons correspond to different rows and columns of the spreadsheet. When a user clicks a certain second-class adjusting button, the user can be considered to send an adjusting instruction, and according to the corresponding relation between the second-class adjusting button clicked by the user and the current spreadsheet row and column, the type of the adjusting object can be determined, namely, the user needs to adjust the number of rows or the number of columns. For example, if the user clicks on the button 310 shown in FIG. 3a, it may be determined that the number of columns currently needs to be adjusted.
The second type of adjusting button can have the functions of adding and deleting operations at the same time, the number of clicks of the second type of adjusting button by the user is determined according to the clicking operation of the user, and the type of the adjusting action is determined according to the relation between the preset number of clicks and the type of the adjusting action. It should be noted that the relationship between the preset number of clicks and the adjustment action type may be set by default by the system, or may be set by the user according to personal habits. The invention is not limited in this regard. For example, the following settings are set: and clicking the second type of adjusting button by the user, and correspondingly adding operation when clicking once, and correspondingly deleting operation when clicking twice.
It should be noted that the second step and the third step need to be executed sequentially, but the first step and the two steps are not limited by the execution order.
In another embodiment of the present invention, the adjustment action type and the adjustment amount may be determined by:
the method comprises the following steps: displaying an adjustment quantity selection interface, wherein the adjustment quantity selection interface comprises at least one option, and each option provides a combination of an adjustment quantity and an adjustment action type for a user;
step two: and determining the type of the adjustment action and determining the adjustment quantity according to the selection of the user on the adjustment quantity selection interface.
After receiving the adjustment triggering operation of the user for the line and column area of the current spreadsheet in step S210, an adjustment quantity selection interface may be presented, where the interface includes at least one option, and each option provides a combination of an adjustment quantity and an adjustment action type for the user. Referring to fig. 4, after the user clicks the button 330 shown in fig. 3b, an adjustment number selection interface 410 is displayed, and the user can determine the adjustment action type and determine the adjustment number after selecting according to actual needs, for example, the user selects an option "+ 2" to indicate that the adjustment action type to be performed by the user is an increase operation, and the adjustment number is 2, because the button 330 corresponds to the 1 st column, it can be determined that the adjustment object type is the number of columns, that is, 2 columns are added on the column of the current spreadsheet.
S230: and adjusting the row and column areas of the current electronic form according to the determination result.
After the adjustment object type, the adjustment action type, and the adjustment quantity are determined respectively or simultaneously in step S220, the current spreadsheet line and column area is adjusted according to the determined result.
As can be seen from the above description, different first-type adjustment buttons or second-type adjustment buttons correspond to different rows and different columns of the electronic table, and for convenience of description, the first-type adjustment buttons and the second-type adjustment buttons are collectively referred to as adjustment buttons in the description of this step, and the different adjustment buttons correspond to different rows and different columns of the electronic table. When a user clicks a certain adjusting button, the user can correspond to a specific certain row or a specific certain column. In practical application, rows and columns can be added or deleted based on the rows or columns corresponding to the adjustment buttons clicked by the user. The positions of the added rows and the added columns, the positions of the deleted rows and the deleted columns can be preset by the system, and setting items can be provided for the user to set according to personal habits. For example, according to the button 320 shown in fig. 3a clicked by the user, it may be determined that the number of lines currently needs to be adjusted, and further it may be determined that the type of the adjustment action is an increase operation, and the adjustment number is 3, then 3 lines may be added on the upper side of the 3 rd line or 3 lines may be added on the lower side of the 3 rd line based on the 3 rd line corresponding to the button 320; if the further determined adjustment action type is a delete operation and the adjustment number is 2, the 2 nd and 3 rd rows, or the 1 st and 2 nd rows, may be deleted with reference to the 3 rd row corresponding to the button 320.
It should be noted that, the positions of the adjustment buttons are different, and different adjustment position rules can be set.
In practical applications, the frequency of adding or deleting operations by the user at the end of a row or a column of the electronic form is high, in this case, the adjustment button may be set only at the end of the row or the end of the column, and as shown in fig. 5, when the user has an adjustment requirement for the row and column area of the current electronic form, a corresponding number of rows are directly added at the end of the row, or a corresponding number of columns are added at the end of the column, or a corresponding number of rows are deleted at the end of the row, or a corresponding number of columns are deleted at the end of the column.
In an embodiment of the present invention, in the case that the determined adjustment action type is an increase operation, the step S230 may include the following steps:
increasing the rows or the columns with the corresponding number according to the determined type and the adjustment number of the adjustment objects;
the format of the new added line is determined according to the format of the adjacent line of the new added line, the adjacent line of the new added line is determined according to a preset first rule, and the adjacent line of the new added line comprises: one row at the lower side of the new row or one row at the upper side of the new row;
determining the format of the new added column according to the format of the adjacent column of the new added column, determining the adjacent column of the new added column according to a preset second rule, wherein the adjacent column of the new added column comprises: the column to the left of the newly added column, or the column to the right of the newly added column.
It can be understood that, the spreadsheet created by the user using the spreadsheet software may set various formats according to actual requirements, and it may be expected that the format of the new added row or new added column is consistent with the format of the original row or column of the spreadsheet, so that the user may be prevented from editing the format of the new added row or new added column, and time is saved. The format of the new added row can be determined according to the format of the adjacent row of the new added row, and the format of the new added column can be determined according to the format of the adjacent column of the new added column.
If the new added line is between the 2 nd and 3 rd lines of the current spreadsheet according to the determination result of the adjustment object type, the adjustment action type, and the adjustment amount in step S220, the format of the new added line may be the same as the format of the 2 nd line or the same as the format of the 3 rd line. The specific determination can be performed according to a preset rule.
By applying the technical scheme provided by the embodiment of the invention, when a user needs to adjust the row and column areas of the electronic form, the adjustment quantity is determined by displaying the adjustment quantity inquiry interface to the user and inputting or selecting the corresponding numerical value on the adjustment quantity inquiry interface by the user, the determined adjustment quantity is in accordance with the actual requirement of the user, corresponding addition and deletion operations can be completed without repeated adjustment of the user, the use of the electronic form is facilitated, and the user experience can be improved.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a device for adjusting rows and columns of an electronic form, as shown in fig. 6, where the device is used to implement addition or deletion of rows and columns of an electronic form, and may include the following modules:
a receiving module 510, configured to receive a trigger operation for adjusting a row and column area of a current spreadsheet by a user;
a determining module 520, configured to determine an adjustment object type, an adjustment action type, and an adjustment number;
an adjusting module 530, configured to adjust a row and column area of the current spreadsheet according to the determination result of the determining module;
wherein,
the determining module 520 is specifically configured to: determining that the number of rows needs to be adjusted currently or the number of columns needs to be adjusted currently;
the determining module 520 is specifically configured to: determining that an adding operation or a deleting operation is required to be carried out at present;
the determining module 520 is specifically configured to: displaying an adjusting quantity inquiry interface; and determining the adjustment quantity according to the numerical value input or selected by the user on the adjustment quantity inquiry interface.
In an embodiment of the present invention, the receiving module 510 is specifically configured to:
receiving a click operation of a user on a first type adjusting button of a row and column area of a current electronic form, wherein different rows and columns of the current electronic form correspond to different first type adjusting buttons respectively;
correspondingly, the determining module 520 is specifically configured to:
and determining the type of the adjustment object according to the corresponding relation between the first type of adjustment button clicked by the user and the line and row of the current spreadsheet.
In an embodiment of the present invention, the determining module 520 is specifically configured to:
displaying an adjustment action type option corresponding to a first type of adjustment button clicked by the user;
and determining the adjustment action type according to the selection of the user in the adjustment action type option.
In an embodiment of the present invention, the receiving module 510 is specifically configured to:
receiving the clicking operation of a user on a second type of adjusting buttons of a row and column area of the current electronic form, wherein different rows and columns of the current electronic form correspond to different second type of adjusting buttons respectively;
correspondingly, the determining module 520 is specifically configured to:
determining the type of an adjusting object according to the corresponding relation between the second type of adjusting button clicked by the user and the line and row of the current spreadsheet;
determining the number of times of clicking the second type of adjusting button by the user according to the clicking operation of the user;
and determining the type of the adjusting action according to the relation between the preset click times and the type of the adjusting action.
In an embodiment of the present invention, the determining module 520 is specifically configured to:
displaying an adjustment quantity selection interface, wherein the adjustment quantity selection interface comprises at least one option, and each option provides a combination of an adjustment quantity and an adjustment action type for a user;
and determining the type of the adjustment action and determining the adjustment quantity according to the selection of the user on the adjustment quantity selection interface.
In an embodiment of the present invention, the adjusting module 530 is specifically configured to:
under the condition that the determined adjustment action type is the adding operation, adding a corresponding number of rows or adding a corresponding number of columns according to the determined adjustment object type and the adjustment number;
the format of the new added line is determined according to the format of the adjacent line of the new added line, the adjacent line of the new added line is determined according to a preset first rule, and the adjacent line of the new added line comprises: one row at the lower side of the new row or one row at the upper side of the new row;
determining the format of the new added column according to the format of the adjacent column of the new added column, determining the adjacent column of the new added column according to a preset second rule, wherein the adjacent column of the new added column comprises: the column to the left of the newly added column, or the column to the right of the newly added column.
By applying the device provided by the embodiment of the invention, when a user needs to adjust the row and column areas of the electronic form, the adjustment quantity inquiry interface is displayed to the user, the user inputs or selects the corresponding numerical value on the adjustment quantity inquiry interface to determine the adjustment quantity, the determined adjustment quantity is in accordance with the actual requirement of the user, the corresponding adding and deleting operations can be completed without the repeated adjustment of the user, the use of the device is facilitated, and the user experience can be improved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.