Data table structure and calculation method for mathematical calculations of irregular cells5933833Abstract A table structure for table calculation software is employed to prepare an aggregate table and a numeric table by displaying ruled lines. A table structure is provided with which the degree of freedom for the designing of a table can be increased and table calculations can be easily performed. A data table structure, for a table having an irregular shape wherein a plurality of cells having different sizes are formed. Cell data areas store input data in the plurality of cells. Coordinate data areas, in addition to the cell data areas, store coordinate data for defining locations and sizes of input areas of the plurality of cells in the table. Claims I claim: Description FIELD OF THE INVENTION
______________________________________
Coordinate Data Cell Data
______________________________________
(A1) .fwdarw.
›1!
(B1) .fwdarw.
›2!
(C1) .fwdarw.
›3!
(D1), (D2) .fwdarw.
›4!
(A2), (B2), (A3), (B3)
.fwdarw.
›5!
(C2), (C3) .fwdarw.
›6!
(D3) .fwdarw.
›7!
______________________________________
When, for example, data is entered in the cell data area for cell number ›1! in the table on a display device, the entry in the cell with the cell number ›1! is identified by using the location data for the coordinate data (A1) that defines the cell with the cell number ›1!, and the input data is stored as character data in the cell data area with the cell number ›1!. When, for example, data is entered in the area of the cell with the cell number ›5!, the entry of the data in the cell with the cell number ›5! is identified by using location data for any of the coordinate data (A2), (A3), (B2) or (B3), which together describe the cell with the cell number ›5!, and the input data is stored as character data in the cell data area with the cell number ›5!. As is described above, the feature of the present invention is that, in addition to cell data for each cell, coordinate data is prepared for defining the location and the size of the input area for each cell in a table having an irregular shape and wherein are formed a plurality of differently sized cells. If, in the table in FIG. 1, the cell with the cell number ›1! is extended in the direction of the columns to a location where the coordinate data (A2) is covered while its width in the direction of the rows is maintained (see FIG. 5), the relationship between the coordinate data and the cell data is as follows.
______________________________________
Coordinate Data Cell Data
______________________________________
(A1), (A2) .fwdarw.
›1!
(B1) .fwdarw.
›2!
(C1) .fwdarw.
›3!
(D1), (D2) .fwdarw.
›4!
(B2), (A3), (B3) .fwdarw.
›5!
(C2), (C3) .fwdarw.
›6!
(D3) .fwdarw.
›7!
______________________________________
This indicates that only the location and size of a predetermined cell is altered while the contents of the other cell data areas is not changed. In addition, when one column is inserted between cells with the cell number ›2! and ›5! and the cells with the cell number ›3! and ›6!, and when the cell number of the inserted column is ›8!, (C1), (C2) and (C3) are employed as coordinate data for cell number ›8!, as is shown in FIG. 7, and the numbers for the following columns of coordinate data are shifted. The relationship between the coordinate data and the cell data is as follows:
______________________________________
Coordinate Data Cell Data
______________________________________
(A1) .fwdarw.
›1!
(B1) .fwdarw.
›2!
(C1), (C2), (C3) .fwdarw.
›8!
(D1) .fwdarw.
›3!
(E1), (E2) .fwdarw.
›4!
(A2), (B2), (A3), (B3)
.fwdarw.
›5!
(D2), (D3) .fwdarw.
›6!
(E3) .fwdarw.
›7!
______________________________________
This indicates that no changes are effected in the cell data except in the data for the inserted cell (the cell with the cell number ›8!), and only the location and the size of the inserted cell and the locations of the cells that were shifted due to the insertion of the cell are changed. As is described above, according to the present invention, since coordinate data for defining the location and the input area size of each cell in a table is prepared in addition to the cell data for each cell, it is easy, even for an irregularly shaped table with a plurality of differently sized cells, to enter data in each cell, and to vary the sizes of the cells or to add or to insert a new cell. In addition, though such processes are performed, the character data for each cell is not affected. A table calculation method using a table structure according to the present invention will now be explained while referring to FIGS. 8 and 9. The table calculation method is different from the conventional method employed to cope with the above described table that has the structure of the present invention. Since one or more sets of coordinate data define the location and the size of a cell, a plurality of coordinate data share the same cell data. Therefore, if the conventional calculation method is used, the character data may be repeatedly calculated for the same cell data. An irregular table structure like the table structure of the present invention, as well as the conventional table calculation software, requires a special process to employ a calculation expression, such as SUM (A2:E2), for calculating the sub-total in the second row, for example. When the same table structure as the conventional one in FIG. 8, i.e., the regular table structure, is prepared based on the present invention, the sub-total in the second row can be acquired in the same manner as it is using the conventional method, i.e., SUM (A2:E2)=A2+B2+C2+D2+E2. When values 5, 3 and 1 are entered in three cells in the second row in the table shown in FIG. 9, however, since the same cell number, ›7!, that is stored in coordinate data areas (B2), (C2) and (D2), three of the corresponding character data are overlapped. In the first embodiment of the present invention, when the same cell number appears in a plurality of coordinate data areas in a row or in a column, the coordinate data is eliminated from calculations, such as for acquiring the subtotal of the row or the column where a plurality of coordinate data areas hold the same cell number, so that an expression, SUM (A2:E2), can be employed with which a user is conventionally familiar. According to the first embodiment of the present invention, specific examples of the present invention and comparison examples using the conventional technique will now be described. EXAMPLE 1 FIG. 10(A) is a diagram showing an example table that has irregularly divided cells. Expression "SUM (A2:B2)" is stored as character data in the cell data area with the cell number ›7!, and "15" (A2+B2=5+10=15) is displayed as the result of table calculation. Expression SUM (A3:B3) is stored as character data in the cell data area with the cell number ›8!, and 18 (A3+B3=8+10=18) is displayed as the result of table calculation. In this manner, character data is provided as cell data in the cells that are actually displayed, and is provided separately from the cell data, with table calculation being performed by using only coordinate data, so that calculation for a table having an irregular table structure can be easily performed. Comparison Example 1 According to table calculation performed using conventional table calculation software, as is shown in FIG. 10(B), when value 10 is entered only in cell B2, the subtotal of cell C3 in the direction of the rows must be acquired by manual calculation, or by performing a complicated calculation, such as SUM (A3, B2). When, as is shown in FIG. 10(C), the same value, 10, is entered in cells B2 and B3, even though the sub-total in the direction of the rows can be calculated, the calculation of the sub-total in column B is complicated by the need to avoid repeated calculations using the same value. Further, since a meaningless value is displayed in cell B3 in the prepared table, the utility value of the table is reduced. EXAMPLE 2 FIGS. 11(A) and 11(B) are diagrams illustrating a second example according to the present invention. In FIG. 11(A), in the cell data with the cell number ›3! is stored, as character data, expression "Min (A1:B1)", which is the minimum value of the values that are input to the cells with the cell number ›1! and ›2!. In the cell data with the cell number ›5! is stored, as character data, expression "Min (A2:B2)", which is the minimum value of the values that are input to the cells with the cell number ›1! and ›4!. As is described in the first embodiment, these calculations can be performed with the present invention. Even when, as is shown in FIG. 11(B), Values 10 and 15 are input to the cells with the cell number ›6! and ›7!, which are created by adding a column between columns A and B, character data in the cells with the cell number ›3! and ›5!, which were shifted to the right in response to the insertion of a column, are changed to "Min (A1:C1)" and "Min (A2:C2)" in the same manner as the conventional method. As a result, correct calculation results 10 and 15 can be displayed in the cells with the cell number ›3! and cell number ›5!. Comparison Example 2 According to table calculation performed by using the conventional table calculation software, as is shown in FIG. 11(C), the limited expression "Min (A1, B2)", with which only a comparison of A1 with B2 is performed, has to be defined in cell C2. After a column is inserted, therefore, the expression must be re-defined to obtain correct results. A second embodiment of the present invention will now be explained while referring to FIGS. 12 and 13. In this embodiment, a diagonal ruled line is drawn in a cell, and the upper portion and the lower portion of the cell are employed as independent cells. As is shown in FIG. 12, the inclinations of diagonal ruled lines are arbitrary. Suppose that in FIG. 12, cells in which diagonal ruled lines are not yet drawn are cells ›1!, ›2!, ›3! and ›4!. When the diagonal ruled line is then drawn in cell ›3!, the obtained cell portion above the diagonal ruled line is regarded as cell ›3! and the lower cell portion is regarded as cell ›3'!. Similarly, when the diagonal ruled line is drawn in the cell ›4!, the obtained cell portion above the diagonal ruled line is regarded as cell ›4! and the lower cell portion is regarded as cell ›4'!. The relationship between coordinate data and cell data is as follows.
______________________________________
Upper and
Coordinate Data Cell Data Lower Cell
______________________________________
Data
(A1) .fwdarw.
›1!
(B1) .fwdarw.
›2!
(A2U) .fwdarw.
›3! .fwdarw.
›3!
(A2L) .fwdarw.
›3'!
(B2U) .fwdarw.
›4! .fwdarw.
›4!
(B2L) .fwdarw.
›4'!
______________________________________
As the cell data, in addition to those items in FIG. 2, diagonal ruled line data that describe the provision of diagonal ruled lines, and upper and lower cell data concerning the areas above and below the diagonal ruled lines are provided, as is shown in FIG. 13. The upper cell data and the lower cell data that are newly prepared include the contents shown in FIG. 2. With this structure, cell data that is independent of coordinate data can be stored in consonance with their cell numbers in cells divided by diagonal ruled lines. The table structure for table calculation and the table calculation method can be provided as are explained in the first embodiment. According to the second embodiment of the present invention, specific examples of the present invention and comparison examples for which the conventional technique was used will be explained. EXAMPLE 3 FIG. 14(A) shows a table in which diagonal ruled lines are drawn across cells that are arranged in the direction of the row. In the lower cell with the cell number ›2'! is displayed value 15, which is obtained by adding value 10 in cell ›1! to value 5 in the upper cell ›2!. In the lower cell with the cell number ›3'! is displayed value 20, which is obtained by adding value 15 in the lower cell ›2'! to value 5 in the upper cell ›3!. The expression stored in the lower cell data with the cell number ›2'! is "SUM (A1, B1U)", and the expression stored in the lower cell data with the cell number ›3'! is "SUM (B1L, C1U)". Comparison Example 3 It is impossible for conventional table calculation software to draw diagonal lines in a cell. As is shown in FIG. 14(B), therefore, the cells for two rows are prepared as substitute means by which to perform table calculation, so that it is difficult for that data to be visually and intuitively understood from the table wherein the calculation results are shown. EXAMPLE 4 FIG. 15(B) shows a table in which ruled lines are drawn diagonally in cells arranged in a column. In the lower cell with the cell number ›2'! is displayed value 15, which is obtained by adding value 10 in cell ›1! to value 5 in the upper cell ›2!, which is defined by the diagonal ruled line. In the lower cell with the cell number ›3'! is displayed value 10, which is obtained by adding value 15 in the lower cell ›2'! to value -5 in the upper cell ›3!. The expression that is stored in the lower cell with the cell number ›2'! is "SUM (A1, A1U)", and the expression that is stored in the lower cell with the cell number ›3'! is "SUM (A2L, A3U)". Comparison Example 4 In this example, as well as in comparison example 3, it is impossible for conventional table calculation software to draw diagonal lines in a cell. Even if, as is shown in FIG. 15(B), table calculation is performed with cells A3 and A4, and A5 and A6 as sets, it is difficult for that data to be visually and intuitively understood from the resulting table. As is apparent from the above explanation, according to the present invention, the table shown in FIG. 18 can be easily prepared and table calculations can thus be performed easily. According to the present invention, since a plurality of coordinate data can define a single cell and character data can be stored independently as cell data in the cell, the characters for "Basic Charges" can be displayed vertically in cells that are described by the coordinate data (A1) and (A2), as is shown by the cell in FIG. 16(A). According to the conventional method, a new cell must be formed for only one character, as is shown in FIG. 16(B), and as a result, an additional row must be inserted between the existing ones. The methods and the forms used for storing coordinate data, cell data and upper and lower cell data are not limited to those in the first and second embodiment, and various modifications may be applied. In the above embodiments, when a ruled line is drawn diagonally in a cell, stored data for cell data and upper cell data are overlapped for the sake of convenience. However, for simplification, the upper cell data can be included in the cell data. Although the methods used for table structure and table calculation have been explained together in the above embodiments, the present invention can be applied for the preparation of a table for which no "calculation" is included, and for the input of data. Although the present invention has been described with respect to a specific preferred embodiment thereof, various changes and modifications may be suggested to one skilled in the art, and it is intended that the present invention encompass such changes and modifications as fall within the scope of the appended claims.
|
Same subclass Same class Consider this |
||||||||||
