CN104657340A - Expandable script-based Word report generating system and method - Google Patents

Expandable script-based Word report generating system and method Download PDF

Info

Publication number
CN104657340A
CN104657340A CN201510070571.7A CN201510070571A CN104657340A CN 104657340 A CN104657340 A CN 104657340A CN 201510070571 A CN201510070571 A CN 201510070571A CN 104657340 A CN104657340 A CN 104657340A
Authority
CN
China
Prior art keywords
script
report
word
data
template
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.)
Granted
Application number
CN201510070571.7A
Other languages
Chinese (zh)
Other versions
CN104657340B (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.)
Upper Seabird Scape Computer System Co Ltd
Original Assignee
Upper Seabird Scape Computer System 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 Upper Seabird Scape Computer System Co Ltd filed Critical Upper Seabird Scape Computer System Co 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

Abstract

The invention discloses an expandable script-based Word report generating system and an expandable script-based Word report generating method. The expandable script-based Word report generating system comprises a Word report template customizing module, a Word report template conversion module and a data access interface module; the Word report template customizing module provides a template customizing standard and carries out error detection on a template customized by a user; the Word report template conversion module provides a conversion process of carrying out scripting the Word template written by the user and finally generates an executable script file; the data access interface module defines how to access data; script statements in the template acquire data of a report data source by a data access interface. The system and the method which are provided by the invention solve the problems of inflexibility for format control and inconvenience for data processing.

Description

Easily extensible is based on the Word report preparing system of script and method
Technical field
The present invention relates to Computer Applied Technology field, in particular, relate to a kind of easily extensible based on the report preparing system of script and method.
Background technology
Word is usable range word processor the most widely in the world, a large amount of word reports is had every day to need establishment, such as run in daily management mission at server, the ruuning situation for each station server all needs to write daily paper, weekly, monthly magazine, quarterly report and annual report.The form of these reports is nearly all fixing, and the design parameter just wherein related to is different with data.Manually process if only relied on, a large amount of inquiries, copy and paste work, not only loaded down with trivial details, consuming time, inefficiency, but also easily make mistakes, reduce the accuracy of report.Therefore, the automatic generation function studying word report has important using value.
Docx form is the up-to-date Word file standard form of Microsoft's definition, and it uses XML to carry out description of symbols to file content, is a kind of file layout of opposing open.
At present, Word reports that automatic generation method has following several:
1, document cursor tracking localization method (the Word Report Generation Function Based based on C#.NET is developed, computer engineering and application, 2008,44 (9): 104-106 for Ye Ming, Zhang Zheng).
The cardinal principle of the method is the corresponding form of initial sum controlling document content by following the tracks of and control Word document interior lights target position, and on relevant position, insert the content of specifying.Its shortcoming is: the space of a whole page of report, pattern and content must be inputted by procedure order; In addition, the program is sufficiently complete, does not relate to user and operates the screening of data message.
2, utilize OLE or COM technology directly control Word (Lu Baoyu, Yang Xinfang, with Delphi generate Word report and dynamic structure form, computer software and application, 2007,4 (3): 180-183; Kong Lingyan, yellow flourishing, Jiang Qingxiang etc., use Visual Basic to handle Microsoft Word object and generate report file, computer engineering and application, 2003,39 (36): 115-117).
The cardinal principle of the method utilizes OLE or COM technology directly control Word, column information in database table structure is inserted in Word document as label to define template, self-defined forms connection data storehouse is added in Word, from database, read data when generating document, and Auto-writing is on the relevant position in template.
3, based on the Word document automatic generation method (Ge Fen, Wu Ning, based on the Word design documentation automatic Generation Platform of multiple technologies, Journal of UEST of China, 2007,36 (2)) of multiple technologies.
The cardinal principle of the method utilizes VBA to adopt the form inserting annotations and comments to arrange label the part that can allow in the general file of one section of specification to be replaced, and document and label information are wherein stored in database server, next step provides input frame to be label assignment by user on the Asp page, and the content finally utilizing user input values to replace label place in general file generates new document.Its shortcoming is: VBA program is all embedded in client Word application program, and it is convenient not to dispose; And VBA interface element is abundant not, only support simple Characters form, backstage method support is not had for form, picture etc.
Above technology is direct control Word document object all mainly, and its common defects is that form control is dumb, and data processing is inconvenient.
Summary of the invention
The present invention is directed to the technical matters existed in above-mentioned prior art, the Word report preparing system of a kind of easily extensible based on script and method are provided, solve form and control the problem dumb, data processing is inconvenient.
For achieving the above object, the technical solution adopted in the present invention is as follows:
Easily extensible, based on a Word report preparing system for script, comprises Word report template customized module, Word report template modular converter, data access interface module.
Word report template customized module, provides model customization specification, carries out error-detecting to the template of customization.
Word report template modular converter, provides the transfer process that the Word template of writing user carries out scripting, generates an executable script file the most at last.
Data access interface module, defines and how to conduct interviews to data, and in template, script sentence obtains report data source data by data access interface.
Described Word report template customized module comprises script prompt module and script checking module.
Described Word report template modular converter comprises Script Action processing module, Word paragraph content integrate module and the XML modular converter to script, wherein, Word paragraph content integrate module is merged paragraph content, and XML is used for the XML results conversion with script markup being an executable script file to the modular converter of script.
Described data access interface module comprises the definition module of data access interface and concrete data source access logic module, wherein, the definition module of data access interface defines report and how to access data, and concrete data source access logic module, define and how the data of certain data source are conducted interviews.
Easily extensible, based on a Word report-generating method for script, adopts above-mentioned system, comprises the following steps:
1) data access interface is write
Do not limit to certain specific derived data form, the data genaration Word of arbitrary format can be reported, but the data for special format need to provide a data access interface, concerning report template customization personnel, be only concerned about the data access interface used, be indifferent to data layout.
2) report template is customized
Insert script, the Show Styles of control report in script, data handling procedure by the template script edit mode of definition, net result is exactly the report template of a Word form customized.
3) report template is converted into executable scripted code
By to report file format analysis, the XML file in Docx file is readjusted, generate corresponding performed script file.
The beneficial effect of technical solution of the present invention is as follows:
The present invention not only can customize various data content very flexibly, and can customize report style very flexibly, and the present invention does not limit final quoted result number of pages, and several thousand pages of reports can normal process.
Accompanying drawing explanation
By reading the detailed description done non-limiting example with reference to the following drawings, other features, objects and advantages of the present invention will become more obvious:
Fig. 1 is the block diagram of system of one embodiment of the invention;
Fig. 2 is the workflow diagram of one embodiment of the invention.
Embodiment
Below in conjunction with specific embodiment, the present invention is described in detail.Following examples will contribute to those skilled in the art and understand the present invention further, but not limit the present invention in any form.It should be pointed out that to those skilled in the art, without departing from the inventive concept of the premise, some distortion and improvement can also be made.These all belong to protection scope of the present invention.
Shown in Fig. 1, easily extensible provided by the present invention, based on the Word report preparing system of script, comprises, Word report template customized module, Word report template modular converter, data access interface module.
Word report template customized module, comprises again script prompt module, script checking module.
Word report template modular converter comprises again Script Action processing module, Word paragraph content integrate module, XML is to the modular converter of script, and wherein Script Action processing module is by some special actions, such as script is moved to XML present node outer, in the XML structure of application.Word paragraph content integrate module, mainly merges paragraph content, because a paragraph content may be stored in multiple XML node by Word, if so will analyze script information, paragraph must be carried out merging treatment.XML is to the modular converter of script, and it is an executable script file that this module is used for the XML results conversion with script markup.
Data access interface module contains two parts, one is the definition module of data access interface, another is concrete data source access logic module, wherein, the definition module of data access interface defines report and how to access data, and concrete data source access logic module, then how concrete defining conducts interviews to the data of certain data source.
Word report template customized module, provides model customization specification, carries out error-detecting to the template of customization.
Word report template modular converter, provides the transfer process that the Word template of writing user carries out scripting, generates an executable script file the most at last.
Data access interface module, defines and how to conduct interviews to data, and in template, script sentence obtains report data source data by data access interface.
Shown in Fig. 2, the Word based on script provided by the invention 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 person carries out defined declaration to data-interface to facilitate model customization, and basic format example is as follows:
Custom built forms process completes completely in Word document.The present embodiment defines the mode that script in a kind of Word document is expressed, by by { } as special marking symbol, think that wherein content is exactly script or arranges content, the present invention supports multiple setting, such as! Can be used for inserting annotation information.
The Word report template of customization is converted to executable script by template conversion process.
The process of generation report is exactly by appropriate for various resource coordination, then performs the performed script transforming and generate, and the result that finally can perform script generation is exactly final Word report.
Above specific embodiments of the invention are described.It is to be appreciated that the present invention is not limited to above-mentioned particular implementation, those skilled in the art can make various distortion or amendment within the scope of the claims, and this does not affect flesh and blood of the present invention.

Claims (8)

1. an easily extensible is based on the Word report preparing system of script, it is characterized in that, comprise Word report template customized module, Word report template modular converter, data access interface module, described Word report template customized module, model customization specification is provided, error-detecting is carried out to the template of customization; Described Word report template modular converter, provides the Word template of writing user to carry out the transfer process of scripting, generates an executable script file the most at last; Described data access interface module, defines and how to conduct interviews to data, and in template, script sentence obtains report data source data by data access interface.
2. easily extensible according to claim 1 is based on the report preparing system of script, it is characterized in that, described Word report template customized module comprises script prompt module and script checking module.
3. easily extensible according to claim 1 is based on the report preparing system of script, it is characterized in that, described Word report template modular converter comprises Script Action processing module, Word paragraph content integrate module and the XML modular converter to script, wherein, Word paragraph content integrate module is merged paragraph content, and XML is used for the XML results conversion with script markup being an executable script file to the modular converter of script.
4. easily extensible according to claim 1 is based on the report preparing system of script, it is characterized in that, described data access interface module comprises the definition module of data access interface and concrete data source access logic module, wherein, the definition module of data access interface defines report and how to access data, and concrete data source access logic module, define and how the data of certain data source are conducted interviews.
5. easily extensible is based on a Word report-generating method for script, it is characterized in that, adopts as the system as described in arbitrary in Claims 1-4 has been come, comprises step as follows:
1) data access interface is write;
2) report template is customized;
3) report template is converted into executable scripted code.
6. easily extensible according to claim 5 is based on the report-generating method of script, it is characterized in that, to described step 1) in its source of data not do not limit, be any data format.
7. easily extensible according to claim 5 is based on the report-generating method of script, it is characterized in that, described step 2) in, script is inserted by the template script edit mode of definition, Show Styles, the data handling procedure of control report in script, the report template of final customization Word form.
8. easily extensible according to claim 5 is based on the report-generating method of script, it is characterized in that, described step 3) in, by report file format analysis, XML file in Docx file is readjusted, generates corresponding performed script file.
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 true CN104657340A (en) 2015-05-27
CN104657340B 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)

Cited By (3)

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

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070079231A1 (en) * 2005-10-03 2007-04-05 System and method for document construction
CN101073076A (en) * 2004-08-02 2007-11-14 佳思腾软件公司 Document processing and management approach for creating a tag or an attribute in a markup language document, and method thereof
CN101383871A (en) * 2007-09-06 2009-03-11 中兴通讯股份有限公司 Network element configuration implementing method and apparatus
CN101976235A (en) * 2010-09-21 2011-02-16 天津神舟通用数据技术有限公司 Extensible Word report automatically-generating method based on dynamic web page
CN102693183A (en) * 2012-05-30 2012-09-26 瑞斯康达科技发展股份有限公司 Method and system for realizing automatic software testing
CN103020027A (en) * 2012-11-16 2013-04-03 北京北森测评技术有限公司 Method, device and system for generating dynamic report
US20130246337A1 (en) * 2009-01-15 2013-09-19 Mcafee, Inc. System and Method for Intelligent Term Grouping
CN103678511A (en) * 2013-11-25 2014-03-26 北京奇虎科技有限公司 Method and device for extracting webpage content according to visualized template

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101073076A (en) * 2004-08-02 2007-11-14 佳思腾软件公司 Document processing and management approach for creating a tag or an attribute in a markup language document, and method thereof
US20070079231A1 (en) * 2005-10-03 2007-04-05 System and method for document construction
CN101383871A (en) * 2007-09-06 2009-03-11 中兴通讯股份有限公司 Network element configuration implementing method and apparatus
US20130246337A1 (en) * 2009-01-15 2013-09-19 Mcafee, Inc. System and Method for Intelligent Term Grouping
CN101976235A (en) * 2010-09-21 2011-02-16 天津神舟通用数据技术有限公司 Extensible Word report automatically-generating method based on dynamic web page
CN102693183A (en) * 2012-05-30 2012-09-26 瑞斯康达科技发展股份有限公司 Method and system for realizing automatic software testing
CN103020027A (en) * 2012-11-16 2013-04-03 北京北森测评技术有限公司 Method, device and system for generating dynamic report
CN103678511A (en) * 2013-11-25 2014-03-26 北京奇虎科技有限公司 Method and device for extracting webpage content according to visualized template

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘鹏 等: "基于动态网页的Word报告自动生成方法", 《计算机工程》 *
卢远镭等: "基于Perl与CGI的报告自动生成方法研究", 《核电子学与探测技术》 *
惠怡静 等: "基于VSTO的Word数据自动化提取及报告生成系统的设计与开发", 《产业聚焦软件园》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446945A (en) * 2015-12-01 2016-03-30 广东电网有限责任公司电网规划研究中心 Word mark report generation method
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

Also Published As

Publication number Publication date
CN104657340B (en) 2018-09-11

Similar Documents

Publication Publication Date Title
US10699067B2 (en) Form design and data input in which a server provides a repository of form templates that are distributed to multiple form filing client systems
CN103778107B (en) Method and platform for quickly and dynamically generating form based on EXCEL
Pauliuk et al. Lifting industrial ecology modeling to a new level of quality and transparency: a call for more transparent publications and a collaborative open source software framework
CN102651055B (en) Method and system for generating file based on medical image
CN108595171B (en) Object model generation method, device, equipment and storage medium
CN110941427B (en) Code generation method and code generator
US20130124969A1 (en) Xml editor within a wysiwyg application
CN109683881B (en) Code format adjusting method and device
CN110968294B (en) Business domain model establishing system and method
Koznov et al. Clone detection in reuse of software technical documentation
Kopp et al. Markdown Architectural Decision Records: Format and Tool Support.
CN104657340A (en) Expandable script-based Word report generating system and method
CN104298705A (en) Converting method of relational data and unstructured data
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
CN113421657B (en) Knowledge representation model construction method and device of clinical practice guideline
US20150088592A1 (en) Converting a text operational manual into a business process model or workflow diagram
CN105718434A (en) Natural language formula editing method and system
US9146913B2 (en) Specifications automation system and method
US9916315B2 (en) Computer implemented system and method for comparing at least two visual programming language files
Byson et al. Software Architecture and Software Usability: A Comparison of Data Entry Form Designing Configurable Platforms.
Georgiades et al. Automatic generation of a software requirements specification (SRS) document
CN114118026A (en) Automatic document generation method and device, computer storage medium and electronic equipment
CN108228688B (en) Template generation method, system and server based on XBRL
Jumaa et al. XML based mediation for automating the storage of SCP-ECG data into relational databases
CN109522370A (en) A kind of automatic table generation method and device based on SQL

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
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: Shanghai chuangkin Mdt InfoTech 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: Upper SeaBird scape computer system company limited

GR01 Patent grant
GR01 Patent grant