CN106874501A - A kind of method that SpreadJS forms automatically generate simultaneously binding data storehouse table - Google Patents

A kind of method that SpreadJS forms automatically generate simultaneously binding data storehouse table Download PDF

Info

Publication number
CN106874501A
CN106874501A CN201710103243.1A CN201710103243A CN106874501A CN 106874501 A CN106874501 A CN 106874501A CN 201710103243 A CN201710103243 A CN 201710103243A CN 106874501 A CN106874501 A CN 106874501A
Authority
CN
China
Prior art keywords
spreadjs
forms
data
database
database table
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
CN201710103243.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.)
Jinan Inspur Hi Tech Investment and Development Co Ltd
Original Assignee
Jinan Inspur Hi Tech Investment and 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 Jinan Inspur Hi Tech Investment and Development Co Ltd filed Critical Jinan Inspur Hi Tech Investment and Development Co Ltd
Priority to CN201710103243.1A priority Critical patent/CN106874501A/en
Publication of CN106874501A publication Critical patent/CN106874501A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/183Tabulation, i.e. one-dimensional positioning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of method that SpreadJS forms automatically generate simultaneously binding data storehouse table, its implementation process is:It implements process:SpreadJS forms are drawn first, specify data binding region;The corresponding relation of the SpreadJS forms and database table in database is configured, the sql sentences for creating or changing database table are constructed;Sql sentences are performed to create or modification database table;SpreadJS forms are opened, the corresponding relation according to SpreadJS forms and database table inquires data, and then data in database table are shown in specified data binding region;When SpreadJS forms change, above step is repeated.A kind of SpreadJS forms of the invention automatically generate the method for simultaneously binding data storehouse table compared with prior art, effective changing just writes extremely in a program the setting of SpreadJS forms and corresponding database table in coding stage, the maintenance of reduction program and development amount, it is practical.

Description

A kind of method that SpreadJS forms automatically generate simultaneously binding data storehouse table
Technical field
The present invention relates to Computer Applied Technology field, specifically a kind of SpreadJS forms are automatically generated and bound The method of database table.
Background technology
The pure front end grid controls of SpreadJS are the JavaScript electrical forms and grid function control for being based on HTML5, Suitable for the table procedure exploitation of each platform online editing class Excel functions such as .NET, Java and mobile terminal, with friendly exhibition Show interface and powerful data-handling capacity.
Database (Database) is the warehouse that data are organized, store and managed according to data structure, with information skill Art and the development in market, data management are no longer only to store and management data, and the various data required for being transformed into user The mode of management.Database technology is the various information system such as management information system, the office automation system, DSS Core, be the important technical for carrying out scientific research and decision-making management.
If the pure front end grid controls of SpreadJS are applied directly in web exploitations, it is possible to reduce substantial amounts of coding work Measure, and the storage of data is all put into database generally in business management software, this be accomplished by considering SpreadJS forms with The binding issue of database table, traditional processing mode is coding stage just by the setting of SpreadJS forms and corresponding data Storehouse table is write extremely in a program, once changing the setting of form, corresponding database table, the treatment in program for this form is also needed The change mode of hardness coding is wanted, maintenance and the development amount of program is increased.
Based on this, the present invention proposes a kind of method that SpreadJS forms automatically generate simultaneously binding data storehouse table, can solve Certainly above mentioned problem.
The content of the invention
Technical assignment of the invention is directed to above weak point, there is provided a kind of SpreadJS forms are automatically generated and bound The method of database table.
A kind of SpreadJS forms automatically generate and binding data storehouse table method, it implements process and is:
1)SpreadJS forms are drawn first, specify data binding region;
2)The corresponding relation of the SpreadJS forms and database table in database is configured, establishment or modification database table is constructed Sql sentences;
3)Sql sentences are performed to create or modification database table;
4)SpreadJS forms are opened, the corresponding relation according to SpreadJS forms and database table inquires data, then will Data show in specified data binding region in database table;
5)When SpreadJS forms change, above step 1 is repeated)To 4).
The step 1)SpreadJS form drawing process be specially:SpreadJS form Show Styles is drawn first, The domain of binding data is needed in specified form, the starting row and respective column of form binding data is determined, arranged in setting binding domain Unique mark, sets the data type of permutation, records configuration information.
Construct and create or the detailed process of sql sentences of modification database table is:According to step 1)The information of setting, obtains Grid column unique mark is taken as correspondence database literary name section name, is the corresponding data of database by grid column data type conversion Type, the corresponding relation according to database table and SpreadJS forms judges whether SpreadJS forms have created database table, If NO, establishment database table sql sentences are constructed, if YES, is then showed according to grid column unique mark and database There are row to be contrasted, construct modification database table sql sentences.
Perform database of record table pass corresponding with SpreadJS forms in the database table of the establishment of sql sentences or modification The corresponding relation of system, database of record field and grid column sequence number.
The step 4)Detailed process be:It is corresponding with database table according to form when SpreadJS forms are opened Relational query goes out data, is tied on grid column according to grid column sequence number and Database field corresponding relation, and according to binding domain Middle starting row determines the starting row that data show in the table, can be corresponded to based on this each field value of data record for inquiring Shown in the particular cell of SpreadJS forms.
Compared to the prior art a kind of SpreadJS forms of the invention automatically generate the method for simultaneously binding data storehouse table, tool There is following beneficial effect:
The method that a kind of SpreadJS forms of the invention automatically generate simultaneously binding data storehouse table, the method is effectively changed Coding stage just writes extremely in a program the setting of SpreadJS forms and corresponding database table, once change setting for form Put, the treatment in corresponding database table and program for this form is also required to the mode of hardness coding change, reduces program Safeguard and development amount, it is practical, it is applied widely, with good application value.
Brief description of the drawings
Accompanying drawing 1 realizes schematic diagram for of the invention.
Specific embodiment
Below in conjunction with the accompanying drawings and specific embodiment the invention will be further described.
As shown in figure 1, a kind of method that SpreadJS forms automatically generate simultaneously binding data storehouse table, it implements process For:
1)SpreadJS forms are drawn first, specify data binding region;
2)The corresponding relation of the SpreadJS forms and database table in database is configured, establishment or modification database table is constructed Sql sentences;
3)Sql sentences are performed to create or modification database table;
4)SpreadJS forms are opened, the corresponding relation according to SpreadJS forms and database table inquires data, then will Data show in specified data binding region in database table;
5)When SpreadJS forms change, above step 1 is repeated)To 4).
The step 1)SpreadJS form drawing process be specially:SpreadJS form Show Styles is drawn first, The domain of binding data is needed in specified form, the starting row and respective column of form binding data is determined, arranged in setting binding domain Unique mark, sets the data type of permutation, records configuration information.
Construct and create or the detailed process of sql sentences of modification database table is:According to step 1)The information of setting, obtains Grid column unique mark is taken as correspondence database literary name section name, is the corresponding data of database by grid column data type conversion Type, the corresponding relation according to database table and SpreadJS forms judges whether SpreadJS forms have created database table, If NO, establishment database table sql sentences are constructed, if YES, is then showed according to grid column unique mark and database There are row to be contrasted, construct modification database table sql sentences.
Perform database of record table pass corresponding with SpreadJS forms in the database table of the establishment of sql sentences or modification The corresponding relation of system, database of record field and grid column sequence number.
The step 4)Detailed process be:It is corresponding with database table according to form when SpreadJS forms are opened Relational query goes out data, is tied on grid column according to grid column sequence number and Database field corresponding relation, and according to binding domain Middle starting row determines the starting row that data show in the table, can be corresponded to based on this each field value of data record for inquiring Shown in the particular cell of SpreadJS forms.
More specifically, the present invention is described in detail with following embodiments:
Step one:The table sample defined function that user provides in software, draws SpreadJS form Show Styles, divides table sample row It is header line, table body row and table tail row, divides table sample and be classified as information row and data row, specifies form to tie up in specified ranks function The starting row and respective column of fixed number evidence, the binding of default data start behavior table body starting row, and binding is classified as data row, and definition is tied up The unique mark of row, sets the data type of permutation calmly, for the data display type of this row in SpreadJS forms and establishment The data type of database table this row field;
Step 2:According to step one configuration information, grid column unique mark is obtained as correspondence database literary name section name, by form Column data type is converted to the corresponding data type of database, the database table and SpreadJS forms set according to step 3 Corresponding relation judges whether form has created database table, if NO, constructs establishment database table sql sentences, if It is then to be contrasted according to the existing row of grid column unique mark and database table, constructs modification database table sql sentences;
Wherein, form is with the data type corresponding relation of database table:
Step 3:Perform sql sentences to create or modification database table, database of record table is corresponding with SpreadJS forms to close The corresponding relation of system, database of record field and grid column sequence number;
Step 4:When user opens specific SpreadJS forms in typing or query function in software, according to form and number Data are inquired according to the corresponding relation of storehouse table, the form of SpreadJS Table recognitions is converted data to, according to grid column sequence number It is tied on grid column with Database field corresponding relation, and determines what data showed in the table according to starting row in binding domain Starting row, display in the particular cell of SpreadJS forms can be corresponded to based on this each field value of data record for inquiring;
Step 5:If SpreadJS forms change, above step is repeated.
By specific embodiment above, the those skilled in the art can readily realize the present invention.But should Work as understanding, the present invention is not limited to above-mentioned specific embodiment.On the basis of disclosed embodiment, the technical field Technical staff can be combined different technical characteristics, so as to realize different technical schemes.
In addition to the technical characteristic described in specification, the known technology of those skilled in the art is.

Claims (5)

1. a kind of SpreadJS forms automatically generate and binding data storehouse table method, it is characterised in that its implementation process is:Its The process of implementing is:
1)SpreadJS forms are drawn first, specify data binding region;
2)The corresponding relation of the SpreadJS forms and database table in database is configured, establishment or modification database table is constructed Sql sentences;
3)Sql sentences are performed to create or modification database table;
4)SpreadJS forms are opened, the corresponding relation according to SpreadJS forms and database table inquires data, then will Data show in specified data binding region in database table;
5)When SpreadJS forms change, above step 1 is repeated)To 4).
2. the method that a kind of SpreadJS forms according to claim 1 automatically generate simultaneously binding data storehouse table, its feature It is, the step 1)SpreadJS form drawing process be specially:SpreadJS form Show Styles is drawn first, is specified The domain of binding data is needed in form, the starting row and respective column of form binding data is determined, what is arranged in setting binding domain is unique Mark, sets the data type of permutation, records configuration information.
3. the method that a kind of SpreadJS forms according to claim 2 automatically generate simultaneously binding data storehouse table, its feature It is that the detailed process for constructing the sql sentences for creating or changing database table is:According to step 1)The information of setting, obtains Grid column data type conversion, as correspondence database literary name section name, is the corresponding data class of database by grid column unique mark Type, the corresponding relation according to database table and SpreadJS forms judges whether SpreadJS forms have created database table, such as Fruit is no, constructs establishment database table sql sentences, if YES, then existing according to grid column unique mark and database table Row are contrasted, and construct modification database table sql sentences.
4. the method that a kind of SpreadJS forms according to claim 2 automatically generate simultaneously binding data storehouse table, its feature It is database of record table and the corresponding relation of SpreadJS forms in the database table for perform the establishment of sql sentences or modification, remembers The corresponding relation of record Database field and grid column sequence number.
5. the method that a kind of SpreadJS forms according to claim 2 automatically generate simultaneously binding data storehouse table, its feature It is, the step 4)Detailed process be:When SpreadJS forms are opened, according to form and the corresponding relation of database table Data are inquired, is tied on grid column according to grid column sequence number and Database field corresponding relation, and opened according in binding domain Begin the starting row for determining that data show in the table, can be corresponded to based on this each field value of data record for inquiring Shown in the particular cell of SpreadJS forms.
CN201710103243.1A 2017-02-24 2017-02-24 A kind of method that SpreadJS forms automatically generate simultaneously binding data storehouse table Pending CN106874501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710103243.1A CN106874501A (en) 2017-02-24 2017-02-24 A kind of method that SpreadJS forms automatically generate simultaneously binding data storehouse table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710103243.1A CN106874501A (en) 2017-02-24 2017-02-24 A kind of method that SpreadJS forms automatically generate simultaneously binding data storehouse table

Publications (1)

Publication Number Publication Date
CN106874501A true CN106874501A (en) 2017-06-20

Family

ID=59169095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710103243.1A Pending CN106874501A (en) 2017-02-24 2017-02-24 A kind of method that SpreadJS forms automatically generate simultaneously binding data storehouse table

Country Status (1)

Country Link
CN (1) CN106874501A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108460007A (en) * 2018-02-11 2018-08-28 悦锦软件系统(上海)有限公司 A kind of automation report logic engine and method
CN110134696A (en) * 2019-05-21 2019-08-16 国网山东省电力公司 A kind of comprehensive budget editing method, apparatus and system based on big data
CN111126021A (en) * 2019-12-25 2020-05-08 济南大陆机电股份有限公司 Method for displaying report data in binary stream format in heterogeneous architecture
CN111240642A (en) * 2018-11-28 2020-06-05 常熟昊虞电子信息科技有限公司 Online OFFICE data processing and application system based on SpreadJS
CN111507075A (en) * 2019-01-31 2020-08-07 贵州白山云科技股份有限公司 Method and device for data format conversion
CN112965988A (en) * 2021-02-20 2021-06-15 杭州品茗安控信息技术股份有限公司 Data interaction method, device and equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741020A (en) * 2005-09-29 2006-03-01 北京勤哲软件技术有限责任公司 Method for storing electronic table unit lattice content with relational data base
US20060173813A1 (en) * 2005-01-04 2006-08-03 San Antonio Independent School District System and method of providing ad hoc query capabilities to complex database systems
CN103970736A (en) * 2013-01-25 2014-08-06 苏州精易会信息技术有限公司 Method for converting Excel sheet to database table

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060173813A1 (en) * 2005-01-04 2006-08-03 San Antonio Independent School District System and method of providing ad hoc query capabilities to complex database systems
CN1741020A (en) * 2005-09-29 2006-03-01 北京勤哲软件技术有限责任公司 Method for storing electronic table unit lattice content with relational data base
CN103970736A (en) * 2013-01-25 2014-08-06 苏州精易会信息技术有限公司 Method for converting Excel sheet to database table

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
PAWNPAWNPAWN: "SpreadJS V10对表格进行数据绑定", 《HTTPS://WWW.GRAPE.COM.CN/BLOGS/SPREADIJS10-DATA-BINDING》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108460007A (en) * 2018-02-11 2018-08-28 悦锦软件系统(上海)有限公司 A kind of automation report logic engine and method
CN111240642A (en) * 2018-11-28 2020-06-05 常熟昊虞电子信息科技有限公司 Online OFFICE data processing and application system based on SpreadJS
CN111507075A (en) * 2019-01-31 2020-08-07 贵州白山云科技股份有限公司 Method and device for data format conversion
CN111507075B (en) * 2019-01-31 2023-06-16 贵州白山云科技股份有限公司 Method and device for converting data format
CN110134696A (en) * 2019-05-21 2019-08-16 国网山东省电力公司 A kind of comprehensive budget editing method, apparatus and system based on big data
CN110134696B (en) * 2019-05-21 2022-05-06 国网山东省电力公司 Comprehensive budget editing and reviewing method, device and system based on big data
CN111126021A (en) * 2019-12-25 2020-05-08 济南大陆机电股份有限公司 Method for displaying report data in binary stream format in heterogeneous architecture
CN112965988A (en) * 2021-02-20 2021-06-15 杭州品茗安控信息技术股份有限公司 Data interaction method, device and equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN106874501A (en) A kind of method that SpreadJS forms automatically generate simultaneously binding data storehouse table
CN105094707B (en) A kind of data storage, read method and device
CN103617232B (en) A kind of paging query method for HBase table
CN102103605B (en) Method and system for intelligently extracting document structure
CN103559184B (en) The display packing of forms pages and device
CN103514291B (en) Method for displaying tree structure data in text
CN110399420A (en) A kind of deriving method, electronic equipment and the medium of configurableization Excel format
CN108009243B (en) Multi-user synchronous editing processing system and processing method for same document
CN103593434A (en) Application recommendation method and device and server equipment
CN104573065A (en) Report display engine based on metadata
CN105573967A (en) Multi-format file online browsing method and system
CN104881490A (en) WEB form data access method and system
CN109857803A (en) Method of data synchronization, device, equipment, system and computer readable storage medium
CN104657419A (en) Processing method and system for customized letter paper templates
CN107545058A (en) A kind of page loading method, server and browser
CN107103035A (en) This earth's surface data-updating method and device
US7650276B2 (en) System and method for dynamic data binding in distributed applications
CN106407172A (en) XML (Extensible Markup Language)-based report generating method
CN107609041A (en) List page generation method and device
CN106502680B (en) A method of pel extension is carried out by visualization interface
CN102473175B (en) Compression of XML data
CN101727319A (en) Page-turning service-oriented data table control and implementation method thereof
CN101980193B (en) Method, device and system for modifying dynamic page
CN109977153A (en) A kind of table big data deriving method
CN107463546A (en) A kind of document structure tree method and system based on index storehouse

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: 20170620