CN106445900A - Table style processing method and device - Google Patents
Table style processing method and device Download PDFInfo
- Publication number
- CN106445900A CN106445900A CN201610836754.XA CN201610836754A CN106445900A CN 106445900 A CN106445900 A CN 106445900A CN 201610836754 A CN201610836754 A CN 201610836754A CN 106445900 A CN106445900 A CN 106445900A
- Authority
- CN
- China
- Prior art keywords
- cell
- lattice
- blank cell
- blank
- content
- 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
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/166—Editing, e.g. inserting or deleting
- G06F40/177—Editing, e.g. inserting or deleting of tables; using ruled lines
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 table style processing method and device. The method includes the steps that a to-be-processed table is obtained; then, all elements in the to-be-processed table are traversed in a preset sequence, and blank cells contained in the to-be-processed table are determined; finally, according to attributes of content in the left cell or the upper cell of the to-be-processed blank cells, controls of corresponding types are inserted into the blank cells. By means of the table style processing method and device, in the process that a table in a document is converted into a web page, the controls are automatically added into the blank cells, user operation and effort are reduced, table conversion time is saved, and work efficiency is improved.
Description
Technical field
The present invention relates to computer application field, more particularly to a kind of table style treating method and apparatus.
Background technology
With the development of network and computer technology, it is to realize non-support cable, increasing enterprise utilizes and does online
Public software is handled official business.This allows for user and is frequently necessary to for the documents such as office or wps to be converted into web page, and
Often include substantial amounts of form in the documents such as office or wps, therefore how the form in document is realized becoming with web page
Obtain particularly important.
Prior art mainly realizes form to the conversion of web page by Form Designer or making office template.
Such as, the pattern of list is affixed to web page by Form Designer first, and then user adds control in input domain again, afterwards
The form that stickup can be obtained carries out input operation;Or when office template is made, user is first marked successively in input domain
Note needs to insert the type of control, so as to Form Designer in paste style, you can while inserting according in office template
Mark, add corresponding control.
But, no matter which kind of technology above-mentioned is required for the operation that user carries out many redundancies, loses time and energy, impact
Work efficiency.
Content of the invention
It is contemplated that at least solving one of technical problem in correlation technique to a certain extent.
For this purpose, first purpose of the present invention is to propose a kind of table style processing method, it is achieved that table in a document
During lattice are converted into web page, add control in blank cell automatically, user operation and energy is reduced, save
Form conversion time, improves work efficiency.
Second object of the present invention is to propose a kind of table style processing meanss.
For reaching above-mentioned purpose, first aspect present invention embodiment proposes a kind of table style processing method, including:First
Obtain pending form;Then travel through each element in the pending form in a predetermined sequence successively, determine described
The blank cell for including in pending form;Finally according to the pending blank cell left cell lattice or upside list
The attribute of content in first lattice, inserts the control of corresponding types in the blank cell.
In a kind of possible way of realization of first aspect, described travel through successively in a predetermined sequence described pending
Table element, determines the blank cell for including in the pending form, including:
According to order from left to right, from top to bottom, the element in the pending form being traveled through successively, determines described
Blank cell in form.
In the alternatively possible way of realization of first aspect, described the blank for including in the pending form is determined
After cell, also include:
Judge whether the height of row at blank cell place or the width of row are zero;
If so, then the blank cell that the width of capable height or row is zero is carried out ignoring process.
In the alternatively possible way of realization of first aspect, described according to the blank cell left cell lattice or
The attribute of content in high-side unit lattice, inserts the control of corresponding types in the blank cell, including:
Judge whether there is content in the blank cell left cell lattice;
If having, according to the attribute of content in the blank cell left cell lattice, insert in the blank cell
Enter the control of corresponding types.
In the alternatively possible way of realization of first aspect, described judge in the blank cell left cell lattice
After whether having content, also include:
If no, according to the attribute of content in the blank cell high-side unit lattice, insert in the blank cell
Enter the control of corresponding types.
In the alternatively possible way of realization of first aspect, described according to the blank cell left cell lattice or
The attribute of content in high-side unit lattice, after inserting the control of corresponding types, also includes in the blank cell:
If the left cell lattice of the blank cell and high-side unit lattice are blank cell, it is determined that with the sky
The attribute of the white corresponding gauge outfit of cell;
According to the attribute of the gauge outfit, the control of corresponding types is inserted in the blank cell.
In the alternatively possible way of realization of first aspect, described gauge outfit corresponding with the blank cell is determined
Attribute, including:
According to the position of the blank cell, and position and the content of each non-empty cell lattice, determine and the blank
The attribute of the corresponding gauge outfit of cell.
In the alternatively possible way of realization of first aspect, described travel through successively in a predetermined sequence described pending
Form in each element after, also include:
Determine the position of each non-empty cell lattice and content in the pending form.
Table style processing method provided in an embodiment of the present invention, obtains pending form first;Then with default
Order travels through each element in the pending form successively, determines the blank cell for including in the pending form;
Finally according to the attribute of content in the pending blank cell left cell lattice or high-side unit lattice, described blank single
The control of corresponding types is inserted in first lattice.Hereby it is achieved that during form is converted into web page in a document, in blank
Automatically add control in cell, user operation and energy is reduced, form conversion time is saved, improves work efficiency.
For reaching above-mentioned purpose, second aspect present invention embodiment proposes a kind of table style processing meanss, including:Obtain mould
Block, for obtaining pending form;First determining module, for traveling through the pending form in a predetermined sequence successively
In each element, determine the blank cell for including in the pending form;First processing module, for waiting to locate according to described
The attribute of content in the blank cell left cell lattice of reason or high-side unit lattice, inserts corresponding class in the blank cell
The control of type.
In a kind of possible way of realization of second aspect, first determining module, specifically for:
According to order from left to right, from top to bottom, the element in the pending form being traveled through successively, determines described
Blank cell in form.
In the alternatively possible way of realization of second aspect, the device, also include:
Judge module, whether the height of row or the width of row for judging blank cell place is zero;
When Second processing module, the height of row being located for blank cell or the width of row are zero, by capable height
Or the blank cell that the width of row is zero carries out ignoring process.
In the alternatively possible way of realization of second aspect, the first processing module, including:
Judging unit, for judging whether there is content in the blank cell left cell lattice;
First processing units, during for having content in the blank cell left cell lattice, according to the blank cell
The attribute of content in lattice left cell lattice, inserts the control of corresponding types in the blank cell.
In the alternatively possible way of realization of second aspect, the first processing module, also include:
Second processing unit, for when in the blank cell left cell lattice without content, according to described blank single
The attribute of content in first lattice high-side unit lattice, inserts the control of corresponding types in the blank cell.
In the alternatively possible way of realization of second aspect, the first processing module, also include:
When determining unit, left cell lattice for the blank cell and high-side unit lattice are blank cell,
Determine the attribute of gauge outfit corresponding with the blank cell;
3rd processing unit, for the attribute according to the gauge outfit, insertion corresponding types in the blank cell
Control.
In the alternatively possible way of realization of second aspect, the determining unit, specifically for:
According to the position of the blank cell, and position and the content of each non-empty cell lattice, determine and the blank
The attribute of the corresponding gauge outfit of cell.
In the alternatively possible way of realization of second aspect, the device, also include:
Second determining module, for determining the position of each non-empty cell lattice and content in the pending form.
The table style processing meanss that the present embodiment is provided, obtain pending form first;Then in a predetermined sequence
Travel through each element in the pending form successively, determine the blank cell for including in the pending form;Finally
According to the attribute of content in the pending blank cell left cell lattice or high-side unit lattice, in the blank cell
The control of middle insertion corresponding types.Hereby it is achieved that during form is converted into web page in a document, in blank cell
Automatically add control in lattice, user operation and energy is reduced, form conversion time is saved, improves work efficiency.
The aspect that the present invention is added and advantage will be set forth in part in the description, and partly will become from the following description
Obtain substantially, or recognized by the practice of the present invention.
Description of the drawings
The above-mentioned and/or additional aspect of the present invention and advantage will become from the following description of the accompanying drawings of embodiments
Substantially and easy to understand, wherein:
Fig. 1 is the flow chart of the table style processing method of one embodiment of the invention;
Fig. 2 is a kind of exemplary plot of pending form;
Fig. 3 is the flow chart of the table style processing method of another embodiment of the present invention;
Fig. 4 is the structure chart of the table style processing meanss of one embodiment of the invention;
Fig. 5 is the structure chart of the table style processing meanss of another embodiment of the present invention.
Specific embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from start to finish
Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached
The embodiment of figure description is exemplary, is only used for explaining the present invention, and is not considered as limiting the invention.Conversely, this
Inventive embodiment includes the spirit for falling into attached claims and all changes in the range of intension, modification and equivalent
Thing.
Below with reference to the accompanying drawings the table style processing method of the embodiment of the present invention is described.
Fig. 1 is the flow chart of the table style processing method of one embodiment of the invention.
As shown in figure 1, the table style processing method includes:
Step 101, obtains pending form.
Specifically, table style processing method provided in an embodiment of the present invention, can be by table provided in an embodiment of the present invention
Lattice pattern processing meanss are executed.
Step 102, travels through each element in the pending form in a predetermined sequence successively, determines described pending
The blank cell for including in form.
Wherein, the element in traversal form can have multiple orders, such as travel through line by line, travel through by column or snakelike time
Go through etc..For example:First from left to right travel through the 1st row and then from left to right travel through the 2nd row again, the like, until last
OK;Or, first from left to right travel through the 1st row and then travel through the 2nd row from right to left, from left to right travel through the 3rd row again, successively class
Push away, until last column;Or, it is also possible to first travel through the 1st row from right to left and then travel through the 2nd row again from right to left, successively class
Push away, until last column;Or, first traversal the 1st is arranged from top to bottom, traversal the 2nd is arranged from top to bottom again, the like, until most
String afterwards;Or, first traversal the 1st is arranged and then traversal the 2nd is arranged from top to bottom, traversal the 3rd is arranged from top to bottom again from top to bottom, according to
Secondary analogize, until last string etc..
Under normal circumstances, custom that what people were daily fill in a form is order from left to right, from top to bottom, and utilizes document object
The order for changing model (Document Object Model, abbreviation DOM) tree construction traversal form is also such.Therefore, at this
In a kind of possible way of realization of bright embodiment, above-mentioned steps 102, can realize in the following ways:
According to order from left to right, from top to bottom, the element in the pending form being traveled through successively, determines described
Blank cell in form.
For example, form as shown in Figure 2, after being traveled through in the manner described above, you can determines blank single in form
First lattice are followed successively by:1st row the 2nd is classified as blank cell, the 1st row the 4th and is classified as blank cell, the 2nd row the 2nd and is classified as blank cell
Lattice, the 2nd row the 4th are classified as blank cell etc..
In addition, each element in form, the height of the row that the position including the row in form, the position of row, cell are located,
The width of row that cell is located, the position of cell, content in cell etc. are for characterizing all elements of form attributes.
Step 103, according to the attribute of content in the pending blank cell left cell lattice or high-side unit lattice,
The control of corresponding types is inserted in the blank cell.
Generally, be accustomed to according to the establishment of form, for characterization unit lattice attribute the information such as " gauge outfit " more be located in form
Left side or upside, therefore, in the present embodiment, in blank cell insert control when, can be according to pending blank
The attribute of content in cell left cell lattice, it is also possible to according to the category of content in pending blank cell high-side unit lattice
Property, determine the type of the control of insertion.
For example, if according to the attribute of content in blank cell left cell lattice, determine in insertion blank cell
The type of control, and by analysis, in blank cell left cell lattice, content is " name ", then can be in blank cell
Input is inserted in lattice;Or, if content is " time " in blank cell left cell lattice, can be in blank cell
Control of date type etc. is inserted in lattice.
In a kind of possible way of realization of the present embodiment, if using from left to right, from top to bottom in above-mentioned steps 102
Sequentially, travel through the element in pending form line by line, then above-mentioned steps 103, can first judge pending blank cell
The attribute of the content in the left cell lattice of colleague, i.e., according to the attribute of content in blank cell left cell lattice, described
The control of corresponding types is inserted in blank cell, is concretely comprised the following steps:
Judge whether there is content in the blank cell left cell lattice;
If having, according to the attribute of content in the blank cell left cell lattice, insert in the blank cell
Enter the control of corresponding types.
For example, if there is the content related to the date in the blank cell left cell lattice, table as shown in Figure 2
In lattice, in the 2nd row blank cell left cell lattice of the 3rd row, content is " date of birth ", then in the 2nd row blank cell of the 3rd row
Corresponding date control is inserted in lattice;If the content having in the blank cell left cell lattice with digital correlation, as Fig. 2 institute
Show, in the 2nd row blank cell left cell lattice of the 9th row, content is " telephone number ", then in the 2nd row blank cell of the 9th row
The corresponding Input of middle insertion.
Further, if blank cell left cell lattice do not have content, according in blank cell high-side unit lattice
The attribute of content, inserts the control of corresponding types in the blank cell.In form as shown in Figure 2, the 14th row the 1st is arranged
For needing the blank cell of control is inserted, first determine whether whether the left cell lattice of the blank cell have content, by sentencing
The disconnected left side no cell for understanding blank cell, then the content in the high-side unit lattice of the cell can be searched, passed through
Judge to understand, the content in the high-side unit lattice of the blank cell and time correlation, then can insert day in blank cell
Phase control;14th row the 2nd is classified as the blank cell for needing to insert control, does not have content on the left of which, interior in high-side unit lattice
Appearance is related to address, then insertion Input etc. in blank cell.
Table style processing method provided in an embodiment of the present invention, obtains pending form first;Then with default
Order travels through each element in the pending form successively, determines the blank cell for including in the pending form;
Finally according to the attribute of content in the pending blank cell left cell lattice or high-side unit lattice, described blank single
The control of corresponding types is inserted in first lattice.Hereby it is achieved that during form is converted into web page in a document, in blank
Automatically add control in cell, user operation and energy is reduced, form conversion time is saved, improves work efficiency.
By above-mentioned analysis, it is determined that after pending blank cell, can be single on the left of blank cell
The attribute of content in first lattice or high-side unit lattice, inserts the control of corresponding types in blank cell.But, in some forms
It is possible that on the left of pending blank cell and upside all sleazy situations, it is impossible to single according to pending blank
The attribute of content in first lattice left cell lattice or high-side unit lattice, inserts the control of corresponding types in blank cell, below
In conjunction with Fig. 3, above-mentioned situation is specifically described.
Fig. 3 is the flow chart of the table style processing method of another embodiment of the present invention.
As shown in figure 3, the table style processing method, including:
Step 301, obtains pending form.
Step 302, according to order from left to right, from top to bottom, travels through each unit in the pending form successively
Element, determines the blank cell for including in the pending form.
Wherein, above-mentioned steps 301- step 302 implement process and principle, be referred to step in above-described embodiment
The detailed description of 101- step 102, here is omitted.
Step 303, judges whether the height of row at blank cell place or the width of row are zero, if so, then hold
Row step 304, otherwise, execution step 305.
Step 304, carries out ignoring process to the blank cell.
Specifically, due to there is hiding region in some forms, the row such as hidden, hiding row or
Hiding cell, the height of row that the cell in these hidden areas is located or the width of row are zero, and these cells
In be do not need input content, also avoid the need for insert control.Therefore in a kind of possible way of realization of the present embodiment,
After determining the blank cell for including in pending form, the height of row that blank cell is located or row can also be judged
Whether width is zero, if so, then carries out ignoring process the blank cell that the width of capable height or row is zero.
It is understood that judge whether the blank cell for including in pending form is hiding cell, permissible
Whether the height being expert at according to blank cell or width are zero judgement, it is also possible to according to the frame property value of blank cell
Whether it is that the method such as zero judges, the present invention is not construed as limiting to this.For example, the height is expert at by certain blank cell is zero, then table
The bright row is a hiding row, it is not necessary to be input into, i.e., need not insert control;Or the boundary line of certain blank cell is
Zero, then show that the cell is hiding, it is not necessary to be input into, i.e., need not insert control.
If in addition, the height of row at blank cell place or the width of row are not zero, blank cell needs
Insertion control, carries out step 305.
Step 305, judges whether there is content in the blank cell left cell lattice, if having, execution step 306,
Otherwise, execution step 307.
Wherein, above-mentioned steps 305 implement process and principle, be referred to the detailed of step 103 in above-described embodiment
Thin description, here is omitted.
Step 306, according to the attribute of content in the pending blank cell left cell lattice, described blank single
The control of corresponding types is inserted in first lattice.
Wherein, if having content in the blank cell left cell lattice, according to the pending blank cell
The attribute of content in left cell lattice, inserts the control of corresponding types in the blank cell, implements process and original
Step 103 has been carried out describing in detail reason in the above-described embodiments, and here is omitted.
Step 307, judges whether there is content in the blank cell high-side unit lattice, if having, execution step 308,
Otherwise, execution step 309.
Step 308, according to the attribute of content in the pending blank cell high-side unit lattice, described blank single
The control of corresponding types is inserted in first lattice.
In above-described embodiment, step 103 describes pending blank cell left cell lattice in detail does not have content, on
When having content in side unit lattice, in the blank cell insert corresponding types control implement process and principle,
Here is omitted.
But, in a kind of possible way of realization, it is possible that on the left of pending blank cell and upside is all
Sleazy situation, now, execution step 309.
Step 309, determines the attribute of gauge outfit corresponding with the blank cell, according to the attribute of the gauge outfit, in institute
State the control that corresponding types are inserted in blank cell.
Specifically, the content being input into is needed in column or row corresponding with " gauge outfit " due to information representations such as " gauge outfits ",
If therefore the left cell lattice of blank cell and high-side unit lattice are blank cell, can determine first and blank cell
The attribute of the corresponding gauge outfit of lattice, then according to the attribute of gauge outfit corresponding with blank cell, it is right to insert in blank cell
Answer the control of type.
When implementing, understand, the cell that the information such as " gauge outfit " is located is in table according to the establishment of common form custom
With specific position and content in lattice, and there is direct correlation with the position of blank cell, therefore, in the embodiment of the present invention
In alternatively possible way of realization, can be according to the position of blank cell, and position and the content of each non-empty cell lattice,
Determine the attribute of gauge outfit corresponding with the blank cell, with the attribute according to the gauge outfit, in the blank cell
The control of insertion corresponding types.Wherein, table style processing meanss, can be in the process traveled through by pending form
In, determine position, the position of each non-empty cell lattice and content of each blank cell etc., to carry out to blank cell
During process, according to position and the content of the non-empty cell lattice for determining before, the class of the control for inserting in blank cell is determined
Type.
For example, table style processing meanss are traversing the 13rd row when traveling through to the form shown in Fig. 2
When, you can determine that the content in the 1st column unit lattice of the 13rd row is " time ", the content in the 2nd column unit lattice of the 13rd row is " single
Position ", the content in the 3rd column unit lattice of the 13rd row is " post " etc..
Accordingly, when the cell of the row of the 15th row the 1st is traversed, according to the content in the 1st column unit lattice of the 13rd row
" time " inserts date control in the 1st column unit lattice of the 14th row, and the 1st row blank cell of the 15th row no left cell
Lattice, high-side unit lattice are blank cell, according to the process for inserting date control in the 1st column unit lattice of the 14th row, it is known that, table
Head is located on the upside of pending blank cell, and the 1st row blank cell of the 15th row should be according in the 1st column unit lattice of the 13rd row
Content " time " inserts date control;When traveling through the cell that the 15th row the 2nd is arranged, according in the 1st column unit lattice of the 13rd row
Content " time " inserts date control in the 1st column unit lattice of the 15th row, according to the content in the 2nd column unit lattice of the 13rd row
" unit " inserts Input in the 2nd column unit lattice of the 14th row, and the 2nd row blank cell left cell lattice of the 15th row
Blank cell is with high-side unit lattice, according to insertion control in the 1st column unit lattice of the 15th row and the 2nd column unit lattice of the 14th row
The process of part, it is known that, gauge outfit is located on the upside of pending blank cell, and the 2nd row blank cell of the 15th row should be according to thereon
Content " unit " insertion Input in the 2nd column unit lattice of 13rd row of side.
Table style processing method provided in an embodiment of the present invention, obtains pending form first;Then according to by a left side
To right, order from top to bottom, each element in the pending form being traveled through successively, determines in the pending form and wrap
The blank cell for containing;Judge whether the height of row at blank cell place or the width of row are zero, if so, then will again
The width of the height of row or row is that zero blank cell carries out ignoring process;Otherwise, then judge on the left of the blank cell
Whether content is had in cell, if having, according to the attribute of content in the pending blank cell left cell lattice, in institute
State the control that corresponding types are inserted in blank cell;Otherwise, in judging whether to have in the blank cell high-side unit lattice
Holding, if having, according to the attribute of content in the pending blank cell high-side unit lattice, inserting in the blank cell
Enter the control of corresponding types;Otherwise, it determines the attribute of gauge outfit corresponding with the blank cell, according to the category of the gauge outfit
Property, the control of corresponding types is inserted in the blank cell.Hereby it is achieved that form is converted into web page in a document
During, add control in blank cell automatically, user operation and energy reduced, form conversion time is saved,
Improve work efficiency and row a height of zero or blank cell that col width is zero ignored, save the time further,
Improve efficiency.
Fig. 4 is the structure chart of the table style processing meanss of one embodiment of the invention.
As shown in figure 4, the table style processing meanss 40, including:
Acquisition module 41, for obtaining pending form;
First determining module 42, for traveling through each element in the pending form in a predetermined sequence successively, really
The blank cell for including in the fixed pending form;
First processing module 43, for according in the pending blank cell left cell lattice or high-side unit lattice
The attribute of content, inserts the control of corresponding types in the blank cell.
Wherein, the table style processing meanss that the present embodiment is provided, can be configured in any can carry out table style
In the terminal unit of process, such as mobile phone, computer etc..
In a kind of possible way of realization of the present embodiment, first determining module 42, specifically for:
According to order from left to right, from top to bottom, the element in the pending form being traveled through successively, determines described
Blank cell in form.
In the alternatively possible way of realization of the present embodiment, the first processing module 43, including:
Judging unit, for judging whether there is content in the blank cell left cell lattice;
First processing units, during for having content in the blank cell left cell lattice, according to the blank cell
The attribute of content in lattice left cell lattice, inserts the control of corresponding types in the blank cell.
In the alternatively possible way of realization of the present embodiment, the first processing module 43, also include:
Second processing unit, for when in the blank cell left cell lattice without content, according to described blank single
The attribute of content in first lattice high-side unit lattice, inserts the control of corresponding types in the blank cell.
It should be noted that the explanation of the above-mentioned table style processing method embodiment to shown in Fig. 1, is also applied for this reality
The table style processing meanss of example offer are applied, here is omitted.
The table style processing meanss that the present embodiment is provided, obtain pending form first;Then in a predetermined sequence
Travel through each element in the pending form successively, determine the blank cell for including in the pending form;Finally
According to the attribute of content in the pending blank cell left cell lattice or high-side unit lattice, in the blank cell
The control of middle insertion corresponding types.Hereby it is achieved that during form is converted into web page in a document, in blank cell
Automatically add control in lattice, user operation and energy is reduced, form conversion time is saved, improves work efficiency.
When there is hiding region in some forms, when the row such as hidden, hiding row or hiding cell,
The height of row that cell in these hidden areas is located or the width of row are zero, and are to be input in these cells
Content, also avoid the need for inserting control.Accordingly, Fig. 5 is the table style processing meanss of another embodiment of the present invention
Structure chart.
As shown in figure 5, on the basis of shown in above-mentioned Fig. 4, the table style processing meanss 40, also include:
Judge module 44, whether the height of row or the width of row for judging blank cell place is zero;
When Second processing module 45, the height of row being located for blank cell or the width of row are zero, by capable height
The width of degree or row is that zero blank cell carries out ignoring process.
In a kind of possible way of realization of the present embodiment, first processing module 43, specifically include:
Judging unit, for judging whether there is content in the blank cell left cell lattice;
First processing units, during for having content in the blank cell left cell lattice, according to the blank cell
The attribute of content in lattice left cell lattice, inserts the control of corresponding types in the blank cell;
Second processing unit, for when in the blank cell left cell lattice without content, according to described blank single
The attribute of content in first lattice high-side unit lattice, inserts the control of corresponding types in the blank cell;
When determining unit, left cell lattice for the blank cell and high-side unit lattice are blank cell,
Determine the attribute of gauge outfit corresponding with the blank cell;
3rd processing unit, for the attribute according to the gauge outfit, insertion corresponding types in the blank cell
Control.
In addition, when processing to blank cell, need with the position of non-empty cell lattice and content as foundation, because
This, in the alternatively possible way of realization of the present embodiment, the table style processing meanss 40, also include:Second determines mould
Block 46, for determining the position of each non-empty cell lattice and content in the pending form.
It should be noted that the table style processing meanss that provide of the present embodiment implement process and principle, permissible
With reference to the detailed description to the table style processing method embodiment shown in Fig. 3, here is omitted.
Table style processing meanss provided in an embodiment of the present invention, obtain pending form first;Then with default
Order travels through each element in the pending form successively, determines the blank cell for including in the pending form;
Judge whether the height of row that the blank cell is located or the width of row are zero again, if so, then by capable height or row
Width is that zero blank cell carries out ignoring process;Otherwise, then according to the blank cell left cell lattice or upside list
The attribute of content in first lattice, inserts the control of corresponding types in the blank cell.Hereby it is achieved that form in a document
During being converted into web page, add control in blank cell automatically, user operation and energy is reduced, is saved
Form conversion time, improves work efficiency.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or the spy for describing with reference to the embodiment or example
Point is contained at least one embodiment or the example of the present invention.In this manual, to the schematic representation of above-mentioned term not
Identical embodiment or example must be directed to.And, the specific features of description, structure, material or feature can be in office
Combined in one or more embodiments or example in an appropriate manner.Additionally, in the case of not conflicting, the skill of this area
The feature of the different embodiments described in this specification or example and different embodiments or example can be tied by art personnel
Close and combine.
Additionally, term " first ", " second " are only used for describing purpose, and it is not intended that indicating or hint relative importance
Or the implicit quantity for indicating indicated technical characteristic.Thus, define " first ", the feature of " second " can express or
Implicitly include at least one this feature.In describing the invention, " multiple " are meant that at least two, such as two, three
Individual etc., unless otherwise expressly limited specifically.
In flow chart or here any process described otherwise above or method description are construed as, expression includes
One or more for realizing specific logical function or process the step of the module of code of executable instruction, fragment or portion
Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not be by the suitable of shown or discussion
Sequence, including according to involved function by basic and meanwhile in the way of or in the opposite order, carry out perform function, this should be by the present invention
Embodiment person of ordinary skill in the field understood.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned
In embodiment, the software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage
Or firmware is realizing.For example, if realized with hardware, and in another embodiment, can be with well known in the art
Any one of row technology or their combination are realizing:The logic gates having for realizing logic function to data signal
Discrete logic, the special IC with suitable combinational logic gate circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step of above-described embodiment method carrying
Suddenly the hardware that can be by program to instruct correlation is completed, and described program can be stored in a kind of computer-readable storage medium
In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
Storage medium mentioned above can be read only memory, disk or CD etc..Although having shown that above and retouching
Embodiments of the invention are stated, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as the limit to the present invention
System, one of ordinary skill in the art can be changed to above-described embodiment, change, replace and become within the scope of the invention
Type.
Claims (10)
1. a kind of table style processing method, it is characterised in that comprise the following steps:
Obtain pending form;
Travel through each element in the pending form in a predetermined sequence successively, determine and include in the pending form
Blank cell;
According to the attribute of content in the pending blank cell left cell lattice or high-side unit lattice, described blank single
The control of corresponding types is inserted in first lattice.
2. the method for claim 1, it is characterised in that described travel through the pending table in a predetermined sequence successively
Lattice element, determines the blank cell for including in the pending form, including:
According to order from left to right, from top to bottom, travel through the element in the pending form successively, determine the form
In blank cell.
3. the method for claim 1, it is characterised in that the blank cell for including in the determination pending form
After lattice, also include:
Judge whether the height of row at blank cell place or the width of row are zero;
If so, then the blank cell that the width of capable height or row is zero is carried out ignoring process.
4. the method for claim 1, it is characterised in that described according to the blank cell left cell lattice or upside
The attribute of content in cell, inserts the control of corresponding types in the blank cell, including:
Judge whether there is content in the blank cell left cell lattice;
If having, according to the attribute of content in the blank cell left cell lattice, it is right to insert in the blank cell
Answer the control of type.
5. method as claimed in claim 4, it is characterised in that described whether judge in the blank cell left cell lattice
After having content, also include:
If no, according to the attribute of content in the blank cell high-side unit lattice, it is right to insert in the blank cell
Answer the control of type.
6. method as claimed in claim 5, it is characterised in that described according to the blank cell left cell lattice or upside
The attribute of content in cell, after inserting the control of corresponding types, also includes in the blank cell:
If the left cell lattice of the blank cell and high-side unit lattice are blank cell, it is determined that blank single with described
The attribute of the corresponding gauge outfit of first lattice;
According to the attribute of the gauge outfit, the control of corresponding types is inserted in the blank cell.
7. method as claimed in claim 6, it is characterised in that the category of determination gauge outfit corresponding with the blank cell
Property, including:
According to the position of the blank cell, and position and the content of each non-empty cell lattice, determine and the blank cell
The attribute of the corresponding gauge outfit of lattice.
8. the method as described in claim 1-7 is arbitrary, it is characterised in that described wait to locate described in traversal successively in a predetermined sequence
After each element in the form of reason, also include:
Determine the position of each non-empty cell lattice and content in the pending form.
9. a kind of table style processing meanss, it is characterised in that include:
Acquisition module, for obtaining pending form;
First determining module, for traveling through each element in the pending form in a predetermined sequence successively, determines described
The blank cell for including in pending form;
First processing module, for according to content in the pending blank cell left cell lattice or high-side unit lattice
Attribute, inserts the control of corresponding types in the blank cell.
10. device as claimed in claim 9, it is characterised in that first determining module, specifically for:
According to order from left to right, from top to bottom, travel through the element in the pending form successively, determine the form
In blank cell.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610836754.XA CN106445900A (en) | 2016-09-20 | 2016-09-20 | Table style processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610836754.XA CN106445900A (en) | 2016-09-20 | 2016-09-20 | Table style processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106445900A true CN106445900A (en) | 2017-02-22 |
Family
ID=58165661
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610836754.XA Pending CN106445900A (en) | 2016-09-20 | 2016-09-20 | Table style processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106445900A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107291467A (en) * | 2017-06-20 | 2017-10-24 | 浪潮金融信息技术有限公司 | The bill processing method and device of self-aided terminal, readable storage medium storing program for executing, terminal |
CN110442854A (en) * | 2019-08-13 | 2019-11-12 | 北京源清慧虹信息科技有限公司 | Generation method, device, computer equipment and the readable storage medium storing program for executing of report |
CN111832267A (en) * | 2019-03-28 | 2020-10-27 | 珠海金山办公软件有限公司 | Cell pasting method and device |
CN111859875A (en) * | 2019-04-18 | 2020-10-30 | 珠海金山办公软件有限公司 | Cell content filling method and device, electronic equipment and storage medium |
CN112528611A (en) * | 2019-08-27 | 2021-03-19 | 珠海金山办公软件有限公司 | Method and device for editing table, computer storage medium and terminal |
CN112637039A (en) * | 2020-07-24 | 2021-04-09 | 腾讯科技(深圳)有限公司 | Information processing method, device and storage medium |
CN112799564A (en) * | 2020-07-14 | 2021-05-14 | 珠海金山办公软件有限公司 | Method, device, electronic equipment and medium for inserting control in table |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101661512A (en) * | 2009-09-25 | 2010-03-03 | 万斌 | System and method for identifying traditional form information and establishing corresponding Web form |
CN102043819A (en) * | 2009-10-20 | 2011-05-04 | 华中科技大学 | HTML table semantic venation analysis method |
CN104298489A (en) * | 2013-07-16 | 2015-01-21 | 苏州精易会信息技术有限公司 | Form reproduction realization method |
CN105468377A (en) * | 2015-12-10 | 2016-04-06 | 北京中科汇联科技股份有限公司 | Method and system for generating page of mobile terminal |
-
2016
- 2016-09-20 CN CN201610836754.XA patent/CN106445900A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101661512A (en) * | 2009-09-25 | 2010-03-03 | 万斌 | System and method for identifying traditional form information and establishing corresponding Web form |
CN102043819A (en) * | 2009-10-20 | 2011-05-04 | 华中科技大学 | HTML table semantic venation analysis method |
CN104298489A (en) * | 2013-07-16 | 2015-01-21 | 苏州精易会信息技术有限公司 | Form reproduction realization method |
CN105468377A (en) * | 2015-12-10 | 2016-04-06 | 北京中科汇联科技股份有限公司 | Method and system for generating page of mobile terminal |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107291467A (en) * | 2017-06-20 | 2017-10-24 | 浪潮金融信息技术有限公司 | The bill processing method and device of self-aided terminal, readable storage medium storing program for executing, terminal |
CN111832267A (en) * | 2019-03-28 | 2020-10-27 | 珠海金山办公软件有限公司 | Cell pasting method and device |
CN111859875A (en) * | 2019-04-18 | 2020-10-30 | 珠海金山办公软件有限公司 | Cell content filling method and device, electronic equipment and storage medium |
CN110442854A (en) * | 2019-08-13 | 2019-11-12 | 北京源清慧虹信息科技有限公司 | Generation method, device, computer equipment and the readable storage medium storing program for executing of report |
CN110442854B (en) * | 2019-08-13 | 2023-04-07 | 北京源清慧虹信息科技有限公司 | Report generation method and device, computer equipment and readable storage medium |
CN112528611A (en) * | 2019-08-27 | 2021-03-19 | 珠海金山办公软件有限公司 | Method and device for editing table, computer storage medium and terminal |
CN112799564A (en) * | 2020-07-14 | 2021-05-14 | 珠海金山办公软件有限公司 | Method, device, electronic equipment and medium for inserting control in table |
CN112637039A (en) * | 2020-07-24 | 2021-04-09 | 腾讯科技(深圳)有限公司 | Information processing method, device and storage medium |
CN112637039B (en) * | 2020-07-24 | 2021-11-02 | 腾讯科技(深圳)有限公司 | Information processing method, device and storage medium |
US11972205B2 (en) | 2020-07-24 | 2024-04-30 | Tencent Technology (Shenzhen) Company Limited | Method, apparatus and storage medium for loading message into target position in target document |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106445900A (en) | Table style processing method and device | |
CN104036060B (en) | A kind of online checking method of engineering drawing and system | |
CN107492135A (en) | A kind of image segmentation mask method, device and computer-readable recording medium | |
CN110286896A (en) | Visualizing editing method, device, equipment and storage medium | |
CN106980605A (en) | Contract generation method and device | |
CN101430714B (en) | Content structuring process method and system based on model | |
CN103020295B (en) | A kind of problem label for labelling method and device | |
CN107341014A (en) | Electronic equipment, the generation method of technical documentation and device | |
CN108197114A (en) | Detection method, device, storage medium and the electronic device of list data | |
CN106681698A (en) | Dynamic list generating method and device | |
CN104915186B (en) | A kind of method and apparatus making the page | |
CN109491708A (en) | Document structure tree method, system, equipment and medium | |
CN106156306A (en) | A kind of template rendering intent and device | |
CN103886023A (en) | Storage and extraction method and system of Excel data tables | |
CN105868289A (en) | Multimedia courseware generating method and apparatus | |
CN106021718A (en) | Drawing method and device used for engineering drawing in CATIA (Computer-graphics Aided Three-dimensional Interactive Application) | |
CN104298705A (en) | Converting method of relational data and unstructured data | |
CN106528088A (en) | Method and device for addling control in online form | |
CN104679453A (en) | Information input, storage, typesetting and printing general system and information input, storage, typesetting and printing method | |
CN110516233A (en) | Method, apparatus, terminal device and the storage medium of data processing | |
CN110286903A (en) | Construction method, device, equipment and the storage medium of user information list | |
JPWO2017131184A1 (en) | Book digitization method and book digitization apparatus | |
CN102024077B (en) | Engineering drawing processing method | |
CN109753273A (en) | Internet of Things application and development method, apparatus and its equipment based on MVVM frame | |
CN107608737A (en) | Animation playing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |