Data export method, device, equipment and storage medium

文档序号:1465976 发布日期:2020-02-21 浏览:9次 中文

阅读说明:本技术 一种数据导出方法、装置、设备及存储介质 (Data export method, device, equipment and storage medium ) 是由 雷益鹏 程强 万月亮 于 2019-11-05 设计创作,主要内容包括:本发明实施例公开了一种数据导出方法、装置、设备及存储介质。该方法包括:获取数据导出请求,所述数据导出请求包括待导出数据所对应原始数据文件的文件标识和运算需求,确定所述原始数据文件中与所述运算需求对应的目标数据相对于所述原始数据文件中参考数据的偏移量,导出所述原始数据文件中的数据至导出文件,并根据所述运算需求对所述导出文件中的目标数据运算,得到运算结果。与现有技术相比,本发明实施例的技术方案既可以在不绑定特定程序语言的情况下,使导出的数据带计算公式,而且通过计算偏移量,保证了运算结果的准确性。(The embodiment of the invention discloses a data export method, a device, equipment and a storage medium. The method comprises the following steps: acquiring a data export request, wherein the data export request comprises a file identifier and an operation requirement of an original data file corresponding to data to be exported, determining the offset of target data corresponding to the operation requirement in the original data file relative to reference data in the original data file, exporting data in the original data file to an export file, and operating the target data in the export file according to the operation requirement to obtain an operation result. Compared with the prior art, the technical scheme of the embodiment of the invention can lead the derived data band to be calculated according to the formula under the condition of not binding a specific program language, and ensures the accuracy of the operation result by calculating the offset.)

1. A method of data derivation, comprising:

acquiring a data export request, wherein the data export request comprises a file identifier and an operation requirement of an original data file corresponding to data to be exported;

determining the offset of target data corresponding to the operation requirement in the original data file relative to reference data in the original data file;

exporting the data in the original data file to an export file, and calculating the target data in the export file according to the calculation requirement to obtain a calculation result.

2. The method of claim 1, wherein the determining an offset of target data corresponding to the operational requirement in the original data file relative to reference data in the original data file comprises:

selecting a reference point in the original data file, and taking data at the reference point as reference data;

and determining the offset of the target data relative to the reference data according to the positions of the reference data and the target data in the original data file.

3. The method of claim 1, wherein said operating on the target data in the export file according to the operation requirement to obtain an operation result comprises:

determining the target position of the target data in the export file according to the reference function, the reference data and the offset;

and calculating the target data on the target position according to the calculation requirement to obtain a calculation result.

4. A method according to claim 3, wherein the reference function is of the form:

OFFSET(reference,rows,cols,height,width)

wherein, the OFFSET is a reference function, the reference is reference data, the rows is a row number OFFSET, the cols is a column number OFFSET, the height is a row number of the target data, and the width is a column number of the target data.

5. The method of claim 4, wherein said operating the target data at the target location according to the operation requirement to obtain an operation result comprises:

and operating the reference function according to an operation rule in the operation requirement to serve as an operation result of the target data.

6. The method of any one of claims 1 to 5, wherein the raw data file is an Excel table.

7. A data derivation apparatus, comprising:

the information acquisition module is used for acquiring a data export request, wherein the data export request comprises a file identifier and an operation requirement of an original data file corresponding to data to be exported;

an offset determining module, configured to determine an offset of target data corresponding to the operation requirement in the original data file with respect to reference data in the original data file;

and the data export module is used for exporting the data in the original data file to an export file and computing the target data in the export file according to the computing requirement to obtain a computing result.

8. The apparatus of claim 7, wherein the offset determination module is specifically configured to:

selecting a reference point in the original data file, and taking data at the reference point as reference data;

and determining the offset of the target data relative to the reference data according to the positions of the reference data and the target data in the original data file.

9. An apparatus, comprising:

one or more processors;

a memory for storing one or more programs;

the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data derivation method of any of claims 1-6.

10. A storage medium on which a computer program is stored, which program, when being executed by a processor, carries out the data derivation method as claimed in any one of claims 1 to 6.

Technical Field

The embodiment of the invention relates to the technical field of data processing, in particular to a data export method, a data export device, data export equipment and a storage medium.

Background

Excel is used as currently popular personal computer data processing software and applied to various industries, so that a plurality of application systems need to provide the data export function of Excel at present. For complex data application, sometimes the derived Excel data is required to be provided with a calculation formula, so that a user can directly modify the derived Excel data in a derived Excel file conveniently, and the formula can be calculated in real time.

At present, a method for deriving an Excel data band calculation formula mainly includes two modes, namely, a mode of implementing the Excel data band calculation formula by using a Visual Basic for Applications (Visual Basic macro language for short) programming of Excel itself and a mode of generating an Excel cell with a formula by using codes. The former needs a lot of time and energy for developers to study due to the use of VBA, and users need to open Excel to use normally, and the latter needs to modify corresponding codes when needing to adjust formulas, so that the process is complex.

Disclosure of Invention

Embodiments of the present invention provide a data export method, apparatus, device, and storage medium, which simplify the export process of data without binding a specific programming language.

In a first aspect, an embodiment of the present invention provides a data export method, including:

acquiring a data export request, wherein the data export request comprises a file identifier and an operation requirement of an original data file corresponding to data to be exported;

determining the offset of target data corresponding to the operation requirement in the original data file relative to reference data in the original data file;

exporting the data in the original data file to an export file, and calculating the target data in the export file according to the calculation requirement to obtain a calculation result.

In a second aspect, an embodiment of the present invention further provides a data deriving apparatus, including:

the information acquisition module is used for acquiring a data export request, wherein the data export request comprises a file identifier and an operation requirement of an original data file corresponding to data to be exported;

an offset determining module, configured to determine an offset of target data corresponding to the operation requirement in the original data file with respect to reference data in the original data file;

and the data export module is used for exporting the data in the original data file to an export file and computing the target data in the export file according to the computing requirement to obtain a computing result.

Optionally, the offset determining module is specifically configured to:

selecting a reference point in the original data file, and taking data at the reference point as reference data;

and determining the offset of the target data relative to the reference data according to the positions of the reference data and the target data in the original data file.

Optionally, the data deriving module includes:

a position determining unit, configured to determine a target position of the target data in the export file according to a reference function, the reference data, and an offset;

and the operation unit is used for operating the target data on the target position according to the operation requirement to obtain an operation result.

Optionally, the form of the reference function is as follows:

OFFSET(reference,rows,cols,height,width)

wherein, the OFFSET is a reference function, the reference is reference data, the rows is a row number OFFSET, the cols is a column number OFFSET, the height is a row number of the target data, and the width is a column number of the target data.

Optionally, the operation unit is specifically configured to operate the reference function according to an operation rule in the operation requirement, and use the operation rule as an operation result of the target data.

Optionally, the original data file is an Excel table.

In a third aspect, an embodiment of the present invention further provides an apparatus, including:

one or more processors;

a memory for storing one or more programs;

the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data derivation method as described in the first aspect.

In a fourth aspect, an embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the data export method according to the first aspect.

The embodiment of the invention provides a data export method, a device, equipment and a storage medium, wherein the offset of target data corresponding to an operation requirement in an original data file relative to reference data in the original data file is determined according to a data export request, the data participating in the operation is ensured to be matched with the target data in the original data file, the accuracy of an operation result is improved, and meanwhile, the target data in the exported file can be operated according to the operation requirement.

Drawings

Fig. 1 is a flowchart of a data export method according to an embodiment of the present invention;

fig. 2 is a flowchart of a data export method according to a second embodiment of the present invention;

fig. 3 is a structural diagram of a data deriving device according to a third embodiment of the present invention;

fig. 4 is a structural diagram of an apparatus according to a fourth embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures. In addition, the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种智能辅助定密系统中使用的语句编码方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!