CN109472010A - The method and computer equipment of front end html design table (schedule) are obtained based on execl template - Google Patents
The method and computer equipment of front end html design table (schedule) are obtained based on execl template Download PDFInfo
- Publication number
- CN109472010A CN109472010A CN201811179462.9A CN201811179462A CN109472010A CN 109472010 A CN109472010 A CN 109472010A CN 201811179462 A CN201811179462 A CN 201811179462A CN 109472010 A CN109472010 A CN 109472010A
- Authority
- CN
- China
- Prior art keywords
- html
- execl
- data flow
- storage space
- data
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
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)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides the method and computer equipment that html design table (schedule) in front end is obtained based on execl template, includes the following steps: step 10, imports execl formfile;Step 20 opens up file storage space and the storage space execl in memory space;Step 30, reading execl formfile obtain document data flow;Document data flow is stored in the file storage space;Form data stream in step 40, extraction document data flow, and form data stream is stored in the storage space execl;Form data circulation is changed into html file by step 50;Html file is converted to html data flow by UTF-8 by step 60;Step 70, by extract regular expression extract html data flow in data, then by go messy code regular expression by data error code and messy code carry out conversion cleaning, finally obtain html list source code.
Description
Technical field
The present invention relates to data conversion fields, in particular to the side of front end html design table (schedule) is obtained based on execl template
Method and computer equipment.
Background technique
Due to the fast development of internet, client usually uses execl to draw the list pattern needed now, then hands over again
The list of drafting is finally realized that page layout designs by the coding of html and css to Front-end Design personnel.
The shortcomings that prior art, is as follows:
By manually carrying out the written in code of page layout pattern, it is easy to happen when writing code and imports error in data
Problem eventually leads to the html form data mistake of generation, and then influences list and use;And it is time-consuming by artificial written in code
Effort, each list change-over period is long, seriously reduces production efficiency, disadvantaged business enterprise development.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of efficiently and accurately execl file and is converted to html list
The method that html design table (schedule) in front end is obtained based on execl template of source code.
The method specifically includes following steps:
Based on the method that execl template obtains front end html design table (schedule), include the following steps:
Step 10 imports execl formfile;
Step 20 opens up file storage space and the storage space execl in memory space;
Step 30, reading execl formfile obtain document data flow;Document data flow is stored in the file storage
In space;
Form data stream in step 40, extraction document data flow, and form data stream is stored in the execl and is stored
In space;
Form data circulation is changed into html file by step 50;
Html file is converted to html data flow by step 60;
Step 70 extracts the data in html data flow by extraction regular expression, then by going messy code regular expressions
Formula by data error code and messy code carry out conversion cleaning, finally obtain html list source code.
Preferably, the data in the step 70 include: html label, table label, th label, tr label and td
Form layout's source code of list.
Preferably, the step 50 further includes, html file is stored in specified disk or in database.
Preferably, further include step 80, html list source code is stored in specified data library or disk.
A kind of computer equipment can be run on a memory and on a processor including memory, processor and storage
Computer program, which is characterized in that the processor performs the steps of when executing described program
Step 10 imports execl formfile;
Step 20 opens up file storage space and the storage space execl in memory space;
Step 30, reading execl formfile obtain document data flow;Document data flow is stored in the file storage
In space;
Form data stream in step 40, extraction document data flow, and form data stream is stored in the execl and is stored
In space;
Form data circulation is changed into html file by step 50;
Html file is converted to html data flow by step 60;
Step 70 extracts the data in html data flow by extraction regular expression, then by going messy code regular expressions
Formula by data error code and messy code carry out conversion cleaning, finally obtain html list source code.
Preferably, the data in the step 70 include: html label, table label, th label, tr label and td
Form layout's source code of list.
Preferably, the step 50 further includes, html file is stored in specified disk or in database.
Preferably, further include step 80, html list source code is stored in specified data library or disk.
The present invention has the advantage that
1, the reading and conversion of the invention by file realizes that execl formfile is converted to html list source code, leads to
Cross system included read functions and file be converted into data flow, then open up file storage space, the storage space execl with
And other existing storage mediums are stored, and html list source code is finally obtained;By way of reading file and obtaining data flow,
It can guarantee that data are undistorted in conversion process, it is accurate to obtain html list source code;Data flow is obtained by reading file
Mode can also improve development rate, manpower is greatly saved, has saved the time!
2, the html source code that form design can be fast and accurately extracted by regular expression can guarantee what conversion was extracted
Html design source code does not have messy code, is not in abnormal format.
Detailed description of the invention
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the method for the present invention execution flow chart.
Specific embodiment
This method is a kind of method of procedure-oriented, and the method achieve execl list is converted into the design of html label
List source code.
General thought of the invention is as follows:
In terms of execl list: client carries out drafting list by business demand!Then the list drawn is imported into system
In;
System one side: system reads the file that user imports, and translates the file into and is stored in computer for document data flow
In memory, in the internal storage data stream that the document data flow in memory is converted into execl type!It is changed by internal storage data circulation
Html file is stored in server specified path!
System another aspect: system is going to read html file, by certain regular expression scheduling algorithm that html is literary
Required table forms portion html source code in part extracts, and carries out messy code by certain regular expression algorithm
Cleaning!
Above system selects existing corporate business flow system can be realized, and the present invention does not improve system itself.
As shown in Figure 1, concrete operations of the invention are as follows:
The execl formfile that step 10, importing are drawn;
Step 20 opens up file storage space and the storage space execl in memory space;File is opened up in memory
Storage space and the storage space execl can shorten conversion time;
Step 30 reads execl formfile, and execl formfile is made to be converted to document data flow;Document data flow
It is stored in the file storage space;
Form data stream in step 40, extraction document data flow, and form data stream is stored in the execl and is stored
In space;
Step 50, the form data stream disclose the ExcelToHtmlConverter of class libraries for form data by NPOI
Circulation changes html file into, and html file is stored in specified disk or in database;
Step 60 reads html file in the memory of system by UTF-8, and the html file is made to be converted to html
Data flow;The UTF-8 is html coding, is a kind of for wide character value to be converted to the Standard Machine of the Unicode of byte stream
System;
Step 70 extracts the data in html data flow by extraction regular expression, then by going messy code regular expressions
Formula by data error code and messy code carry out conversion cleaning, finally obtain the html list source code of standard criterion;The useful number
According to the form layout's source code for partially including: html label, table label, th label, tr label and td list;
The effect for extracting regular expression is to go unrest by the data in the table label in certain rule interception html
The effect of code regular expression is removal because of the messy code generated after conversion;
Step 80 is stored in html list source code in specified data library or disk, in case follow-up function uses.
The main idea of the present invention is: it first translates the file into and is stored in file storage space for document data flow, secondly
The execl partial data (i.e. form data stream) of extraction document data flow, the execl partial data extracted is stored in out
In the execl memory space warded off, execl partial data is then converted to html file again, finally html file is converted to
Html list source code.Technical difficult points are that document data flow (FileStream) is converted to form data stream
(HSSFWorkbook), it is directed to the conversion of document data flow.
Although specific embodiments of the present invention have been described above, those familiar with the art should be managed
Solution, we are merely exemplary described specific embodiment, rather than for the restriction to the scope of the present invention, it is familiar with this
The technical staff in field should be covered of the invention according to modification and variation equivalent made by spirit of the invention
In scope of the claimed protection.
Claims (8)
1. the method for obtaining front end html design table (schedule) based on execl template, characterized by the following steps:
Step 10 imports execl formfile;
Step 20 opens up file storage space and the storage space execl in memory space;
Step 30, reading execl formfile obtain document data flow;Document data flow is stored in the file storage space
In;
Form data stream in step 40, extraction document data flow, and form data stream is stored in the storage space execl
In;
Form data circulation is changed into html file by step 50;
Html file is converted to html data flow by step 60;
Step 70 extracts the data in html data flow by extraction regular expression, then by going messy code regular expression will
Error code and messy code in data carry out conversion cleaning, finally obtain html list source code.
2. the method according to claim 1 for obtaining front end html design table (schedule) based on execl template, it is characterised in that:
Data in the step 70 include: the form layout source of html label, table label, th label, tr label and td list
Code.
3. the method according to claim 1 for obtaining front end html design table (schedule) based on execl template, it is characterised in that:
The step 50 further includes, html file is stored in specified disk or in database.
4. the method according to claim 1 for obtaining front end html design table (schedule) based on execl template, it is characterised in that:
Further include step 80, html list source code is stored in specified data library or disk.
5. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor
Calculation machine program, which is characterized in that the processor performs the steps of when executing described program
Step 10 imports execl formfile;
Step 20 opens up file storage space and the storage space execl in memory space;
Step 30, reading execl formfile obtain document data flow;Document data flow is stored in the file storage space
In;
Form data stream in step 40, extraction document data flow, and form data stream is stored in the storage space execl
In;
Form data circulation is changed into html file by step 50;
Html file is converted to html data flow by step 60;
Step 70 extracts the data in html data flow by extraction regular expression, then by going messy code regular expression will
Error code and messy code in data carry out conversion cleaning, finally obtain html list source code.
6. a kind of computer equipment according to claim 5, it is characterised in that: the data in the step 70 include:
Html label, table label, th label, tr label and td list form layout's source code.
7. a kind of computer equipment according to claim 5, it is characterised in that: the step 50 further includes, html is literary
Part is stored in specified disk or in database.
8. a kind of computer equipment according to claim 5, it is characterised in that: further include step 80, html list source
Code is stored in specified data library or disk.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811179462.9A CN109472010A (en) | 2018-10-10 | 2018-10-10 | The method and computer equipment of front end html design table (schedule) are obtained based on execl template |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811179462.9A CN109472010A (en) | 2018-10-10 | 2018-10-10 | The method and computer equipment of front end html design table (schedule) are obtained based on execl template |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109472010A true CN109472010A (en) | 2019-03-15 |
Family
ID=65664856
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811179462.9A Withdrawn CN109472010A (en) | 2018-10-10 | 2018-10-10 | The method and computer equipment of front end html design table (schedule) are obtained based on execl template |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109472010A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103136173A (en) * | 2011-11-29 | 2013-06-05 | 北京建龙重工集团有限公司 | Method converting mass word or excel format form documents into webpages |
WO2017028611A1 (en) * | 2015-08-18 | 2017-02-23 | 中兴通讯股份有限公司 | Form implementation method and apparatus |
CN107544806A (en) * | 2017-09-04 | 2018-01-05 | 江苏中威科技软件系统有限公司 | Visualize list method for drafting |
-
2018
- 2018-10-10 CN CN201811179462.9A patent/CN109472010A/en not_active Withdrawn
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103136173A (en) * | 2011-11-29 | 2013-06-05 | 北京建龙重工集团有限公司 | Method converting mass word or excel format form documents into webpages |
WO2017028611A1 (en) * | 2015-08-18 | 2017-02-23 | 中兴通讯股份有限公司 | Form implementation method and apparatus |
CN107544806A (en) * | 2017-09-04 | 2018-01-05 | 江苏中威科技软件系统有限公司 | Visualize list method for drafting |
Non-Patent Citations (2)
Title |
---|
杨金花: "JSP技术中文乱码的原因及解决方法", 《电子设计工程》 * |
符云清 等: "基于Excel和XML的自定义报表设计与实现", 《计算机科学》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101582074B (en) | Method for extracting data of DeepWeb response webpage | |
CN103020044A (en) | Machine-aided webpage translation method and system thereof | |
CN109766085B (en) | Method and device for processing enumeration type codes | |
CN108536745A (en) | Tables of data extracting method, terminal, equipment and storage medium based on Shell | |
CN102521008B (en) | Program compiling device and method for compiling program | |
CN103777934A (en) | Method and system for generating controller CAN interaction layer based on MATLAB | |
WO2021253641A1 (en) | Shading language translation method | |
CN107273486A (en) | Map updating method and device | |
CN108519963B (en) | Method for automatically converting process model into multi-language text | |
CN109445794A (en) | A kind of page building method and device | |
CN114186533A (en) | Model training method and device, knowledge extraction method and device, equipment and medium | |
CN106776779B (en) | Method for generating entity file by JSON data based on Mac platform | |
CN103235757B (en) | Several apparatus and method that input domain tested object is tested are made based on robotization | |
CN111104159A (en) | Annotation positioning method based on program analysis and neural network | |
US20080010632A1 (en) | Processing large sized relationship-specifying markup language documents | |
KR100762712B1 (en) | Method for transforming of electronic document based on mapping rule and system thereof | |
CN109472010A (en) | The method and computer equipment of front end html design table (schedule) are obtained based on execl template | |
CN107562955A (en) | A kind of rapid generation of SQL statement | |
CN105573972A (en) | Report check formula generation method and apparatus | |
CN111680804A (en) | Method and device for generating operation and inspection work ticket and computer readable medium | |
CN106682153A (en) | Data extraction tool on basis of data modeling and data increment implementation | |
CN107632831B (en) | Method and device for quickly standardizing front-end codes | |
CN112699642B (en) | Index extraction method and device for complex medical texts, medium and electronic equipment | |
CN106873956A (en) | Code completion method and device based on continuous keyword | |
CN113343140B (en) | Method for automatically extracting webpage text content based on neo4j graphic database |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190315 |