CN105988983A - Report output method for adding marks in Excel template file - Google Patents

Report output method for adding marks in Excel template file Download PDF

Info

Publication number
CN105988983A
CN105988983A CN201510067341.5A CN201510067341A CN105988983A CN 105988983 A CN105988983 A CN 105988983A CN 201510067341 A CN201510067341 A CN 201510067341A CN 105988983 A CN105988983 A CN 105988983A
Authority
CN
China
Prior art keywords
report
parameter
excel
template
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510067341.5A
Other languages
Chinese (zh)
Inventor
尹宪文
尹搏
李玉奎
杜春辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ELITEL INFORMATION TECHNOLOGIES Co Ltd
Original Assignee
ELITEL INFORMATION TECHNOLOGIES Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ELITEL INFORMATION TECHNOLOGIES Co Ltd filed Critical ELITEL INFORMATION TECHNOLOGIES Co Ltd
Priority to CN201510067341.5A priority Critical patent/CN105988983A/en
Publication of CN105988983A publication Critical patent/CN105988983A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a report output method for adding marks in an Excel template file. The report output method takes Excel software as a report designer, data can be output through specific marks in the Excel template file, and by adopting the report output method, List array data can be filled into a form in a circular manner, individuals of entity data and dictionary data can be filled into given form cells, and simple parameters can be filled into given form cells. By adopting the report output method, research and development of a report designer are avoided, conventional Excel software is taken as a report designer, the user experience of a user designing reports is improved, an Excel file is taken as a template file for report output, the defect of incomplete Excel expression caused by other types of report templates is avoided, situations that page margins are not accordant can be avoided, files can be printed without difference from the original design of the template after being output only as long as the template is designed.

Description

? Excel Tagged report output method in template file
Technical field
The invention belongs to research and development of software field, be mainly used in generating Excel form.
Background technology
Current report software is of a great variety, and these softwares are made up of two parts mostly: one is Report Designer, and two is report output module.Wherein, Report Designer is the program that an independence can be run mostly, and report output module is an establishment that can be employed software transfer or service.These report software, the function of its Report Designer has: the form of 1 designating unit lattice, such as: the merging of cell, font, color, frame etc., the function that namely Excel has;The data of 2 designating unit lattice associations, 3 some other special settings, such as vertical consolidation equivalent element lattice etc..
Due to: the designer of 1 Report Form Design software is because of the many functions in excel to be realized, and R&D work amount is huge;2 as report software, designer surmounts or pursue Excel be unnecessary be also unpractical, this most necessarily causes the designer can not be the most handy;3 different realize body owing to report software and Excel software are two, there is a lot of difference in the effect that the Excel form of design its printing effect of form and derivation prints again in Report Designer, if margin is not for going up, user is provided with on the template file being difficult to react;4Excel software has goed deep into routine work and the life of user, and forms the habit more, and user is more willing to Tentative Study of Achievement of Manipulation on Excel software and is unwilling to operate Report Form Design software;5 comparative statements output templates and Report Designer module, report output module is only the core of report software.
Further, since report software relates to the structure to database manipulation and data base, its operating process is more complicated, the end user of more than 90% carries out Report Form Design without report software, that use report software is the research staff of software mostly, but, for research and development of software personnel, more can embody its customer value is software output module, rather than designer, thus, with Excel substitution tables designer, on form the shift of the work focus to report output module, it is only and the most reasonably arranges.
As can be seen here, if designing a kind of tagged report output method in Excel template file, the work of research and development Report Designer both can be saved, the most user-friendly.
Summary of the invention
A kind of open tagged report output method in Excel template file of the present invention, Excel software is regarded as Report Designer by the method, making Reports module by the method setting up labelling on Excel form, the form of the method is derived process and is: first read template, refill value evidence.Array circulation can be inserted given area by the present invention, Business Entity can be inserted given area, dictionary class data can be inserted given area, unitary variant class data can be inserted given area, insert given area.
Above-mentioned Business Entity, refer to for describing a concrete things, physically having the property value for describing this features, such as: describe the entity of a user, this physically has the information such as login password of the organization described in user name, personal code work, user, user setup.
For realizing above-mentioned target, the present invention is provided with a report output module, and the core function of this output module realizes the output of form, and first parameter of this function is Excel template file name, immediately after be the parameter of one group of indefinite length, here, the present invention is by the most named for these parameters below: Arg0, Arg1, Arg2, Arg3 ....
The core function form of report output module is as follows:
ExcelHelper.Export(tempFile,Arg0,Arg1,…);
For realizing the set objective of the present invention, arrange as follows as it is shown in figure 1, the design of Excel template is made by the present invention:
1.Excel template file is made up of two pages, and one is the form page (hereinafter referred to as " page template ") of band specific markers, and two is " template-setup " page (hereinafter referred to as " arranging page ").
2. the present invention will carry out the output of form according to page template, and cell span, font, font size, header, footer, margin are all from the Table Design in this page template.
This output of the most incoming parameter, to which position in form, is to be identified by the specific markers in page template.
4. the specific markers on the page is the text bracketed with " { } ", insert unit lattice in form text on, such as: { Arg4.UserName }.
5. such as " { Arg2 } " in Fig. 1, when incoming parameter is that simple data type is (such as int, double, float, string, datetime etc.) time, specific markers on page template is similar to: { Arg2}, { Arg3}, { Arg5} etc., the namely title of parameter, the present invention is during report output, value accordingly can be inserted this cell, the form (such as font, font size, text color, overstriking, frame, cell background colour etc.) of cell is preset during Report Form Design, and this is not made any work by the present invention.
6. when incoming parameter is Business Entity or Dictionary dictionary data, specific markers on page template is similar to: { Arg4.UserName }, { Arg4.UserCode }, { Arg4.Department }, content in specific markers divides two parts, and with ". " number separate, Part I is parameter name, Part II is the title of parameter member, the present invention is during report output, value accordingly can be inserted this cell, the form of cell is (such as font, font size, text color, overstriking, frame, cell background colour etc.) preset during Report Form Design, this is not made any work by the present invention.
7. when the array that incoming parameter is Business Entity (such as List<User>), specific markers on page template is similar to: { Arg4.UserName }, { Arg4.UserCode }, { Arg4.Department }, the content in specific markers divides two parts, and with ". " number separate, Part I is parameter name, Part II is the title of parameter member, and the present invention, during report output, has following several step:
1. from arranging the region that page reading parameter is corresponding.
2. the region of each property distribution of this parameter entity member is analyzed;
3. summary Two Areas, if the region arranging page is effective, just using the region arranging page, if arranging the zone void of page, just using the region analyzed in above-mentioned second step.
4. with above-mentioned zone as loop body, successively in the lower section in this region, by this region duplication N-1 part, N is to participate in such as the number of members of parameter List array, and this region quantity after duplication is N part, a member of every part of corresponding List array;
5. according to the labelling in cell, and correspondence from List entity member data, carry out mating with the labelling in region by each attribute of this solid data, the unit lattice in filling replication region.
8. arrange page to remark additionally to participating in parameter, the region that main storage List suction parameter is corresponding.
As in figure 2 it is shown, some form, according to the labelling implanted, race way can not be judged, be at this moment accomplished by the supplementary setting by template-setup page.
As it is shown on figure 3, arrange often going in page, it is all to the explanation of output function in report output module, with RANG as keyword, List array class parameter is remarked additionally, in order to race way to be described, RANG=A2:C5, i.e. represent A2:C5 for the race way that cell is this parameter.
The invention have the advantage that
The method setting up labelling in Excel template file carrys out output report, eliminate the R&D work of Report Designer, utilize existing Excel software as Report Designer, improve user and design the Consumer's Experience of form, make the template file of report output with Excel file, overcome other types report form template and Excel is stated the most full deficiency, there is not such as margin and set inconsistent situation, as long as having designed module, the most printable after output and initial with template design is without the slightest difference.
Figure of description
Fig. 1: typical case's Excel template file pattern.
Fig. 2: require supplementation with race way report style.
Fig. 3: template-setup page pattern.
Fig. 4: report output overall flow figure.
Fig. 5: dictionary class data output journey figure.
Fig. 6: array type number output flow chart.
Detailed description of the invention
The present invention is tagged report output method in Excel template file, the method makees Report Designer depending on Excel software, data are exported by the specific markers in Excel template file, List array data circulation can be inserted form by the present invention, each member of entity class data, dictionary class data set cell can be inserted, the parameter of simple types given cell lattice can be inserted.Present invention eliminates the R&D work of Report Designer, utilize existing Excel software as Report Designer, improve user and design the Consumer's Experience of form, the template file of report output is made with Excel file, overcome other types report form template and Excel is stated the most full deficiency, there is not such as margin and set inconsistent situation, as long as having designed module, design the most printable and initial with template after output is without the slightest difference.
For realizing above-mentioned target, the present invention is provided with a report output module, and the core function of this output module realizes the output of form, and first parameter of this function is Excel template file name, immediately after be the parameter of one group of indefinite length, here, the present invention is by the most named for these parameters below: Arg0, Arg1, Arg2, Arg3 ....
The core function form of report output module is as follows:
ExcelHelper.Export(tempFile,Arg0,Arg1,…);
In actual use, as described in Figure 4, output function first reads template to the report output process of the present invention, output report again, output report is a process to argument sequence traversal output, if parameter is List array type, then starts array type data and exports Excel process;If parameter is entity type, then the present invention is first converted into dictionary type, in output to Excel;If parameter is dictionary type, then starts dictionary type data and export Excel process;If parameter belongs to fundamental type, then start fundamental type data and export Excel process.
Described entity type, refer to for describing a concrete things, physically having the property value for describing this features, such as: describe the entity of a user, this physically has the information such as login password of the organization described in user name, personal code work, user, user setup.
The output flow chart of dictionary class parameter as it is shown in figure 5, in actual use, each member of traversal dictionary of the present invention, combination is formed as { Arg2.Name} parameter name, then searching labelling in Excel template file, if having found, just by this character string, replace with the value of dictionary member.
The output flow process of List array type data is as shown in Figure 6, in actual use, the present invention first reads race way from template-setup page, if not reading the scope just analyzing race way from page template, after getting the race way scope of array output, first by during in Excel template file, this scope content once copies to the cell of below this area filling scope, at the form according to template, the form of race way is copied into N part, wherein N is the length of array, finally circulation array filler evidence.
In actual use, the data of List array management are entity type mostly, in the process filling form by entity, first being that entity type is converted to dictionary type, travel through each member of this dictionary, combination forms such as { Arg2.Name} parameter name, labelling is found again in the region that Excel template file replicates out, if it is found, just by this character string, replace with the value of dictionary member.
The invention have the advantage that
The method setting up labelling in Excel template file carrys out output report, eliminate the R&D work of Report Designer, utilize existing Excel software as Report Designer, improve user and design the Consumer's Experience of form, make the template file of report output with Excel file, overcome other types report form template and Excel is stated the most full deficiency, there is not such as margin and set inconsistent situation, as long as having designed module, the most printable after output and initial with template design is without the slightest difference.
The above is presently preferred embodiments of the present invention and the know-why used thereof; for a person skilled in the art; without departing from the spirit and scope of the present invention; any based on the obviously change such as the equivalent transformation on the basis of technical solution of the present invention, simple replacement, within belonging to scope.

Claims (5)

1. tagged report output method in Excel template file, it is characterised in that:
The method makees report form tool depending on Excel software, increases the file after specific labelling as report output template in Excel form, and the present invention, during output report, is first to read template file, then output report.
2. as claimed in claim 1, tagged report output method in Excel template file, it is characterised in that:
The present invention is provided with a report output module, the core function of this output module realizes the output of form, and first parameter of this function is Excel template file name, immediately after be the parameter of one group of indefinite length, incoming parameter is business datum, will be output in report file.
3. as claimed in claim 1, tagged report output method in Excel template file, it is characterised in that:
Excel template file is made up of two pages, and one is page template, it may be assumed that the form page of band specific markers, and two is to arrange page, it may be assumed that " template-setup " page.
4. as claimed in claim 3, tagged report output method in Excel template file, it is characterised in that:
Specific markers on page template is the text bracketed with " { } ";When incoming parameter is that simple data type is (such as int, double, float, string, datetime etc.) time, specific markers on page template is similar to: { Arg2}, { Arg3}, { Arg5} etc., the namely title of parameter, value accordingly, during report output, can be inserted this cell by the present invention;When incoming parameter is Business Entity or dictionary data, specific markers on page template is similar to: { Arg4.UserName }, { Arg4.UserCode }, { Arg4.Department }, the content in specific markers divides two parts, and with ". " number separate, Part I is parameter name, Part II is the title of parameter member, and value accordingly, during report output, can be inserted this cell by the present invention;When the array that incoming parameter is Business Entity, specific markers on page template is similar to: { Arg4.UserName }, { Arg4.UserCode }, { Arg4.Department }, the content in specific markers divides two parts, and with ". " number separate, Part I is parameter name, Part II is the title of parameter member, and N part can be replicated during report output in corresponding region by the present invention, and recirculation inserts the data in array.
5. as claimed in claim 3, tagged report output method in Excel template file, it is characterised in that:
Page is set and remarks additionally to participating in parameter, the region that main storage array class suction parameter is corresponding;Often going in page is set, is all to the explanation of output function parameter in report output module, with RANG as keyword, List array class parameter is remarked additionally, in order to race way to be described, RANG=A2:C5, i.e. represent A2:C5 for the race way that cell is this parameter.
CN201510067341.5A 2015-02-10 2015-02-10 Report output method for adding marks in Excel template file Pending CN105988983A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510067341.5A CN105988983A (en) 2015-02-10 2015-02-10 Report output method for adding marks in Excel template file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510067341.5A CN105988983A (en) 2015-02-10 2015-02-10 Report output method for adding marks in Excel template file

Publications (1)

Publication Number Publication Date
CN105988983A true CN105988983A (en) 2016-10-05

Family

ID=57040946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510067341.5A Pending CN105988983A (en) 2015-02-10 2015-02-10 Report output method for adding marks in Excel template file

Country Status (1)

Country Link
CN (1) CN105988983A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108845981A (en) * 2018-06-15 2018-11-20 中金金融认证中心有限公司 A kind of method and device generating contract template
CN109446201A (en) * 2018-11-01 2019-03-08 郑州云海信息技术有限公司 A kind of method for sorting, device and the equipment of Excel table endorsement information
CN110442854A (en) * 2019-08-13 2019-11-12 北京源清慧虹信息科技有限公司 Generation method, device, computer equipment and the readable storage medium storing program for executing of report

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108845981A (en) * 2018-06-15 2018-11-20 中金金融认证中心有限公司 A kind of method and device generating contract template
CN109446201A (en) * 2018-11-01 2019-03-08 郑州云海信息技术有限公司 A kind of method for sorting, device and the equipment of Excel table endorsement information
CN110442854A (en) * 2019-08-13 2019-11-12 北京源清慧虹信息科技有限公司 Generation method, device, computer equipment and the readable storage medium storing program for executing of report
CN110442854B (en) * 2019-08-13 2023-04-07 北京源清慧虹信息科技有限公司 Report generation method and device, computer equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN101025738B (en) Template-free dynamic website generating method
CN103500196B (en) EXCEL data export method and let-off gear(stand) thereof under many concurrent big data quantity environment
CN104239073B (en) Data maintenance system rapid prototyping development system and method
CN105204860B (en) A kind of method and device for quickly generating self-defined static Web pages
TW518480B (en) Method of standardizing character information in electronic document
CN106202292A (en) A kind of standard information based on structural data model analyzes method
CN104657419B (en) A kind of processing method and system customizing letter paper template
CN100543725C (en) A kind of method for the E-seal location
CN107273117A (en) A kind of quick Code automatic build system for programming friendly
CN105468571B (en) It is a kind of for automatically generating the method and device of report
CN103530407B (en) Method and device for generating rich text document
CN106547841A (en) A kind of data automatic switching method of Excel XML mappings
CN110991157A (en) Engineering quality evaluation system design method based on electronic file credible technology
CN102646039A (en) Software interface generating system and method based on extensible markup language (XML) Schema
CN111309313A (en) Method for quickly generating HTML (hypertext markup language) and storing form data
CN106469140A (en) A kind of report generating system and its method
US20160253306A1 (en) The method of inserting objects into a pdf document
CN107688557A (en) Composition method, composing system and terminal
CN105988983A (en) Report output method for adding marks in Excel template file
CN107608951A (en) Report form generation method and system
CN106776495A (en) A kind of document logical structure method for reconstructing
CN109634992A (en) A kind of structure of report decomposition method, report form generation method, device
CN108536683A (en) A kind of paper fragmentation information abstracting method based on machine learning
CN104298705A (en) Converting method of relational data and unstructured data
CN114661286A (en) Large-screen visual code generation method, system and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20161005

WD01 Invention patent application deemed withdrawn after publication