CN104657340B - Expansible Word report preparing systems and method based on script - Google Patents

Expansible Word report preparing systems and method based on script Download PDF

Info

Publication number
CN104657340B
CN104657340B CN201510070571.7A CN201510070571A CN104657340B CN 104657340 B CN104657340 B CN 104657340B CN 201510070571 A CN201510070571 A CN 201510070571A CN 104657340 B CN104657340 B CN 104657340B
Authority
CN
China
Prior art keywords
script
word
module
data
report
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.)
Active
Application number
CN201510070571.7A
Other languages
Chinese (zh)
Other versions
CN104657340A (en
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.)
Shanghai Chuangjing Information Technology Co ltd
Original Assignee
Shanghai Chuangkin Mdt Infotech 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 Shanghai Chuangkin Mdt Infotech Ltd filed Critical Shanghai Chuangkin Mdt Infotech Ltd
Priority to CN201510070571.7A priority Critical patent/CN104657340B/en
Publication of CN104657340A publication Critical patent/CN104657340A/en
Application granted granted Critical
Publication of CN104657340B publication Critical patent/CN104657340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The present invention discloses a kind of expansible Word report preparing systems and method based on script, including Word report templates customized module, Word report templates conversion module, data access interface module, the Word report templates customized module, model customization specification is provided, error detection is carried out to customized template;The Word report templates conversion module provides the transfer process for carrying out scripting to the Word templates that user writes, will finally generate an executable script file;The data access interface module, defines how to access to data, and script sentence obtains data reporting source data by data access interface in template.System and method provided by the present invention solves the problems, such as that format controls that dumb, data processing is inconvenient.

Description

Expansible Word report preparing systems and method based on script
Technical field
The present invention relates to computer application technologies, more specifically, being related to a kind of expansible report based on script Generate system and method.
Background technology
Word is the widest word processor of use scope in the world, has a large amount of word reports to need to compile daily System, such as in server runs daily management mission, be required for writing daily paper, week for the operating condition of each server Report, monthly magazine, quarterly report and annual report.The format of these reports is almost fixed, the design parameter and data being only directed to It is different.It is manually handled if only relied on, a large amount of inquiry, duplication and application work, not only cumbersome, time-consuming, efficiency Lowly, it and is also easy to malfunction, reduces the accuracy of report.Therefore, the automatic generation function of research word reports has weight The application value wanted.
Docx formats are the newest Word file reference formats that Microsoft defines, it is using XML to file content into rower Note explanation, is a kind of file format of opposing open.
Currently, Word report automatic generation method have it is following several:
1, document cursor tracking localization method (Ye Ming, Zhang Zheng, the Word Report Generation Function Baseds exploitation based on C#.NET, meter Calculation machine engineering and application, 2008,44 (9):104-106).
The cardinal principle of this method is to control document content by tracking and controlling Word document interior lights target position Starting and corresponding format, and specified content is inserted on corresponding position.The disadvantage is that:The space of a whole page of report, pattern and interior Appearance must be sequentially inputted by program;In addition, the program is sufficiently complete, without reference to user to the screening operation of data information.
2, it directly controls Word using OLE or COM technologies (Lu Baoyu, Yang Xinfang generates Word reports and dynamic with Delphi State structure table, computer software and application, 2007,4 (3):180-183;Kong Lingyan, yellow flourishing, Jiang Qingxiang etc. is used Visual Basic manipulate Microsoft Word objects and generate report file, computer engineering and application, 2003,39 (36): 115-117)。
The cardinal principle of this method is to directly control Word using OLE or COM technologies, and the row in database table structure are believed Breath is inserted into Word document as label with definition template, and self-defined forms connection database is added in Word, is generating text Data are read from database when shelves, and on the corresponding position in Auto-writing to template.
3, (Ge Fen, Wu Ning, the Word designs based on multiple technologies of the Word document automatic generation method based on multiple technologies Document automatic Generation Platform, Journal of UEST of China, 2007,36 (2)).
The cardinal principle of this method is to be used the part for allowing to be replaced in the general file of a specification using VBA Label is arranged in the form for being inserted into annotation, and in document and label information therein storage to database server, exists in next step It is label assignment that input frame is provided on the Asp pages by user, and user input values is finally utilized to replace in general file at label Content generates new document.The disadvantage is that:VBA programs have fully embedded into client Word application programs, and deployment is not convenient enough; And VBA interface elements are not abundant enough, only support simple Characters form, do not have backstage method for table, picture etc. It supports.
The above technology all mainly directly operates Word document object, and common defects are that format controls dumb, data Processing is inconvenient.
Invention content
The present invention for the above-mentioned prior art present in technical problem, provide it is a kind of it is expansible based on script Word report It accuses and generates system and method, solve the problems, such as that format controls that dumb, data processing is inconvenient.
In order to achieve the above objectives, the technical solution adopted in the present invention is as follows:
A kind of expansible Word report preparing systems based on script, including Word report templates customized module, Word report Slide former conversion module, data access interface module.
Word report template customized modules, provide model customization specification, and error detection is carried out to customized template.
Word report template conversion modules provide the transfer process that scripting is carried out to the Word templates that user writes, An executable script file will finally be generated.
Data access interface module defines how to access to data, and script sentence passes through data access in template Interface obtains data reporting source data.
The Word report templates customized module includes script prompt module and script check module.
The Word report templates conversion module include Script Action processing module, Word paragraph contents integrate module and Conversion modules of the XML to script, wherein it is to merge paragraph content that Word paragraph contents, which integrate module, the conversion of XML to script Module is used for the XML results with script markup being converted to an executable script file.
The data access interface module includes that the definition module of data access interface and specific data source access logic Module, wherein the definition module of data access interface defines how report accesses a data, and specific data source accesses Logic module defines how to access to the data of some data source.
A kind of expansible Word report-generating methods based on script, are completed, including following step using above-mentioned system Suddenly:
1) data access interface is write
Do not limit to certain specific derived data format, the data of arbitrary format can be generated to Word reports, but be directed to The data of special format need to provide a data access interface, and the data used are only concerned for report template customization personnel Access interface is indifferent to data format.
2) report template is customized
It is inserted into script by the template script edit mode of definition, the Show Styles of control report in script, at data Reason process, final result are exactly the report template of a Word forms customized.
3) report template is converted to executable scripted code
By to report file format analysis, being readjusted to the XML file in Docx files, generation is corresponding can Perform script file.
Technical solution of the present invention has the beneficial effect that:
The present invention not only can flexibly customize various data contents very much, but also can be very flexibly to report style It is customized, and to Final Report result number of pages, there is no limit thousands of pages of reports can be handled normally the present invention.
Description of the drawings
Upon reading the detailed description of non-limiting embodiments with reference to the following drawings, other feature of the invention, Objects and advantages will become more apparent upon:
Fig. 1 is the block diagram of system of one embodiment of the invention;
Fig. 2 is the work flow diagram of one embodiment of the invention.
Specific implementation mode
With reference to specific embodiment, the present invention is described in detail.Following embodiment will be helpful to the technology of this field Personnel further understand the present invention, but the invention is not limited in any way.It should be pointed out that the ordinary skill of this field For personnel, without departing from the inventive concept of the premise, various modifications and improvements can be made.These belong to the present invention Protection domain.
Shown in Fig. 1, the expansible Word report preparing systems based on script provided by the present invention, including, Word reports Model customization module, Word report templates conversion module, data access interface module.
Word report template customized modules, and include script prompt module, script check module.
Word report templates conversion module includes Script Action processing module again, and Word paragraph contents integrate module, and XML is arrived The conversion module of script, wherein Script Action processing module are by some special actions, such as that script is moved to XML is current Node outer layer, in the XML structure of application.Word paragraph contents integrate module, mainly merge paragraph content, because Word can One paragraph content can be stored in multiple XML nodes, if that analyze script information, it is necessary to merge paragraph Processing.XML to script conversion module, the module be used for by the XML results with script markup be converted to one it is executable Script file.
Data access interface module contains two parts, one be data access interface definition module, the other is Specific data source accesses logic module, wherein the definition module of data access interface defines how report accesses a number According to, and specific data source accesses logic module, then specifically defines how to access to the data of some data source.
Word report template customized modules, provide model customization specification, and error detection is carried out to customized template.
Word report template conversion modules provide the transfer process that scripting is carried out to the Word templates that user writes, An executable script file will finally be generated.
Data access interface module defines how to access to data, and script sentence passes through data access in template Interface obtains data reporting source data.
Shown in Fig. 2, the Word provided by the invention based on script reports automatic generation method, is divided into following steps:
1) data access interface is defined
2) custom built forms
3) template switch
3) report is generated
The embodiment of the present invention defines a kind of distinctive data-interface definition, and facilitating model customization, person carries out data-interface Definition explanation, basic format example are as follows:
Custom built forms process is completed in Word document completely.The present embodiment defines script expression in a kind of Word document Mode, by that { } will be used as special marking symbol, it is believed that wherein content is exactly script or set content, and present invention support is a variety of Setting, such as!Can be used for being inserted into annotation information.
Customized Word report templates are converted to executable script by template conversion process.
The process for generating report is exactly that various resource coordinations are appropriate, then executes the executable script being converted into, most The result that executable script generates eventually is exactly that final Word is reported.
Specific embodiments of the present invention are described above.It is to be appreciated that the invention is not limited in above-mentioned Particular implementation, those skilled in the art can make various deformations or amendments within the scope of the claims, this not shadow Ring the substantive content of the present invention.

Claims (8)

1. a kind of expansible Word report preparing systems based on script, which is characterized in that including Word report template custom molds It is fixed to provide template for block, Word report templates conversion module, data access interface module, the Word report templates customized module Specification processed carries out error detection to customized template;The Word report templates conversion module is provided and is write to user Word templates carry out the transfer process of scripting, will finally generate an executable script file;The data access interface Module defines how to access to data, and script sentence obtains data reporting source number by data access interface in template According to.
2. the expansible Word report preparing systems based on script according to claim 1, which is characterized in that the Word Report template customized module includes script prompt module and script check module.
3. the expansible Word report preparing systems based on script according to claim 1, which is characterized in that the Word Report template conversion module includes the conversion of Script Action processing module, Word paragraph contents integration module and XML to script Module, wherein it is to merge paragraph content that Word paragraph contents, which integrate module, and the conversion module of XML to script is used for carry The XML results of script markup are converted to an executable script file.
4. the expansible Word report preparing systems based on script according to claim 1, which is characterized in that the data Access interface module includes that the definition module of data access interface and specific data source access logic module, wherein data are visited Ask that the definition module of interface defines how report accesses a data, and specific data source accesses logic module, defines How to access to the data of some data source.
5. a kind of expansible Word report-generating methods based on script, which is characterized in that using as appointed in Claims 1-4 System described in one is completed, including steps are as follows:
1) data access interface is write;
2) report template is customized;
3) report template is converted to executable scripted code.
6. the expansible Word report-generating methods based on script according to claim 5, which is characterized in that the step It is rapid 1) in its source of data do not limit, be any data format.
7. the expansible Word report-generating methods based on script according to claim 5, which is characterized in that the step 2) in, script is inserted by the template script edit mode of definition, the Show Styles of control report, data processing in script Journey, the final report template for customizing Word forms.
8. the expansible Word report-generating methods based on script according to claim 5, which is characterized in that the step 3) in, by report file format analysis, being readjusted to the XML file in Docx files, corresponding hold is generated It travels far and wide this document.
CN201510070571.7A 2015-02-10 2015-02-10 Expansible Word report preparing systems and method based on script Active CN104657340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510070571.7A CN104657340B (en) 2015-02-10 2015-02-10 Expansible Word report preparing systems and method based on script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510070571.7A CN104657340B (en) 2015-02-10 2015-02-10 Expansible Word report preparing systems and method based on script

Publications (2)

Publication Number Publication Date
CN104657340A CN104657340A (en) 2015-05-27
CN104657340B true CN104657340B (en) 2018-09-11

Family

ID=53248490

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510070571.7A Active CN104657340B (en) 2015-02-10 2015-02-10 Expansible Word report preparing systems and method based on script

Country Status (1)

Country Link
CN (1) CN104657340B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446945B (en) * 2015-12-01 2017-12-01 广东电网有限责任公司电网规划研究中心 Word marks report-generating method
CN112114891A (en) * 2020-08-04 2020-12-22 中国电力科学研究院有限公司 Plug-in-based visual Word report generation system
CN112035565A (en) * 2020-09-03 2020-12-04 天元大数据信用管理有限公司 Method for generating sql script according to word document

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976235A (en) * 2010-09-21 2011-02-16 天津神舟通用数据技术有限公司 Extensible Word report automatically-generating method based on dynamic web page
CN103020027A (en) * 2012-11-16 2013-04-03 北京北森测评技术有限公司 Method, device and system for generating dynamic report

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1789892A2 (en) * 2004-08-02 2007-05-30 JustSystems Corporation A document processing and management approach to adding an exclusive plugin implementing a desired functionality
US7861153B2 (en) * 2005-10-03 2010-12-28 Advisys, Inc. System and method for document construction
CN101383871B (en) * 2007-09-06 2012-02-22 中兴通讯股份有限公司 Network element configuration implementing method and apparatus
US8706709B2 (en) * 2009-01-15 2014-04-22 Mcafee, Inc. System and method for intelligent term grouping
CN102693183B (en) * 2012-05-30 2015-04-01 瑞斯康达科技发展股份有限公司 Method and system for realizing automatic software testing
CN103678511B (en) * 2013-11-25 2016-11-16 北京奇虎科技有限公司 The method and device of webpage content extraction is carried out according to visual template

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976235A (en) * 2010-09-21 2011-02-16 天津神舟通用数据技术有限公司 Extensible Word report automatically-generating method based on dynamic web page
CN103020027A (en) * 2012-11-16 2013-04-03 北京北森测评技术有限公司 Method, device and system for generating dynamic report

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于VSTO的Word数据自动化提取及报告生成系统的设计与开发;惠怡静 等;《产业聚焦软件园》;20131001;第59-60页 *
基于动态网页的Word报告自动生成方法;刘鹏 等;《计算机工程》;20120305;第38卷(第5期);第279-280、284页 *

Also Published As

Publication number Publication date
CN104657340A (en) 2015-05-27

Similar Documents

Publication Publication Date Title
CN103778107B (en) Method and platform for quickly and dynamically generating form based on EXCEL
CN105528418B (en) A kind of design documentation generation method and device
CN110968294B (en) Business domain model establishing system and method
CN106469140A (en) A kind of report generating system and its method
CN103838672A (en) Automated testing method and device for all-purpose financial statements
CN110941427B (en) Code generation method and code generator
CN104731588B (en) Page layout document generating method and page layout file creating apparatus
US20130144920A1 (en) Creating a configuration file template
CN104572577B (en) Mathematical formulae processing method and processing device
CN104657340B (en) Expansible Word report preparing systems and method based on script
CN104298705A (en) Converting method of relational data and unstructured data
Muslim et al. A modular and extensible framework for open learning analytics
WO2023155274A1 (en) Recruitment information publishing method and apparatus based on rpa and ai
CN107392560A (en) A kind of Excel list datas issue acquisition method and system based on internet
Hardisty et al. The specimen data refinery: a canonical workflow framework and FAIR digital object approach to speeding up digital mobilisation of natural history collections
CN109325217B (en) File conversion method, system, device and computer readable storage medium
Chen et al. A Structured Information Extraction Algorithm for Scientific Papers based on Feature Rules Learning.
Zuccon et al. MrEnt: an editor for publication‐quality phylogenetic tree illustrations
CN108845857A (en) A kind of icon management method and device based on cloud platform
CN115169578A (en) AI model production method and system based on meta-space data markers
Vostrikov et al. Training sample generation software
CN114118026B (en) Automatic document generation method and device, computer storage medium and electronic equipment
JP7269244B2 (en) Systems and methods for providing globalization capabilities in service management application interfaces
Liu Integrating process mining with discrete-event simulation modeling
US11036932B2 (en) Technology platform having integrated content creation features

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 201203 Shanghai City, Pudong New Area Chinese (Shanghai) free trade zone 498 GuoShouJing Road No. 14 building block 22301-985

Applicant after: VISION MICROSYSTEMS (SHANGHAI) Co.,Ltd.

Address before: 201203 Shanghai Guo Shou Jing Road, Zhangjiang High Tech Park of Pudong New Area No. 498 Pudong Software Park building 14, block 22301-985

Applicant before: VISION MICROSYSTEMS (SHANGHAI) CO.,LTD.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Block 22301-985, Building 14, No. 498 Guo Shoujing Road, China (Shanghai) Pilot Free Trade Zone, Pudong New Area, Shanghai, March 2012

Patentee after: Shanghai Chuangjing Information Technology Co.,Ltd.

Country or region after: China

Address before: Block 22301-985, Building 14, No. 498 Guo Shoujing Road, China (Shanghai) Pilot Free Trade Zone, Pudong New Area, Shanghai, March 2012

Patentee before: VISION MICROSYSTEMS (SHANGHAI) Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address