Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Realization method of dynamic report based on excel template

An implementation method and excel technology, applied in the field of Excel reports, can solve the problems of high development cost, slow development cycle, long cycle, etc., and achieve the effect of simplifying development work, saving maintenance cost, and shortening development cycle

Active Publication Date: 2016-09-14
成都交大光芒科技股份有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, using POI or JXL for development, the development cost is too high and the cycle is too long. Although the development of any report can be completed, each report needs to write a lot of repetitive codes, and it is difficult to control the report format. To adjust the report, the code must be rewritten. It is impossible for these users to complete it, and a large maintenance cost must be invested in the later period.
General Excel export cannot solve the problem of complex reports. In the traditional development process, when using report technologies such as JasperReport, templates use special development tools and need to be compiled. The development cycle is slow, which makes developers define reports. Templates and templates need to be adjusted during software maintenance, which costs a lot
And due to the professionalism of the development tools, it is difficult for the report users to adjust the report style on demand by themselves.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Realization method of dynamic report based on excel template
  • Realization method of dynamic report based on excel template

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] A method for implementing a dynamic report based on an Excel template, including the following steps:

[0035] a. According to the data source API, read the data and construct a source data in a tree structure, so that there are multiple root nodes on the top layer, representing the set objects and parameters;

[0036] b. Read the Excel template;

[0037] c. Traverse each row in the sheet, extract the configuration information of each row, and assemble it into a matrix model in the memory. The matrix model describes the content, position, type and other information of the labels used in the Excel template file.

[0038] d. Traverse each configuration node in the matrix model in memory;

[0039] e. When traversing the configuration nodes, judge and parse the tags encountered;

[0040] f. According to step c-step e, traverse all the sheets in the template in turn;

[0041] g. When the data in the data source is generated through the model of the matrix ...

Embodiment 2

[0045] Such as figure 2 As shown, this embodiment has been refined as follows on the basis of embodiment 1: in step e,

[0046] e1. When encountering a parameter label, it will search for the corresponding data item in the source data, and replace the label with the search result at this position;

[0047] e2. When encountering a variable label, first call the system preset method to calculate the variable, and then replace the label with the calculation result;

[0048] e3. Encounter a loop label, judge the loop direction, and determine the boundary position of the loop content according to the loop direction, find the corresponding array data in the data source, and generate a corresponding number of rows in the matrix model according to the length of the array data or columns. If it is judged to be a vertical loop, then calculate the upper, lower, left, and right boundary positions of the looped content, and set the data filling direction downward; if it is judg...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a realizing method for a dynamic report based on an Excel template. The realizing method comprises the following steps: acquiring data through a defined data source API (Application Program Interface); assembling the data according to a report model in an internal storage and generating the data with a matrix structure; converting the matrix into Html information and outputting to a browser or / and converting the matrix into Excel information and educing. The realizing method provided by the invention has the advantages that the educing problem of a complex report is solved, the code is simple, the development period for the report is shortened, the development work for the report is simplified, the purposes of defining a new template and adjusting the template by a user can be achieved through simple training, a developer does not need to perform complex later maintenance on the adding and changing of the report, and the maintenance cost is reduced.

Description

technical field [0001] The invention relates to the field of Excel reports, in particular to a method for realizing a dynamic report based on an Excel template. Background technique [0002] There are mainly two existing Excel operation tools written in java language, one is POI, and the other is JXL, and JXL is java Excel API. The APIs of these two operating tools are relatively low-level and flexible, but they require a lot of code to develop reports. There are still many reporting tools. They use POI or JXL at the bottom, such as FineReport, IReport, etc. These tools are relatively powerful and can develop complex reports. IReport defines the template in a graphical and draggable way, compiles it into a .jasper template file, and then calls the JasperReport API in the program to parse the template file and bind the data source, and finally generates Excel. JasperReport has encapsulated parsing template files and filling data, we only need to provide data sources. Howev...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F17/24
Inventor 张盼富陈劲草蒋凯陈奇志
Owner 成都交大光芒科技股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products