CN111046643A - System and method for generating excel form by rapid customization, server and medium - Google Patents

System and method for generating excel form by rapid customization, server and medium Download PDF

Info

Publication number
CN111046643A
CN111046643A CN201911160714.8A CN201911160714A CN111046643A CN 111046643 A CN111046643 A CN 111046643A CN 201911160714 A CN201911160714 A CN 201911160714A CN 111046643 A CN111046643 A CN 111046643A
Authority
CN
China
Prior art keywords
excel
generating
data
customizing
plain text
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
CN201911160714.8A
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.)
Fangzheng Zhushi Wuhan Technology Development Co ltd
Original Assignee
Fangzheng Zhushi Wuhan Technology Development 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 Fangzheng Zhushi Wuhan Technology Development Co ltd filed Critical Fangzheng Zhushi Wuhan Technology Development Co ltd
Priority to CN201911160714.8A priority Critical patent/CN111046643A/en
Publication of CN111046643A publication Critical patent/CN111046643A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The system, the method, the server and the medium for generating the excel form by rapid customization, provided by the invention, are used for generating a data template of the excel form by pre-customization; writing the collected original data into a plain text file; and calling a document starting interface to combine the plain text file with the data template and automatically generating an excel data form, thereby simplifying the complexity of generating documents by developing languages and improving the efficiency of generating the documents in large batch.

Description

System and method for generating excel form by rapid customization, server and medium
Technical Field
The invention relates to the technical field of data processing, in particular to a system and a method for generating an excel form by rapid customization, a server and a medium.
Background
At present, the logic for automatically generating an excel table through data is to call an interface for generating excel, generate a file, generate a sheet, generate a cell style, fill data and the like, most of the process uses an interface provided by a third party, for example, a java program can be generated by using an API interface provided by an Apache POI open source library, when the program is processed, corresponding API processing needs to be called for each detail of the document, for example, an excel document relates to document creation and storage, sheet definition, row and column definition, cell style definition and the like, the complexity of document data and document styles is involved, and when a large amount of documents need to be generated, the processing efficiency of the program is greatly reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a system, a method, a server, and a medium for generating an excel form in a fast customized manner, so that complexity of generating a document in a development language can be simplified, and efficiency of generating a large amount of documents can be improved.
In a first aspect of the embodiments of the present invention, a method for generating an excel form by fast customization is provided, where the method for generating an excel form by fast customization includes the following steps:
customizing a data template for generating an excel form in advance;
collecting and sorting original data, and writing the original data into a plain text file;
and calling a document starting interface to combine the plain text file with the data template, and automatically generating an excel data form.
In a second aspect of the embodiments of the present invention, a system for generating an excel form by fast customization is provided, where the system for generating an excel form by fast customization includes the following functional modules:
the template customizing module is configured to customize a data template for generating the excel form in advance;
the text generation module is configured to collect and arrange original data and write the original data into a plain text file;
and the form generation module is configured to call a document starting interface to combine the plain text file with the data template and automatically generate the excel data form.
In a third aspect of the embodiments of the present invention, a server is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the steps of the method for rapidly customizing an excel table.
In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of the method for generating an excel table by fast customization, as described above.
The method for generating the excel form by rapid customization, provided by the invention, is characterized in that a data template of the excel form is generated by pre-customization; writing the collected original data into a plain text file; and calling a document starting interface to combine the plain text file with the data template and automatically generating an excel data form, thereby simplifying the complexity of generating documents by developing languages and improving the efficiency of generating the documents in large batch.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flow chart of steps of a method for generating an excel form by rapid customization according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a form template manufactured by a method for generating an excel form by fast customization according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an excel form generated by a method for generating an excel form by fast customization according to an embodiment of the present invention;
fig. 4 is a functional block diagram of a system for rapidly customizing an excel form according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, a method for generating an excel form by fast customization provided by an embodiment of the present invention includes the following steps:
and S1, customizing a data template for generating the excel form in advance.
Specifically, the data template for generating the excel form in advance in a customized manner includes the following contents:
1. customizing template numbers;
2. customizing an overall display structure of the document content;
3. customizing the positions of the variables;
4. and customizing the display form of each style, and setting the style of the cell.
Specifically, variable values are defined in the first two sheet pages in the template, for example, various styles to be used by the cells are defined first, different variables are used for representing different styles, and the styles represented by the variables are directly used for replacement when the document is generated, so that the frequent calling of an API (application programming interface) for generating the cell styles is avoided.
To better illustrate the technical solution of the present invention, assuming that a form for the age condition survey of the attendees needs to be made, the excel data form mode, the style of each row of cells, the data embedded in the cells and the format thereof need to be listed in the data template, for example, the first row of the form is written with a header "attendee age survey statistical table"; table second row blank setting; the third row of the table writes "number of respondents to survey"; the fourth row of the table writes a specific date "date: 2019/04/2021:22 "; the table fifth and sixth rows blank settings; write "running up" in the seventh row of the table; the eighth to seventeenth rows of the table are solid line tables, and data embedded in the table, the format of the data, and the like are set. A specific form template is shown in fig. 2.
And S2, collecting and sorting the original data, and writing the original data into a plain text file.
Specifically, the plain text file is a csv file or a tsv file; in a plain text file, each line of original data is preceded by relevant instructions of the line of original data in an excel table, wherein the relevant instructions comprise a style instruction, a position instruction, a format instruction and a data form instruction.
The original data includes the number of the participants, the age and sex of each participant, and the like, and then the data is written into the csv file in combination with the data template customized in step S1, wherein the data form in the csv file is as follows:
age survey statistics for participants
REPLACE, FORMTITLE, number of survey respondents
REPLACE,GENTIME,,,${G_GENTIME}:2019/04/2021:22
REPLACE,INFO1,,,
REPLACE, INFO2, cumulative
INSERT, DATA, STYLE _ DEP903_ STANDARD, generations 1,10, 1396,460,636
INSERT, DATA, STYLE _ DEP903_ STANDARD, generations 2,20, 8340,4330,4010
INSERT, DATA, STYLE _ DEP903_ STANDARD, generations 2,30, 11233,6026,5204
INSERT, DATA, STYLE _ DEP903_ STANDARD, generations 2,40, 16551,8969,4582
INSERT, DATA, STYLE _ DEP903_ STANDARD, generations 2,50, 18400,9581,8819
INSERT, DATA, STYLE _ DEP903_ STANDARD, generations 2,60, 20289,10465,9824
INSERT, DATA, STYLE _ DEP903_ STANDARD,3, over 40 years old, 23844,11658,12216
INSERT, DATA, STYLE _ DEP903_ STANDARD,4, Total, 100083,51489,48294
CLOSE。
S3, calling a document starting interface to combine the plain text file with the data template, and automatically generating an excel data form; the document starting interface is an API interface; the resulting table is shown in fig. 3.
The method for generating the excel form by rapid customization, provided by the invention, is characterized in that a data template of the excel form is generated by pre-customization; writing the collected original data into a plain text file; and calling a document starting interface to combine the plain text file with the data template and automatically generating an excel data form, thereby simplifying the complexity of generating documents by developing languages and improving the efficiency of generating the documents in large batch.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The system for generating the excel form through rapid customization is mainly described above, and the system for generating the excel form through rapid customization is described in detail below.
Fig. 4 shows a functional block diagram of a method for rapidly customizing an excel form according to an embodiment of the present invention. As shown in fig. 4, the system for generating excel forms by rapid customization includes the following functional modules:
the template customizing module 10 is configured to customize a data template for generating an excel form in advance;
the text generation module 20 is configured to collect and sort original data, and write the original data into a plain text file;
and the form generation module 30 is configured to call a document starting interface to combine the plain text file with the data template, and automatically generate an excel data form.
Fig. 5 is a schematic diagram of a server structure for fast customizing generated excel forms according to an embodiment of the present invention. The server is a device for providing computing services, and generally refers to a computer with high computing power, which is provided to a plurality of users through a network. As shown in fig. 5, the server 4 of this embodiment includes: a memory 41, a processor 42, and a system bus 43, the memory 41 including an executable program 411 stored thereon, it being understood by those skilled in the art that the terminal device structure shown in fig. 5 does not constitute a limitation of the terminal device, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
The following specifically describes each constituent component of the terminal device with reference to fig. 5:
the memory 41 may be used to store software programs and modules, and the processor 42 executes various functional applications and data processing of the terminal by operating the software programs and modules stored in the memory 41. The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The executable program 411 for fast customizing the method for generating the excel form is contained in the memory 41, the executable program 411 can be divided into one or more modules/units, the one or more modules/units are stored in the memory 41 and executed by the processor 42 to complete the transmission of the notice and obtain the notice implementation process, and the one or more modules/units can be a series of instruction segments of the computer program capable of completing specific functions, and the instruction segments are used for describing the execution process of the computer program 411 in the server 4. For example, the computer program 411 may be divided into an acquisition module, a comparison module, a concatenation module and a sending module.
The processor 42 is a control center of the server, connects various parts of the entire terminal device with various interfaces and lines, performs various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 41 and calling data stored in the memory 41, thereby monitoring the terminal as a whole. Alternatively, processor 42 may include one or more processing units; preferably, the processor 42 may integrate an application processor, which primarily handles operating systems, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 42.
The system bus 43 is used to connect functional units inside the computer, and can transmit data information, address information, and control information, and may be, for example, a PCI bus, an ISA bus, a VESA bus, or the like. The instructions of the processor 42 are transmitted to the memory 41 through the bus, the memory 41 feeds back data to the processor 42, and the system bus 43 is responsible for data and instruction interaction between the processor 42 and the memory 41. Of course, the system bus 43 may also access other devices such as network interfaces, display devices, etc.
The server at least includes a CPU, a chipset, a memory, a disk system, and the like, and other components are not described herein again.
In the embodiment of the present invention, the executable program executed by the processor 42 included in the terminal specifically includes: a method for generating excel forms in a rapid customization mode comprises the following steps:
customizing a data template for generating an excel form in advance;
collecting and sorting original data, and writing the original data into a plain text file;
and calling a document starting interface to combine the plain text file with the data template, and automatically generating an excel data form.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art would appreciate that the modules, elements, and/or method steps of the various embodiments described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for generating an excel form through rapid customization is characterized by comprising the following steps:
customizing a data template for generating an excel form in advance;
collecting and sorting original data, and writing the original data into a plain text file;
and calling a document starting interface to combine the plain text file with the data template, and automatically generating an excel data form.
2. The method for rapid customized excel form generation according to claim 1, wherein each line of raw data is preceded by the relevant instruction of the line of raw data in the excel form in a plain text file.
3. The method for generating excel forms according to claim 2, characterized in that the related instructions comprise a style instruction, a position instruction, a format instruction and a dataform instruction.
4. The method for rapidly customizing excel forms according to claim 1, wherein the data templates for generating excel forms in a pre-customization mode comprise the following contents:
customizing template numbers;
customizing an overall display structure of the document content;
customizing the positions of the variables;
and customizing the display form of each style, and setting the style of the cell.
5. The method for generating excel forms according to claim 1, characterized in that the plain text file is a csv file or a tsv file.
6. The method for generating excel forms according to claim 1, characterized in that the document starting interface is an API interface.
7. The system for generating the excel form through rapid customization is characterized by comprising the following functional modules:
the template customizing module is configured to customize a data template for generating the excel form in advance;
the text generation module is configured to collect and arrange original data and write the original data into a plain text file;
and the form generation module is configured to call a document starting interface to combine the plain text file with the data template and automatically generate the excel data form.
8. A server comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements the steps of the method for fast customising the generation of an excel form according to any one of claims 1 to 4 when executing said computer program.
9. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of a method for rapid customisation of the generation of an excel form according to one of the claims 1 to 4.
CN201911160714.8A 2019-11-23 2019-11-23 System and method for generating excel form by rapid customization, server and medium Pending CN111046643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911160714.8A CN111046643A (en) 2019-11-23 2019-11-23 System and method for generating excel form by rapid customization, server and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911160714.8A CN111046643A (en) 2019-11-23 2019-11-23 System and method for generating excel form by rapid customization, server and medium

Publications (1)

Publication Number Publication Date
CN111046643A true CN111046643A (en) 2020-04-21

Family

ID=70233245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911160714.8A Pending CN111046643A (en) 2019-11-23 2019-11-23 System and method for generating excel form by rapid customization, server and medium

Country Status (1)

Country Link
CN (1) CN111046643A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005050325A (en) * 2003-07-14 2005-02-24 Oes:Kk Method for extracting character data on drawing, method for forming quantity account, and program
CN101231665A (en) * 2008-02-20 2008-07-30 中兴通讯股份有限公司 Apparatus and method for educing data into Excel files from database
US20110055687A1 (en) * 2009-08-25 2011-03-03 International Business Machines Corporation Generating formatted documents
US20120173969A1 (en) * 2010-12-31 2012-07-05 Klemens Schmid Master Templates For Document Generation
CN105045775A (en) * 2015-08-12 2015-11-11 深圳联友科技有限公司 Method and apparatus for generating Excel document in designated format
CN105446948A (en) * 2015-11-13 2016-03-30 武汉鸿图节能技术有限公司 Report automatic generation method and system
CN107688456A (en) * 2017-05-05 2018-02-13 平安科技(深圳)有限公司 Document generating method, equipment and computer-readable recording medium
CN109783480A (en) * 2018-12-19 2019-05-21 深圳供电局有限公司 It is a kind of to dispatch method and system, the electronic equipment, medium that annual report generates
CN109948134A (en) * 2019-03-21 2019-06-28 润电能源科学技术有限公司 A kind of report automatic generation method, system and electronic equipment and storage medium
CN110347989A (en) * 2019-07-04 2019-10-18 北京明略软件系统有限公司 The generation method and device of electrical form

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005050325A (en) * 2003-07-14 2005-02-24 Oes:Kk Method for extracting character data on drawing, method for forming quantity account, and program
CN101231665A (en) * 2008-02-20 2008-07-30 中兴通讯股份有限公司 Apparatus and method for educing data into Excel files from database
US20110055687A1 (en) * 2009-08-25 2011-03-03 International Business Machines Corporation Generating formatted documents
US20120173969A1 (en) * 2010-12-31 2012-07-05 Klemens Schmid Master Templates For Document Generation
CN105045775A (en) * 2015-08-12 2015-11-11 深圳联友科技有限公司 Method and apparatus for generating Excel document in designated format
CN105446948A (en) * 2015-11-13 2016-03-30 武汉鸿图节能技术有限公司 Report automatic generation method and system
CN107688456A (en) * 2017-05-05 2018-02-13 平安科技(深圳)有限公司 Document generating method, equipment and computer-readable recording medium
CN109783480A (en) * 2018-12-19 2019-05-21 深圳供电局有限公司 It is a kind of to dispatch method and system, the electronic equipment, medium that annual report generates
CN109948134A (en) * 2019-03-21 2019-06-28 润电能源科学技术有限公司 A kind of report automatic generation method, system and electronic equipment and storage medium
CN110347989A (en) * 2019-07-04 2019-10-18 北京明略软件系统有限公司 The generation method and device of electrical form

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张海波;董槐林;: "一种基于POI的Web表格生成", 计算机技术与发展, no. 02, 10 February 2008 (2008-02-10), pages 21 - 23 *
白彦辉;: "Excel报表在Java技术中的应用研究", 赤峰学院学报(自然科学版), no. 10, 25 October 2011 (2011-10-25), pages 48 - 50 *
萧巍;: "Excel外部数据的获取", no. 15, pages 185 *

Similar Documents

Publication Publication Date Title
CN109542399B (en) Software development method and device, terminal equipment and computer readable storage medium
CN110399420B (en) Export method, electronic equipment and medium of configurable Excel format
CN107797826B (en) Rule configuration method based on rule engine, terminal and equipment
CN107590524A (en) The preparation method and device of a kind of electronic business card
CN103593194A (en) Object serialization method and device
CN105677371A (en) Method and system for quickly generating software interface
CN110286838B (en) Processing method, device, terminal and storage medium of session object
CN109918499A (en) A kind of file classification method, device, computer equipment and storage medium
CN111639473A (en) Excel file analysis method and device based on java, computer equipment and storage medium
CN109542878B (en) List creation method and device
CN112131837B (en) Service report configuration method, device, computer equipment and storage medium
CN110738035A (en) document template generation method and device
CN110018876A (en) The international method, apparatus of software application and electronic equipment
CN115794437A (en) Calling method and device of microservice, computer equipment and storage medium
US11106908B2 (en) Techniques to determine document recognition errors
CN108985215B (en) Picture processing method, picture processing device and terminal equipment
CN113641719A (en) Data processing method, data processing device, computer and storage medium
CN111443945B (en) Component code modification method and device
CN111046643A (en) System and method for generating excel form by rapid customization, server and medium
JP7469516B2 (en) Method, device, and storage medium for displaying and analyzing option information
CN113626438B (en) Data table management method, device, computer equipment and storage medium
WO2023015841A1 (en) Sql statement generation method, apparatus, and device based on artificial intelligence, and storage medium
CN114841604A (en) Cooperative task processing method, device and equipment and computer readable storage medium
CN111399722A (en) Mail signature generation method, device, terminal and storage medium
CN111241395A (en) Authentication service recommendation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination