CN109684608A - It is a kind of that the method and system of generation EXCEL document are passed through based on database - Google Patents

It is a kind of that the method and system of generation EXCEL document are passed through based on database Download PDF

Info

Publication number
CN109684608A
CN109684608A CN201710980088.1A CN201710980088A CN109684608A CN 109684608 A CN109684608 A CN 109684608A CN 201710980088 A CN201710980088 A CN 201710980088A CN 109684608 A CN109684608 A CN 109684608A
Authority
CN
China
Prior art keywords
excel
configuration information
database
attribute
cell
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
CN201710980088.1A
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.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN201710980088.1A priority Critical patent/CN109684608A/en
Publication of CN109684608A publication Critical patent/CN109684608A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a kind of methods for generating EXCEL document based on database, which comprises the configuration information based on field in database configures the attribute of the cell of at least one database table, saves the database table including configuration information;EXCEL worksheet is created, the configuration information in the database table is read, according to the configuration information, configures the attribute of the cell of EXCEL worksheet;The EXCEL worksheet for being configured with the attribute of cell is saved, EXCEL document is generated.The configuration to EXCEL document is completed by the configuration information in database table, standardizes the configuration of EXCEL document more, prevents user's Introduced cases mistake, improves the accuracy and validity of EXCEL document data.

Description

It is a kind of that the method and system of generation EXCEL document are passed through based on database
Technical field
The present invention relates to technical field of data processing, more particularly, to one kind based on database by generating EXCEL text The method and system of shelves.
Background technique
EXCEL document is as one of OFFICE series of products, the either finger money transfer transactions file of financial staff's operation, or It is Sales Reports, document used in financial statement and software, the report of upload is all based on greatly EXCEL format.
Since system is when uploading Microsoft Excel document, document content is fixed with format, the program code of developer, It is written and read only for the EXCEL document, flexibility is poor, brings inconvenience to the popularization of system.The prior art provides A kind of method and device for reading, generating Excel document, the prior art generate EXCEL document and reading using JXL open source packet EXCEL document.The prior art generates EXCEL document, and the cell to table in EXCEL document is needed to be configured, and operates phase To complexity.
Therefore, it is necessary to a kind of technologies, generate EXCEL document more conveniently.
Summary of the invention
The present invention provides a kind of based on database by the method and system of generation EXCEL document, such as where to solve Just the problem of generating EXCEL document.
To solve the above-mentioned problems, the present invention provides a kind of method for generating EXCEL document based on database, the sides Method includes:
Based on the configuration information of field in database, the attribute of the cell of at least one database table is configured, saves packet Include the database table of configuration information;
EXCEL worksheet is created, the configuration information in the database table is read, according to the configuration information, configuration The attribute of the cell of EXCEL worksheet;
The EXCEL worksheet for being configured with the attribute of cell is saved, EXCEL document is generated.
Preferably, further includes:
Multiple EXCEL worksheets are created, the configuration information in the corresponding database table is read respectively, is matched according to described Confidence breath, is arranged the attribute of the multiple EXCEL worksheet cell.
Preferably, the configuration information in the database table is read by open source projects JXL.
Preferably, the configuration information includes:
Field name, title remarks, whether required item and data validity.
Preferably, data validity is arranged by open source projects POI.
Based on another aspect of the present invention, a kind of system that EXCEL document is generated based on database, the system packet are provided It includes:
First configuration unit configures the list of at least one database table for the configuration information based on field in database The attribute of first lattice saves the database table including configuration information;
Second configuration unit reads the configuration information in the database table, according to institute for creating EXCEL worksheet Configuration information is stated, the attribute of the cell of EXCEL worksheet is configured;
Generation unit generates EXCEL document for saving the EXCEL worksheet for being configured with the attribute of cell.
Preferably, second configuration unit is also used to:
Multiple EXCEL worksheets are created, the configuration information in the corresponding database table is read respectively, is matched according to described Confidence breath, is arranged the attribute of the multiple EXCEL worksheet cell.
Preferably, second configuration unit is also used to:
The configuration information in the database table is read by open source projects JXL.
Preferably, the configuration information includes:
Field name, title remarks, whether required item and data validity.
Preferably, second configuration unit is also used to: data validity is arranged by open source projects POI.
Configuration information of the technical solution of the present invention based on field in database, configures the cell of at least one database table Attribute, save include configuration information database table.When creating EXCEL worksheet, match confidence in reading database table Breath configures the attribute of the cell of EXCEL worksheet according to configuration information.Save the EXCEL work for being configured with the attribute of cell Make table, generates EXCEL document.The present invention configures EXCEL document by the configuration information in database table, configures EXCEL document Mode it is more simple.The configuration to EXCEL document is completed by the configuration information in database table, makes matching for EXCEL document It sets and more standardizes, prevent user's Introduced cases mistake, improve the accuracy and validity of EXCEL document data.
Detailed description of the invention
By reference to the following drawings, exemplary embodiments of the present invention can be more fully understood by:
Fig. 1 is a kind of method flow diagram that EXCEL document is generated based on database according to embodiment of the present invention;
Fig. 2 is a kind of method flow diagram that EXCEL document is generated based on database according to another embodiment of the present invention; And
Fig. 3 is a kind of system construction drawing that EXCEL document is generated based on database according to embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present invention are introduced referring now to the drawings, however, the present invention can use many different shapes Formula is implemented, and is not limited to the embodiment described herein, and to provide these embodiments be at large and fully disclose The present invention, and the scope of the present invention is sufficiently conveyed to person of ordinary skill in the field.Show for what is be illustrated in the accompanying drawings Term in example property embodiment is not limitation of the invention.In the accompanying drawings, identical cells/elements use identical attached Icon note.
Unless otherwise indicated, term (including scientific and technical terminology) used herein has person of ordinary skill in the field It is common to understand meaning.Further it will be understood that with the term that usually used dictionary limits, should be understood as and its The context of related fields has consistent meaning, and is not construed as Utopian or too formal meaning.
Fig. 1 is a kind of method flow diagram that EXCEL document is generated based on database according to embodiment of the present invention.This Shen Configuration information please based on field in database, the attribute of the cell of configuration database table save the number including configuration information According to library table.When creating EXCEL worksheet, the configuration information in reading database table configures EXCEL work according to configuration information Make the attribute of the cell of table.The application is configured with the EXCEL worksheet of the attribute of cell by saving, and generates EXCEL text Shelves.A kind of method 100 generating EXCEL document based on database as shown in Figure 1, comprising:
Preferably, in step 101: the configuration information based on field in database configures the list of at least one database table The attribute of first lattice saves the database table including configuration information.Preferably, configuration information include: field name, title remarks, Whether required item and data validity.
Design the remarks of the column name of Microsoft Excel, column in the application by database interfaceization, column must defeated property and column Data validity.
When designing EXCEL template, clicks the increase of line increment button and want the column shown in EXCEL document, user's selection The field name of column in database takes the Column Properties configured in database table out of automatically.User can pass through simultaneously The validity of configuration data limits the data sequence of column unit lattice input.After setting completed, information is saved to corresponding data In the table of library, Microsoft Excel is generated for second step and is prepared.
Preferably, in step 102: creating EXCEL worksheet, the configuration information in reading database table, according to confidence Breath configures the attribute of the cell of EXCEL worksheet.
Preferably, method 100 further include:
Multiple EXCEL worksheets are created, read the configuration information in corresponding database table respectively, according to configuration information, The attribute of multiple EXCEL worksheet cells is set.
Preferably, method 100 further include: pass through the configuration information in open source projects JXL reading database table.
Preferably, method 100 further include: data validity is arranged by open source projects POI.
It is based on two open source packets of JXL and POI that the application, which generates Microsoft Excel,.The application is read using open source projects JXL The setting table of Microsoft Excel in database needs to automatically create multiple work if including multiple worksheets in a book Table.For information in each worksheet difference reading database, the Column Properties being arranged in template are converted in Microsoft Excel Cell attribute.For being provided with the row of data validity, by the way that data validity method is arranged in open source projects POI, to life At Microsoft Excel be configured.
Preferably, in step 103: saving the EXCEL worksheet for being configured with the attribute of cell, generate EXCEL document.
This application involves arrive to generate two parts of EXCEL document.One, the column name that interfaceization designs Microsoft Excel includes column Remarks, column must defeated property and column the attributes such as data validity.Two, the EXCEL document generating portion after the completion of setting.The portion Point function is based primarily upon powerful open source packet POI and the JXL being simple and efficient to realize.The application realizes different systems The field value that user defines according to their own needs, by passing through selection database in interface, personalized customization EXCEL document Template fills in logging data for user after the EXCEL template of generation, facilitates the data inputting of user, also improve logging data Accuracy and validity.The application when generating EXCEL document, using open source projects JXL to the worksheet in book into The pattern of row cell is set, and is set using open source projects POI packet to data validity, and user can use the formal character of drop-down A possibility that value of cell simplifies the operation of user, decreases error.
Fig. 2 is a kind of method flow diagram that EXCEL document is generated based on database according to another embodiment of the present invention. Fig. 2 is the application based on the purchase and sale storing module of commodity, and user can directly input purchase when using the module in systems The article document information of pin, while after information can also being inputted by EXCEL template file, then it imported into system.It is using When the import feature of the module, provided herein EXCEL template file substantially, user can directly download template, Information is inputted in template.The demand that different user has oneself different simultaneously, then user can individual character according to their own needs Change customization EXCEL template file.User is in template-setup module, by shirtsleeve operation, safeguards single in the EXCEL template of generation The attribute of first lattice.Including cell whether be must the format of defeated item and cell and the attributes such as data validity of cell.
It increases income to wrap using open source projects JXL and generates EXCEL worksheet and document, user is read from database and is set in template The cell information centered, cell attribute is arranged in correspondence in EXCEL cell.Open source projects are utilized simultaneously POI open source packet, the data validity of setting unit lattice, to simplify the operation of user and reduce the error of user.User is in template In fill in data after, import information into system, save data.
Fig. 3 is a kind of system construction drawing that EXCEL document is generated based on database according to embodiment of the present invention.This Shen Please by the first configuration unit, based on the configuration information of field in database, the attribute of the cell of configuration database table is saved Database table including configuration information.EXCEL worksheet is created by the second configuration unit, matches confidence in reading database table Breath configures the attribute of the cell of EXCEL worksheet according to configuration information.The application is configured with list by generation unit preservation The EXCEL worksheet of the attribute of first lattice generates EXCEL document.As shown in figure 3, a kind of generate EXCEL document based on database System 300, comprising:
First configuration unit configures the list of at least one database table for the configuration information based on field in database The attribute of first lattice saves the database table including configuration information.Preferably, configuration information include: field name, title remarks, Whether required item and data validity.
Second configuration unit, for creating EXCEL worksheet, configuration information in reading database table, according to matching confidence Breath configures the attribute of the cell of EXCEL worksheet.
Preferably, the second configuration unit is also used to:
Multiple EXCEL worksheets are created, read the configuration information in corresponding database table respectively, according to configuration information, The attribute of multiple EXCEL worksheet cells is set.
Preferably, the second configuration unit is also used to:
Pass through the configuration information in open source projects JXL reading database table.
Preferably, the second configuration unit is also used to: data validity is arranged by open source projects POI.
Generation unit generates EXCEL document for saving the EXCEL worksheet for being configured with the attribute of cell.
A kind of system 300 and another implementation of the present invention that EXCEL document is generated based on database of embodiment of the present invention A kind of method 100 for generating EXCEL document based on database of mode is corresponding, is no longer repeated herein.
The present invention is described by reference to a small amount of embodiment.However, it is known in those skilled in the art, as Defined by subsidiary Patent right requirement, in addition to the present invention other embodiments disclosed above equally fall in it is of the invention In range.
Normally, all terms used in the claims are all solved according to them in the common meaning of technical field It releases, unless in addition clearly being defined wherein.All references " one/described/be somebody's turn to do [device, component etc.] " are all opened ground At least one example being construed in described device, component etc., unless otherwise expressly specified.Any method disclosed herein Step need not all be run with disclosed accurate sequence, unless explicitly stated otherwise.

Claims (10)

1. a kind of method for generating EXCEL document based on database, which comprises
Based on the configuration information of field in database, the attribute of the cell of at least one database table is configured, saving includes matching The database table of confidence breath;
EXCEL worksheet is created, the configuration information in the database table is read, according to the configuration information, configures EXCEL work Make the attribute of the cell of table;
The EXCEL worksheet for being configured with the attribute of cell is saved, EXCEL document is generated.
2. according to the method described in claim 1, further include:
Multiple EXCEL worksheets are created, read the configuration information in the corresponding database table respectively, match confidence according to described Breath, is arranged the attribute of the multiple EXCEL worksheet cell.
3. according to the method described in claim 1, reading the configuration information in the database table by open source projects JXL.
4. the method according to claim 1, the configuration information include:
Field name, title remarks, whether required item and data validity.
5. data validity is arranged by open source projects POI in method according to claim 4.
6. a kind of system that EXCEL document is generated based on database, the system comprises:
First configuration unit configures the cell of at least one database table for the configuration information based on field in database Attribute, save include configuration information database table;
Second configuration unit reads the configuration information in the database table, is matched according to described for creating EXCEL worksheet Confidence breath, configures the attribute of the cell of EXCEL worksheet;
Generation unit generates EXCEL document for saving the EXCEL worksheet for being configured with the attribute of cell.
7. system according to claim 6, second configuration unit is also used to:
Multiple EXCEL worksheets are created, read the configuration information in the corresponding database table respectively, match confidence according to described Breath, is arranged the attribute of the multiple EXCEL worksheet cell.
8. system according to claim 6, second configuration unit is also used to:
The configuration information in the database table is read by open source projects JXL.
9. system according to claim 6, the configuration information include:
Field name, title remarks, whether required item and data validity.
10. system according to claim 10, second configuration unit is also used to: data, which are arranged, by open source projects POI has Effect property.
CN201710980088.1A 2017-10-19 2017-10-19 It is a kind of that the method and system of generation EXCEL document are passed through based on database Pending CN109684608A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710980088.1A CN109684608A (en) 2017-10-19 2017-10-19 It is a kind of that the method and system of generation EXCEL document are passed through based on database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710980088.1A CN109684608A (en) 2017-10-19 2017-10-19 It is a kind of that the method and system of generation EXCEL document are passed through based on database

Publications (1)

Publication Number Publication Date
CN109684608A true CN109684608A (en) 2019-04-26

Family

ID=66183119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710980088.1A Pending CN109684608A (en) 2017-10-19 2017-10-19 It is a kind of that the method and system of generation EXCEL document are passed through based on database

Country Status (1)

Country Link
CN (1) CN109684608A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115237863A (en) * 2022-09-22 2022-10-25 中建电子商务有限责任公司 EXCEL data import method based on WPS loading item

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216849A (en) * 2008-01-11 2008-07-09 清华大学 Document automatic creation method based on integration business model
CN102096845A (en) * 2009-12-10 2011-06-15 黑龙江省森林工程与环境研究所 Knowledge base full text search engine system for classified forest management
CN103699638A (en) * 2013-12-23 2014-04-02 国云科技股份有限公司 Method for realizing cross-database type synchronous data based on configuration parameters
CN104361111A (en) * 2014-11-28 2015-02-18 青岛大学 Automatic archive editing method
CN105045775A (en) * 2015-08-12 2015-11-11 深圳联友科技有限公司 Method and apparatus for generating Excel document in designated format
CN105117378A (en) * 2015-08-05 2015-12-02 联动优势电子商务有限公司 Method and apparatus for converting JSON file into EXCEL file

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216849A (en) * 2008-01-11 2008-07-09 清华大学 Document automatic creation method based on integration business model
CN102096845A (en) * 2009-12-10 2011-06-15 黑龙江省森林工程与环境研究所 Knowledge base full text search engine system for classified forest management
CN103699638A (en) * 2013-12-23 2014-04-02 国云科技股份有限公司 Method for realizing cross-database type synchronous data based on configuration parameters
CN104361111A (en) * 2014-11-28 2015-02-18 青岛大学 Automatic archive editing method
CN105117378A (en) * 2015-08-05 2015-12-02 联动优势电子商务有限公司 Method and apparatus for converting JSON file into EXCEL file
CN105045775A (en) * 2015-08-12 2015-11-11 深圳联友科技有限公司 Method and apparatus for generating Excel document in designated format

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115237863A (en) * 2022-09-22 2022-10-25 中建电子商务有限责任公司 EXCEL data import method based on WPS loading item
CN115237863B (en) * 2022-09-22 2023-01-10 中建电子商务有限责任公司 EXCEL data import method based on WPS loading item

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
US10977629B2 (en) Computerized messaging module for blockchain networks
US9201854B1 (en) Methods and systems for creating, interacting with, and utilizing a superactive document
US7712023B1 (en) Dynamically modifying descriptive text of a form worksheet field in response to a financial form selection
US20070250783A1 (en) Method and system to provide online application forms
US20070250769A1 (en) Method and system to provide online application forms
US20020099735A1 (en) System and method for conducting electronic commerce
JP2010532535A (en) Task-specific spreadsheet
CN109815464A (en) PDF document generation method, device, electronic equipment and storage medium
CN107544808A (en) The generation method and device of a kind of web form
US9704168B2 (en) Method and system for implementing profiles for an enterprise business application
US9311289B1 (en) Spreadsheet document tab conditional formatting
US20070203854A1 (en) Electronic contracting
CN107729074A (en) A kind of loading method and device of the user interface of POS applications
CN107169668A (en) A kind of data processing method, apparatus and system
Galabova et al. The ‘Idiot’crash quadratic penalty algorithm for linear programming and its application to linearizations of quadratic assignment problems
CN109684608A (en) It is a kind of that the method and system of generation EXCEL document are passed through based on database
Al-Khamis et al. Optimal policies for a finite-horizon batching inventory model
Grech WASP (Write a Scientific Paper) using Excel—1: Data entry and validation
CN116521845A (en) Method for reading complex electronic form file and electronic equipment
Habraken Microsoft Office 2019 Inside Out
Danielson The IRR of a project with many potential outcomes
Boldin Using switching models to study business cycle asymmetries: 1. overview of methodology and application
JP2008140349A (en) Permanent electronic form system
US20230325418A1 (en) System and Method for Joining Datasets

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190426