Data processing method, device, electronic device and storage medium
By parsing and converting conditional format parameter data in Excel tables, the problem of parsing data bars and icon sets in online tables is solved, achieving the integrity and consistency of data import and export, and ensuring the correct display of user data.
Patent Information
- Application Number
- CN202210295024.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-23
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-03-23
Smart Images

Figure CN114662463B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method, device, electronic device and storage medium. Background Art
[0002] A table is a commonly used electronic document in daily life. The commonly used table is the Excel table, which is a non-online table. With the development of cloud technology, online tables have emerged, which facilitates multi-user collaborative work.
[0003] When converting an Excel spreadsheet to an online spreadsheet, some special format contents in Excel cannot be converted, resulting in missing or garbled contents in the generated online spreadsheet. Summary of the invention
[0004] The present disclosure provides a data processing method, device, electronic device and storage medium.
[0005] The present disclosure adopts the following technical solutions.
[0006] In some embodiments, the present disclosure provides a data processing method, including:
[0007] Parsing the first table and the extended structure of the first table, and acquiring parameter data of the preset conditional format in the first table from the first table and the extended structure;
[0008] According to the parameter data of the preset conditional format, converting the preset conditional format into a conditional format corresponding to the preset conditional format in a second table;
[0009] The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
[0010] In some embodiments, the present disclosure provides a data processing method, including:
[0011] Parsing the second table, and obtaining parameter data of a preset conditional format in the second table from the second table;
[0012] According to the parameter data of the preset conditional format, converting the preset conditional format in the second table into data in the first table and / or the extended structure of the first table;
[0013] The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
[0014] In some embodiments, the present disclosure provides a data processing device, including:
[0015] A parsing unit, used for parsing the first table and the extended structure of the first table, and obtaining parameter data of the preset conditional format in the first table from the first table and the extended structure;
[0016] a conversion unit, configured to convert the preset conditional format into a conditional format corresponding to the preset conditional format in a second table according to parameter data of the preset conditional format;
[0017] The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
[0018] In some embodiments, the present disclosure provides a data processing device, including:
[0019] A parsing unit, used for parsing the second table, and obtaining parameter data of a preset conditional format in the second table from the second table;
[0020] a conversion unit, configured to convert the preset conditional format in the second table into data in the first table and / or an extended structure of the first table according to parameter data of the preset conditional format;
[0021] The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
[0022] In some embodiments, the present disclosure provides an electronic device, comprising: at least one memory and at least one processor;
[0023] The memory is used to store program codes, and the processor is used to call the program codes stored in the memory to execute the above method.
[0024] In some embodiments, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and when the program code is executed by a processor, the processor is prompted to perform the above method.
[0025] The data processing method provided by the embodiment of the present disclosure parses a first table and an extended structure of the first table, obtains parameter data of a preset conditional format in the first table from the first table and the extended structure; and converts the preset conditional format into a conditional format corresponding to the preset conditional format in a second table according to the parameter data of the preset conditional format, thereby solving the problem of conditional format mismatch when importing data from a non-online table into an online table, improving the functional integrity of importing and exporting data bars and icon sets, and ensuring that user data can be displayed correctly. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0027] Figure 1 It is a flow chart of a data processing method according to an embodiment of the present disclosure.
[0028] Figure 2 It is a schematic diagram of a data bar according to an embodiment of the present disclosure.
[0029] Figure 3 It is a schematic diagram of an icon set according to an embodiment of the present disclosure.
[0030] Figure 4 It is a flow chart of a data processing method according to an embodiment of the present disclosure.
[0031] Figure 5 is a schematic diagram of an icon set of a first table according to an embodiment of the present disclosure.
[0032] Figure 6 is a schematic diagram of an icon set of a second table according to an embodiment of the present disclosure.
[0033] Figure 7 4 is a diagram of the correspondence between the icon set of the first table and the icon set of the second table in an embodiment of the present disclosure.
[0034] Figure 8 It is a flow chart of a data processing method according to an embodiment of the present disclosure.
[0035] Fig. 9 It is a flow chart of a data processing method according to an embodiment of the present disclosure.
[0036] Fig.10 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0037] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0038] It should be understood that the various steps described in the method embodiments of the present disclosure can be performed in sequence and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0039] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0040] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0041] It should be noted that the modification of “one” mentioned in the present disclosure is illustrative rather than restrictive, and those skilled in the art should understand that it should be understood as “one or more” unless otherwise clearly indicated in the context.
[0042] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0043] The solution provided by the embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0044] Spreadsheets, also known as electronic data sheets or table documents, are usually composed of cells arranged in rows and columns. Commonly used non-online tables are, for example, Excel tables. With the development of cloud technology, online tables have emerged. During use, there is a need to import non-online tables into online tables, or export online tables to non-online tables. For such import and export situations, the text and numbers in the table can usually be imported and exported normally, but the tools used in the prior art to parse Excel files do not support the parsing of data bars and icon sets in conditional formats, resulting in some difficulties in importing and exporting conditional formats in tables. Data bars are a type of conditional format in Excel files, please refer to Figure 2 , data bars are usually arranged horizontally like bar charts, which are used to visually observe the vertical size of the selected area. Icon sets are also a type of conditional format in Excel files, please refer to Figure 3 Icons are usually used to indicate the size relationship of the values in cells. For example, the value of a cell is compared with the values of other cells to decide which icon to use for display.
[0045] When importing an Excel table into an online table, or exporting from an online table to an Excel table, this part of the data needs to be parsed. Since importing and exporting handle XML tags differently, two data structures need to be designed. One is to parse the extended structure into specific data when importing, and the other is to serialize the specific data into a string when exporting.
[0046] In the embodiment of the present application, a data processing method is proposed to at least partially solve the above problems, such as Figure 1 As shown, Figure 1 It is a flowchart of the data processing method of the embodiment of the present disclosure, which includes the following parsing steps and conversion steps.
[0047] S11: parsing the first table and the extended structure of the first table, and acquiring parameter data of the preset conditional format in the first table from the first table and the extended structure.
[0048] In some embodiments, the data processing method is used to import the data in the first table into the second table, and the data can be imported using a tool. The first table is a non-online table, such as an Excel table. The extended structure of the first table can be used to store the parameter data of the preset conditional format of part of the first table. The preset conditional format includes a data bar and / or an icon set, that is, the preset conditional format can be one or both of the data bar and the icon set. The two conditional formats of the data bar and the icon set need to be parsed. For the data bar, its negative value color and data type are stored in the extended structure. Therefore, for the data bar, part of its parameter data is stored in the first table, and the other part of the parameter data is stored in the extended structure. In some embodiments, for the icon set, there are three types stored in the extended structure, and other types of icon sets are stored in the first table. Therefore, when the preset conditional format includes an icon set, it can be determined according to the type of the icon set whether to obtain the parameter data from the first table or the extended structure. In some embodiments, the parameter data may include the value, type, and display style corresponding to the preset conditional format.
[0049] S12: According to the parameter data of the preset conditional format, convert the preset conditional format into a conditional format corresponding to the preset conditional format in the second table.
[0050] In some embodiments, the second form is an online form. The online form is usually stored in a server and is usually used for collaborative processing between different users through online cooperation. The online form also has conditional formats, but the conditional formats in the online form are not necessarily exactly the same as the conditional formats in the non-online form, but a corresponding relationship is set. Therefore, according to the parameter data of the preset conditions, the conditional format in the second table corresponding to the preset conditional format can be determined according to the preset corresponding relationship. In some embodiments, the data bars in the first table correspond to the data bars in the second table, and the icon set in the first table corresponds to the icon set in the second table. The color, shape, numerical range and other display styles of the conditional format in the first table can be determined according to the parameter data. In some embodiments, the shape of the conditional format in the second table corresponding to the preset conditional format can be determined first, and then the color, size and other display styles of the conditional format in the second table can be determined according to the parameter data.
[0051] In some embodiments of the present disclosure, considering that it is impossible to provide a parsing method for the two conditional formats of data bars and icon sets when a non-online form is imported into an online form, for the preset conditional format, its parameter data is obtained from the first table and the extended structure, and the preset conditional format is imported into the second table according to the parameter data, thus solving the problem that the conditional format conversion cannot be completely performed when importing data.
[0052] In some embodiments of the present disclosure, step S11 includes: traversing the conditional format in the first table; if the conditional format in the first table is a data bar, obtaining first data bar parameter data of the data bar from the first table, and obtaining second data bar parameter data of the data bar from the extended structure; step S12 includes: converting the data bar in the first table into a data bar in the second table according to the first data bar parameter data and the second data bar parameter data.
[0053] In some embodiments, when traversing the conditional formats in the first table, for the traversed conditional formats, it can be first determined whether the conditional format is a data bar. For the data bar, part of its parameter data is stored in the first table, and the other part is stored in the extended structure. Therefore, when the traversed conditional table is a data bar, the first data bar parameter data of the traversed conditional table in the first table is obtained, and the second data bar parameter data of the traversed conditional table in the extended structure is obtained from the extended structure. The parameter data of the conditional format includes the first data bar parameter data and the second data bar parameter data. When converting the data bar into the data bar of the second table, it is necessary to convert the data bar into the data bar in the second table according to the first data bar parameter data and the second data bar parameter data.
[0054] In some embodiments of the present disclosure, step S11 includes: traversing the conditional formats in the first table; if the conditional format in the first table is an icon set, obtaining icon set parameter data of the icon set from the first table; step S12 includes: according to the icon set parameter data obtained in the first table, converting the icon set in the first table into an icon set in the second table according to preset rules.
[0055] In some embodiments, the conditional formats in the first table are traversed. For the traversed conditional formats, it can be determined whether the conditional format is a data bar first, and then whether the conditional format is an icon set. For the chart set, the parameter data of some types of icon sets are stored in the first table, and the parameter data of other types of icon sets are stored in the extended structure. Therefore, the icon set obtained from the first table can obtain the parameter data of the icon set, that is, the icon set parameter data, from the first table. When converting the icon set in the first table to the icon set in the second table, the conversion is performed according to the icon set parameter data, and the preset rule can be a preset mapping relationship between the icon set in the first table and the icon set in the second table.
[0056] In some embodiments of the present disclosure, before traversing the conditional format of the first table, it also includes: parsing the extended structure, recording the identifier and associated data of the preset conditional format in the extended structure. Obtaining the second data bar parameter data of the data bar from the extended structure includes: obtaining the second data bar parameter data of the data bar from the recorded associated data according to the identifier of the data bar.
[0057] In some embodiments, before traversing the conditional format of the first table, the extended structure is first parsed in the parsing step to record the identifiers and associated data of the data bar and the icon set. Afterwards, when the data bar in the first table is obtained, the identifier of the traversed data bar is recorded, and then, based on the identifier, the second data bar parameter data corresponding to the identifier is obtained from the associated data obtained in the recorded extended structure. In this way, by obtaining the identifier and associated data in advance, the amount of data that needs to be searched when obtaining the second data bar parameter data later is reduced.
[0058] In some embodiments, the first data bar parameter data includes: the positive color of the data bar, whether the data bar is hidden, whether it is a gradient color, the maximum value of the data bar, and the minimum value of the data bar. In some embodiments, the second data bar parameter data includes: the negative color of the data bar. In some embodiments, the icon set parameter data includes: the type and associated parameters of the icon set, and the associated parameters may include, for example, the type, size, color, etc. of the icon set.
[0059] In some embodiments of the present disclosure, step S11 includes: traversing the icon set of the extended structure and obtaining icon set parameter data of the icon set in the extended structure; step S12 includes: converting the icon set in the extended structure into an icon set in a second table according to the icon set parameter data obtained in the extended structure and preset rules.
[0060] In some embodiments, the extended structure has an icon set of a preset type, and the first table has an icon set of a non-preset type. Icon set parameter data of the preset type of icon set is obtained from the extended structure, and the preset rules describe the mapping relationship between the icon sets in the first table and the second table. Then, based on the pre-set preset rules, the icon set type corresponding to the preset type of icon set in the second table can be determined, and then the color, size and other related parameters of the icon set in the second table are set according to the icon set parameter data.
[0061] In order to better illustrate the method proposed in the embodiment of the present disclosure, a specific embodiment is proposed below. In this embodiment, the first table can be an Excel table, and the second table can be an online table. Please refer to Figure 4 . When importing the data of the first table into the second table, considering that the data bar and icon set in the first table do not provide a parsing method in the tool, the extended structure of the first table is parsed first, and the identifiers and associated data of the data bar and icon set are recorded. Then, the first table is traversed in a loop to determine whether the traversed conditional format is a data bar. If the traversed conditional format is a data bar, the first data bar parameter data of the data bar in the first table is parsed, including positive color, whether the data bar is hidden, whether it is a gradient color, the minimum value and the maximum value. According to the identifier of the traversed data bar, the second data bar parameter data of the data bar is read from the associated data of the extended structure, such as the color of the negative value. If the traversed conditional format is an icon set, the icon set parameter data of the icon set in the first table, such as the type and related parameters, is read and converted to the icon set of the second table. After the loop traversal is completed, the icon set in the extended structure is traversed, and the icon set parameter data of the icon set in the extended structure, such as the type and related parameters, is read, and the icon set in the extended structure is converted to the icon set of the second table. For icon sets, when importing the icon sets of the first table into the second table, the mapping relationship between the two, i.e. the preset rules, needs to be considered. Figure 5 and Figure 6The icon sets in the first table (left side in the figure) and the second table (right side in the figure) are schematically shown respectively. The icon sets in the first table and the second table can be divided into direction, shape, mark, and level. For the direction icon set, one-to-one correspondence can be achieved. For the shape icon set, when the data of the first table is imported into the second table (import), if there is no corresponding style in the second table, the default is to use the basic three-color circle for correspondence. When the data in the second table is exported to the first table (export), if there is no corresponding style in the first table, the default is to use the five-color arrow of the direction class. For the mark class, in the import type, if the second table does not have a corresponding style, the default corresponding style is "X", "!" and "√". In the export, if the first table does not have a corresponding style, the default corresponding style is "X" and "√". For the level class, if the second table does not have a corresponding style during import, it is converted to a five-color circle of the corresponding level. In the export, if the first table does not have a corresponding style, it is a star-shaped style.
[0062] In some embodiments of the present disclosure, a data processing method is also proposed, which can be used to export data in the second table to the first table. The data processing method in the following embodiments of the present application can be executed before or after the data processing method in the above embodiments is executed. Figure 8 The illustrated process includes a parsing step and a conversion step.
[0063] S21: parsing the second table, and obtaining parameter data of a preset conditional format in the second table from the second table.
[0064] S22: converting the preset conditional format in the second table into data in the first table and / or the extended structure of the first table according to the parameter data of the preset conditional format;
[0065] In some embodiments, the first table is a non-online table, the second table is an online table, the preset conditional format includes a data bar and / or an icon set, and the preset conditional format can be a data bar and an icon set. The first table is a non-online table, such as an Excel table, and the preset conditional format includes a data bar and / or an icon set, that is, the preset condition can be one or both of the data bar and the icon set. The tool does not provide a parsing method for the data bar and the icon set, so the two conditional formats of the data bar and the icon set need to be parsed. For the data bar, its negative value color and data type are stored in the extended structure, so for the data bar, part of its parameter data is stored in the first table, and another part of the parameter data is stored in the extended structure. In some embodiments, for the icon set, some types of icon sets are stored in the extended structure, and other types of icon sets are stored in the first table. Therefore, when the preset conditional format includes an icon set, it can be determined to export the parameter data to the first table or the extended structure according to the type of the icon set. In some embodiments, the parameter data may include the value, type, and display style corresponding to the preset conditional format.
[0066] In some embodiments of the present disclosure, considering that when an online form is exported to an offline form, the tool cannot provide a parsing method for the two conditional formats of data bars and icon sets, therefore, for the preset conditional format, reference data is obtained from the second table, and according to the different preset conditional formats, parameter data is exported to at least one of the first table and the extended structure, thereby solving the problem that the conditional format conversion cannot be completely performed when exporting data.
[0067] In some embodiments of the present disclosure, step S21 includes: traversing the conditional format in the second table, if the conditional format in the second table is a data bar, obtaining first data bar parameter data and second data bar parameter data of the data bar from the second table, step S22 includes: according to the first data bar parameter data, converting the data bar in the second table into the data bar of the first table, and converting the second data bar parameter data into associated data in the extended structure.
[0068] In some embodiments, the conditional formats in the second table are traversed. For the traversed conditional formats, it can be determined whether the conditional formats are data bars. For data bars, part of the parameter data is stored in the first table, and the other part is stored in the extended structure. Therefore, when the traversed conditional table is a data bar, the first data bar parameter data and the second data bar parameter data of the traversed conditional table in the second table are obtained, and then output to the first table and the extended structure respectively.
[0069] In some embodiments of the present disclosure, step S21 includes: traversing the conditional formats in the second table, and if the conditional format in the second table is an icon set, obtaining icon set parameter data of the icon set from the second table; step S22 includes: according to the icon set parameter data and the type of the icon set, converting the icon set in the second table into an icon set in the second table according to preset rules, or converting the icon set in the second table into associated data in an extended structure.
[0070] In some embodiments, the conditional formats in the second table are traversed. For the traversed conditional formats, it can be determined whether the conditional format is a data bar first, and then whether the conditional format is an icon set. For the chart set, the parameter data of some types of icon sets are stored in the first table, and the parameter data of other types of icon sets are stored in the extended structure. Therefore, the icon set obtained from the second table can obtain the parameter data of the icon set, that is, the icon set parameter data, from the second table. According to the type of icon set, it is determined whether it needs to be exported to the first table or the extended structure.
[0071] In some embodiments of the present disclosure, converting a data bar in a second table into a data bar in a first table includes: generating an identifier of the data bar in the first table; converting parameter data of the second data bar into associated data in an extended structure, including: setting an association relationship between the identifier of the data bar and the associated data in the extended structure.
[0072] In some embodiments, while traversing the conditional formats of the second table, the identifier corresponding to the preset format is recorded, so that the data bar in the first table can be associated with the data bar in the extended structure through the identifier.
[0073] In some embodiments, the first data bar parameter data includes: the positive color of the data bar, whether the data bar is hidden, whether it is a gradient color, the maximum value of the data bar, and the minimum value of the data bar; in some embodiments, the second data bar parameter data includes: the negative color of the data bar; in some embodiments, the icon set parameter data includes: the type and associated parameters of the icon set.
[0074] In some embodiments of the present disclosure, the icon set in the second table is converted into the icon set in the first table according to the icon set parameter data and the type of the icon set, or the icon set in the second table is converted into the associated data in the extended structure, including: if the type of the icon set is a preset type, the icon set in the second table is converted into the associated data in the extended structure according to the icon set parameter data and preset rules; if the type of the icon set is a non-preset type, the icon set in the second table is converted into the icon set in the first table.
[0075] In some embodiments, a preset type of icon set is stored in the extended structure, and a non-preset type of icon set is stored in the first table. The icon sets in the first table and the second table may not be exactly the same. Therefore, the mapping relationship between the icon sets in the first table and the extended structure and the icon sets in the second table is described by preset rules, and then the icon set type corresponding to the preset type of icon set in the first table and the extended structure can be determined based on the pre-set preset rules, and then the color, size and other related parameters of the icon set in the first table and the extended structure are set according to the icon set parameter data.
[0076] In order to better illustrate the method proposed in the embodiment of the present disclosure, the following Fig. 9 A specific embodiment is proposed. When exporting data from a second table, the conditional format of the second table is first traversed. If the conditional format is a data bar, the first data bar parameter data and the second data bar parameter data are obtained according to the parameter data of the conditional format of the second table, including positive color, whether to hide the data bar, whether it is a gradient color, the minimum value and the maximum value. The first data bar parameter data is converted into a data bar in the first table, and the second data bar parameter data is converted into associated data in an extended structure. The id (identifier) and the color of the negative value are set in the extended structure data of the first table. If the conditional format is an icon set, the corresponding icon set type and parameter data are obtained according to the type conversion rule of the icon set. Specifically, if the icon set is one of the preset types, the icon set is converted into the associated data of the extended structure and set in the extended structure of the first table. Otherwise, the icon set in the second table is converted into the icon set in the first table.
[0077] The present disclosure also provides a data processing device, including:
[0078] A parsing unit, used for parsing the first table and the extended structure of the first table, and obtaining parameter data of the preset conditional format in the first table from the first table and the extended structure;
[0079] a conversion unit, configured to convert the preset conditional format into a conditional format corresponding to the preset conditional format in a second table according to parameter data of the preset conditional format;
[0080] The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
[0081] In some embodiments, the present disclosure provides a data processing device, including:
[0082] A parsing unit, used for parsing the second table, and obtaining parameter data of a preset conditional format in the second table from the second table;
[0083] a conversion unit, configured to convert the preset conditional format in the second table into data in the first table and / or an extended structure of the first table according to parameter data of the preset conditional format;
[0084] The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
[0085] For the embodiments of the device, since they basically correspond to the method embodiments, the relevant parts refer to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the modules described as separation modules may or may not be separated. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present embodiment. Those of ordinary skill in the art can understand and implement without paying creative work.
[0086] The method and device of the present disclosure are described above based on the embodiments and application examples. In addition, the present disclosure also provides an electronic device and a computer-readable storage medium, which are described below.
[0087] Reference below Fig.10 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 800 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in the figure is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present disclosure.
[0088] The electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0089] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although the electronic device 800 with various devices is shown in the figure, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.
[0090] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0091] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0092] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0093] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0094] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method of the present disclosure.
[0095] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0096] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0097] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0098] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0099] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0100] According to one or more embodiments of the present disclosure, a data processing method is provided, including:
[0101] Parsing the first table and the extended structure of the first table, and acquiring parameter data of the preset conditional format in the first table from the first table and the extended structure;
[0102] According to the parameter data of the preset conditional format, converting the preset conditional format into a conditional format corresponding to the preset conditional format in a second table;
[0103] The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
[0104] According to one or more embodiments of the present disclosure, a data processing method is provided, which parses a first table and an extended structure of the first table, and obtains parameter data of a preset conditional format in the first table from the first table and the extended structure, including: traversing the conditional formats in the first table; if the conditional format in the first table is the data bar, obtaining first data bar parameter data of the data bar from the first table, and obtaining second data bar parameter data of the data bar from the extended structure;
[0105] According to the parameter data of the preset conditional format, the preset conditional format is converted into a conditional format corresponding to the preset conditional format in a second table, including: according to the first data bar parameter data and the second data bar parameter data, the data bar in the first table is converted into a data bar in the second table.
[0106] According to one or more embodiments of the present disclosure, a data processing method is provided, which parses a first table and an extended structure of the first table, and obtains parameter data of a preset conditional format in the first table from the first table and the extended structure, including: traversing the conditional formats in the first table; if the conditional format in the first table is an icon set, obtaining icon set parameter data of the icon set from the first table;
[0107] According to the parameter data of the preset conditional format, the preset conditional format is converted into a conditional format corresponding to the preset conditional format in a second table, including: according to the icon set parameter data obtained in the first table, the icon set in the first table is converted into the icon set in the second table according to preset rules.
[0108] According to one or more embodiments of the present disclosure, a data processing method is provided, which, before traversing the conditional formats of the first table, further comprises: parsing the extended structure, recording the identifier and associated data of the preset conditional format in the extended structure;
[0109] The acquiring the second data stripe parameter data of the data stripe from the extended structure comprises: acquiring the second data stripe parameter data of the data stripe from the recorded associated data according to the identifier of the data stripe.
[0110] According to one or more embodiments of the present disclosure, a data processing method is provided, which satisfies at least one of the following conditions:
[0111] The first data bar parameter data includes: the positive color of the data bar, whether the data bar is hidden, whether it is a gradient color, the maximum value of the data bar, and the minimum value of the data bar;
[0112] The second data bar parameter data includes: the negative value color of the data bar;
[0113] The icon set parameter data includes: the type and associated parameters of the icon set.
[0114] According to one or more embodiments of the present disclosure, a data processing method is provided, wherein parsing a first table and an extended structure of the first table, obtaining parameter data of a preset conditional format in the first table from the first table and the extended structure comprises: traversing an icon set of the extended structure, obtaining icon set parameter data of the icon set in the extended structure;
[0115] According to the parameter data of the preset conditional format, converting the preset conditional format into a conditional format corresponding to the preset conditional format in a second table includes: according to the icon set parameter data and preset rules obtained in the extended structure, converting the icon set in the extended structure into an icon set in the second table.
[0116] According to one or more embodiments of the present disclosure, a data processing method is provided, including:
[0117] Parsing the second table, and obtaining parameter data of a preset conditional format in the second table from the second table;
[0118] According to the parameter data of the preset conditional format, converting the preset conditional format in the second table into data in the first table and / or the extended structure of the first table;
[0119] The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
[0120] According to one or more embodiments of the present disclosure, a data processing method is provided, which parses a second table and obtains parameter data of a preset conditional format in the second table from the second table, including: traversing the conditional formats in the second table, and if the conditional format in the second table is the data bar, obtaining first data bar parameter data and second data bar parameter data of the data bar from the second table;
[0121] According to the parameter data of the preset conditional format, the preset conditional format in the second table is converted into data in the first table and / or the extended structure of the first table, including: according to the first data bar parameter data, the data bar in the second table is converted into the data bar of the first table, and the second data bar parameter data is converted into the associated data in the extended structure.
[0122] According to one or more embodiments of the present disclosure, a data processing method is provided, which parses a second table and obtains parameter data of a preset conditional format in the second table from the second table, including: traversing the conditional formats in the second table, and if the conditional format in the second table is an icon set, obtaining icon set parameter data of the icon set from the second table;
[0123] According to the parameter data of the preset conditional format, the preset conditional format in the second table is converted into data in the first table and / or the extended structure of the first table, including: according to the icon set parameter data and the type of the icon set, the icon set in the second table is converted into the icon set in the second table according to preset rules, or the icon set in the second table is converted into associated data in the extended structure.
[0124] According to one or more embodiments of the present disclosure, a data processing method is provided, wherein the step of converting the data strips in the second table into the data strips in the first table includes: generating an identifier of the data strips in the first table;
[0125] Converting the second data strip parameter data into associated data in the extended structure includes: setting an associated relationship between the identifier of the data strip and the associated data in the extended structure.
[0126] According to one or more embodiments of the present disclosure, a data processing method is provided, which satisfies at least one of the following conditions:
[0127] The first data bar parameter data includes: the positive color of the data bar, whether the data bar is hidden, whether it is a gradient color, the maximum value of the data bar, and the minimum value of the data bar;
[0128] The second data bar parameter data includes: the negative value color of the data bar;
[0129] The icon set parameter data includes: the type and associated parameters of the icon set.
[0130] According to one or more embodiments of the present disclosure, a data processing method is provided, which converts the icon set in the second table into the icon set in the second table according to the icon set parameter data and the type of the icon set, or converts the icon set in the second table into associated data in an extended structure, including:
[0131] If the type of the icon set is a preset type, converting the icon set in the second table into associated data in the extended structure according to the icon set parameter data and preset rules;
[0132] If the type of the icon set is a non-preset type, the icon set in the second table is converted into the icon set in the first table.
[0133] According to one or more embodiments of the present disclosure, there is provided a data processing device, including:
[0134] A parsing unit, used for parsing the first table and the extended structure of the first table, and obtaining parameter data of the preset conditional format in the first table from the first table and the extended structure;
[0135] a conversion unit, configured to convert the preset conditional format into a conditional format corresponding to the preset conditional format in a second table according to parameter data of the preset conditional format;
[0136] The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
[0137] According to one or more embodiments of the present disclosure, there is provided a data processing device, including:
[0138] A parsing unit, used for parsing the second table, and obtaining parameter data of a preset conditional format in the second table from the second table;
[0139] a conversion unit, configured to convert the preset conditional format in the second table into data in the first table and / or an extended structure of the first table according to parameter data of the preset conditional format;
[0140] The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
[0141] According to one or more embodiments of the present disclosure, there is provided an electronic device, including: at least one memory and at least one processor;
[0142] The at least one memory is used to store program codes, and the at least one processor is used to call the program codes stored in the at least one memory to execute any one of the above methods.
[0143] According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store program code, and when the program code is executed by a processor, the processor is prompted to execute the above method.
[0144] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0145] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0146] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A data processing method, characterized in that: include: Parsing the first table and the extended structure of the first table, and acquiring parameter data of the preset conditional format in the first table from the first table and the extended structure; According to the parameter data of the preset conditional format, converting the preset conditional format into a conditional format corresponding to the preset conditional format in a second table; The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
2. The method according to claim 1, characterized in that Parsing a first table and an extended structure of the first table, and obtaining parameter data of a preset conditional format in the first table from the first table and the extended structure, including: traversing the conditional formats in the first table; if the conditional format in the first table is the data strip, obtaining first data strip parameter data of the data strip from the first table, and obtaining second data strip parameter data of the data strip from the extended structure; According to the parameter data of the preset conditional format, the preset conditional format is converted into a conditional format corresponding to the preset conditional format in a second table, including: according to the first data bar parameter data and the second data bar parameter data, the data bar in the first table is converted into a data bar in the second table.
3. The method according to claim 1, characterized in that Parsing a first table and an extended structure of the first table, and obtaining parameter data of a preset conditional format in the first table from the first table and the extended structure, including: traversing the conditional formats in the first table; if the conditional format in the first table is an icon set, obtaining icon set parameter data of the icon set from the first table; According to the parameter data of the preset conditional format, the preset conditional format is converted into a conditional format corresponding to the preset conditional format in a second table, including: according to the icon set parameter data obtained in the first table, the icon set in the first table is converted into the icon set in the second table according to preset rules.
4. The method according to claim 2 or 3, characterized in that: Before traversing the conditional formats of the first table, the method further includes: parsing the extended structure, recording the identifier and associated data of the preset conditional format in the extended structure; The acquiring the second data stripe parameter data of the data stripe from the extended structure comprises: acquiring the second data stripe parameter data of the data stripe from the recorded associated data according to the identifier of the data stripe.
5. The method according to claim 2, characterized in that: Satisfy at least one of the following: The first data bar parameter data includes: the positive color of the data bar, whether the data bar is hidden, whether it is a gradient color, the maximum value of the data bar, and the minimum value of the data bar; The second data bar parameter data includes: the negative value color of the data bar.
6. The method according to claim 3, characterized in that: The icon set parameter data includes: the type and associated parameters of the icon set.
7. The method according to claim 1, characterized in that Parsing the first table and the extended structure of the first table, and acquiring parameter data of the preset conditional format in the first table from the first table and the extended structure includes: traversing the icon set of the extended structure, and acquiring icon set parameter data of the icon set in the extended structure; According to the parameter data of the preset conditional format, converting the preset conditional format into a conditional format corresponding to the preset conditional format in a second table includes: according to the icon set parameter data and preset rules obtained in the extended structure, converting the icon set in the extended structure into an icon set in the second table.
8. A data processing method, characterized in that: include: Parsing the second table, and obtaining parameter data of a preset conditional format in the second table from the second table; According to the parameter data of the preset conditional format, converting the preset conditional format in the second table into data in the first table and / or the extended structure of the first table; The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
9. The method according to claim 8, characterized in that Parsing the second table, and obtaining parameter data of a preset conditional format in the second table from the second table, includes: Traversing the conditional formats in the second table, if the conditional format in the second table is the data bar, obtaining first data bar parameter data and second data bar parameter data of the data bar from the second table; Converting the preset conditional format in the second table into data in the first table and / or the extended structure of the first table according to the parameter data of the preset conditional format includes: According to the first data strip parameter data, the data strips in the second table are converted into the data strips in the first table, and the second data strip parameter data are converted into the associated data in the extended structure.
10. The method according to claim 8, characterized in that Parsing the second table, and obtaining parameter data of a preset conditional format in the second table from the second table, including: traversing the conditional formats in the second table, and if the conditional format in the second table is an icon set, obtaining icon set parameter data of the icon set from the second table; According to the parameter data of the preset conditional format, the preset conditional format in the second table is converted into data in the first table and / or the extended structure of the first table, including: according to the icon set parameter data and the type of the icon set, the icon set in the second table is converted into the icon set in the second table according to preset rules, or the icon set in the second table is converted into associated data in the extended structure.
11. The method according to claim 9, characterized in that The converting the data strips in the second table into the data strips in the first table includes: generating identifiers of the data strips in the first table; Converting the second data strip parameter data into associated data in the extended structure includes: setting an associated relationship between the identifier of the data strip and the associated data in the extended structure.
12. The method according to claim 9, characterized in that Satisfy at least one of the following: The first data bar parameter data includes: the positive color of the data bar, whether the data bar is hidden, whether it is a gradient color, the maximum value of the data bar, and the minimum value of the data bar; The second data bar parameter data includes: the negative value color of the data bar.
13. The method according to claim 10, characterized in that The icon set parameter data includes: the type and associated parameters of the icon set.
14. The method according to claim 10, characterized in that According to the icon set parameter data and the type of the icon set, converting the icon set in the second table into the icon set in the second table, or converting the icon set in the second table into the associated data in the extended structure, comprises: If the type of the icon set is a preset type, converting the icon set in the second table into associated data in the extended structure according to the icon set parameter data and preset rules; If the type of the icon set is a non-preset type, the icon set in the second table is converted into the icon set in the first table.
15. A data processing device, comprising: A parsing unit, used for parsing the first table and the extended structure of the first table, and obtaining parameter data of the preset conditional format in the first table from the first table and the extended structure; a conversion unit, configured to convert the preset conditional format into a conditional format corresponding to the preset conditional format in a second table according to parameter data of the preset conditional format; The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
16. A data processing device, comprising: A parsing unit, used for parsing the second table, and obtaining parameter data of a preset conditional format in the second table from the second table; a conversion unit, configured to convert the preset conditional format in the second table into data in the first table and / or an extended structure of the first table according to parameter data of the preset conditional format; The preset conditional format includes a data bar and / or an icon set, the first form is an offline form, and the second form is an online form.
17. An electronic device comprising: at least one memory and at least one processor; The at least one memory is used to store program code, and the at least one processor is used to call the program code stored in the at least one memory to execute the method according to any one of claims 1 to 14.
18. A computer-readable storage medium, the computer-readable storage medium being used to store program code, wherein when the program code is executed by a processor, the processor is prompted to execute the method according to any one of claims 1 to 14.
