CN110147402A - Excel file introduction method and equipment, deriving method and equipment - Google Patents
Excel file introduction method and equipment, deriving method and equipment Download PDFInfo
- Publication number
- CN110147402A CN110147402A CN201910431456.6A CN201910431456A CN110147402A CN 110147402 A CN110147402 A CN 110147402A CN 201910431456 A CN201910431456 A CN 201910431456A CN 110147402 A CN110147402 A CN 110147402A
- Authority
- CN
- China
- Prior art keywords
- file
- rule
- template
- imported
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
It includes the file data to be imported read to import file template as carrier that the embodiment of the present invention, which provides a kind of Excel file introduction method and equipment, deriving method and equipment, this method,;Wherein, the importing file template is to be generated to obtain according to note entity rule;The file data to be imported is verified according to the corresponding verification rule of the importing file template, generates check results;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check rule, data type verification rule and spelling verification rule;If check results are to verify successfully, the file data to be imported is imported into database.The embodiment of the present invention avoids the exploitation and higher maintenance cost of elaborated code by using the mode drawing template establishment for explaining entity rule.
Description
Technical field
The present embodiments relate to technical field of data processing more particularly to a kind of Excel file introduction method and equipment,
Deriving method and equipment.
Background technique
Excel file can easily produce various electrical forms, carry out complexity to data using formula and function
Operation;Indicate that data are simple and clear with various charts;Using hyperlink function, user can quickly open local area network or
File on Interner shares workbook file with the Internet user of any position in the world, therefore Excel file is wide
General use.In web system especially digital publishing field often use Excel file import and export function, by Excel
Data in file, which are directed into database, can facilitate statistics and inquiry or export the content inquired from database.
In the scheme that existing Excel file imports and exports, primary POI (Poor Obfuscation is generallyd use
Implementation, the fuzzy realization of succinct version) API (Application Programming Interface, using journey
Sequence programming interface) carry out business realizing.
However, in the scheme that above-mentioned Excel file imports and exports, it is complicated and not convenient for safeguarding there are the code of exploitation to ask
Topic.
Summary of the invention
The embodiment of the present invention provides a kind of Excel file introduction method and equipment, deriving method and equipment, to improve
Excel is imported or derived ease for operation, avoids the wasting of resources and high maintenance cost caused by exploitation elaborated code.
In a first aspect, the embodiment of the present invention provides a kind of Excel file introduction method, comprising:
It reads to import to be imported file data of the file template as carrier;Wherein, the importing file template is basis
It explains entity rule and generates acquisition;
The file data to be imported is verified according to the corresponding verification rule of the importing file template, generates school
Test result;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check rule, data type
Verification rule and spelling verification rule;
If check results are to verify successfully, the file data to be imported is imported into database.
In a kind of possible design, the classification results according to VAD model output determine the starting point of voice segments
And terminal, comprising:
According to the first sound frame corresponding greater than the first classification value of first threshold that the VAD model exports, determine first
Speech frame, and determine according to the first speech frame starting point of institute's speech segment;
After determining the first speech frame, according to first second less than second threshold of VAD model output
The corresponding sound frame of classification value determines the last one speech frame, and according to the last one described speech frame, determines institute's speech segment
Terminal, the first threshold are greater than the second threshold.
In a kind of possible design, the reading using before importing file template as the file data to be imported of carrier,
Further include:
The importing file template is generated according to entity rule is explained;
The download instruction of user is received, and the importing file template is exported according to the download instruction, so that user exists
File data to be imported is filled in the importing file template.
It is described that the importing file template is generated according to note entity rule in a kind of possible design, comprising:
Create entity bean to be imported;
Increase to import above each attribute of the entity bean and explain configuration, obtains the importing file template.
In a kind of possible design, the reading using before importing file template as the file data to be imported of carrier,
Further include:
Whether the file format for judging the file data is Excel format;
The reading is to import to be imported file data of the file template as carrier, comprising:
If the file data to be imported is Excel format, read to import to be imported text of the file template as carrier
Number of packages evidence.
In a kind of possible design, according to the corresponding verification rule of the importing file template to the file to be imported
Data are verified, after generation check results, further includes:
If check results are verification failure, the position for not meeting the verification rule is returned to, and point out violated rule
Then.
Second aspect, the embodiment of the present invention provide a kind of Excel file deriving method, comprising:
To export data in reading database;
According to described to export data, corresponding export template is created;According to the export template
It explains entity rule and generates acquisition
It is verified to described to export data according to the corresponding verification rule of the export template, generates school
Test result;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check rule, data type
Verification rule and spelling verification rule;
If check results are to verify successfully, described the export template will be imported to export data, obtained
Export.
The third aspect, the embodiment of the present invention provide a kind of Excel file importing equipment, comprising:
First read module, for reading the file data to be imported to import file template as carrier;Wherein, described to lead
Entering file template is to be generated to obtain according to note entity rule;
First correction verification module, for regular to the number of files to be imported according to the corresponding verification of the importing file template
According to being verified, check results are generated;Wherein, the verification rule includes at least one of following: non-empty verification rule, length
Verification rule, data type verification rule and spelling verification rule;
The file data to be imported is imported database if being to verify successfully for check results by import modul.
In a kind of possible design, the equipment, further includes:
Generation module, for generating the importing file template according to note entity rule;
Receiving module exports the importing file mould for receiving the download instruction of user, and according to the download instruction
Plate, so that user fills in file data to be imported in the importing file template.
In a kind of possible design, the generation module is specifically used for:
Create entity bean to be imported;
Increase to import above each attribute of the entity bean and explain configuration, obtains the importing file template.
In a kind of possible design, the equipment further include:
Judgment module, for judging whether the file format of the file data is Excel format;
First read module is specifically used for: if the file data to be imported is Excel format, reading to import
File template is the file data to be imported of carrier.
In a kind of possible design, the equipment further include:
Return module returns to the position for not meeting the verification rule, and refer to if being verification failure for check results
The rule violated out.
Fourth aspect, the embodiment of the present invention provide a kind of Excel file equipment leading out, comprising:
Second read module is used in reading database to export data;
Creation module, for, to export data, creating corresponding export template according to described;The export text
Part template is to be generated to obtain according to note entity rule
Second correction verification module is used for according to the corresponding verification rule of the export template to described to export number
According to being verified, check results are generated;Wherein, the verification rule includes at least one of following: non-empty verification rule, length
Verification rule, data type verification rule and spelling verification rule;
Export module described will import the export to export data if being to verify successfully for check results
File template obtains export.
5th aspect, the embodiment of the present invention provide a kind of Excel file and import equipment, comprising: at least one processor and
Memory;
The memory stores computer executed instructions;
At least one described processor executes the computer executed instructions of memory storage so that it is described at least one
Processor executes Excel file introduction method described in the various possible designs of first aspect and first aspect as above.
6th aspect, the embodiment of the present invention provide a kind of computer readable storage medium, the computer-readable storage medium
Computer executed instructions are stored in matter, when processor execute the computer executed instructions when, realize first aspect as above with
And Excel file introduction method described in the various possible designs of first aspect.
7th aspect, the embodiment of the present invention provide a kind of Excel file and import equipment, comprising: at least one processor and
Memory;
The memory stores computer executed instructions;
At least one described processor executes the computer executed instructions of memory storage so that it is described at least one
Processor executes Excel file deriving method described in second aspect as above.
Eighth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, the computer-readable storage medium
Computer executed instructions are stored in matter, when processor execute the computer executed instructions when, realize first aspect as above with
And Excel file deriving method described in the various possible designs of first aspect.
Excel file introduction method provided in this embodiment and equipment, deriving method and equipment, the introduction method pass through reading
It takes according to the content for generating the importing file template filling of acquisition according to entity rule is explained, and is verified successfully in legitimacy verifies
Afterwards, the file data after verification being imported into database, Excel file introduction method provided in an embodiment of the present invention is easy to use,
By using the mode drawing template establishment for explaining entity rule, the exploitation and higher maintenance cost of elaborated code are avoided.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair
Bright some embodiments for those of ordinary skill in the art without any creative labor, can be with
It obtains other drawings based on these drawings.
Fig. 1 is the flow diagram for the Excel file introduction method that one embodiment of the invention provides;
Fig. 2 is the flow diagram for the Excel file introduction method that further embodiment of this invention provides;
Fig. 3 is the flow diagram for the Excel file introduction method that further embodiment of this invention provides;
Fig. 4 is the flow diagram for the Excel file introduction method that further embodiment of this invention provides;
Fig. 5 is the flow diagram for the Excel file deriving method that further embodiment of this invention provides;
The schematic diagram at interface is imported in the Excel file introduction method that Fig. 6 provides for further embodiment of this invention;
The schematic diagram of file template is imported in the Excel file introduction method that Fig. 7 provides for further embodiment of this invention;
Database export selection interface in the Excel file deriving method that Fig. 8 provides for further embodiment of this invention;
Fig. 9 is the structural schematic diagram that the Excel file that further embodiment of this invention provides imports equipment;
Figure 10 is the structural schematic diagram that the Excel file that further embodiment of this invention provides imports equipment;
Figure 11 is the structural schematic diagram for the Excel file equipment leading out that further embodiment of this invention provides;
Figure 12 is the hardware structural diagram that the Excel file that further embodiment of this invention provides imports equipment;
Figure 13 is the hardware structural diagram for the Excel file equipment leading out that further embodiment of this invention provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Especially digital publishing field can will be seen that when the books for treating publication carry out proof-reading in web system
Related content of each mistake be stored in Excel table, such as may include following field in table: type of error, wrong word
Position, wrong word content etc., summarize for convenience and inquire, each table generated in proof-reading needs to import database and deposited
Storage carries out the export of certain table when needed, for the function that imports and exports of Excel file, previous development plan, mostly
Number directly uses primary poiAPI business logic development, causes the code complexity write also not convenient for safeguarding.Based on this, the present invention is real
It applies example and provides a kind of Excel file introduction method and Excel file deriving method, easy to use, maintenance cost is lower.
It is carried out specifically using lead-in and lead-out method of the specific embodiment to the Excel file that this programme provides below
It is bright.
Fig. 1 is the flow diagram for the Excel file introduction method that one embodiment of the invention provides.As shown in Figure 1, the party
Method includes:
101, it reads to import to be imported file data of the file template as carrier;Wherein, the importing file template is
Acquisition is generated according to entity rule is explained.
In practical application, the executing subject of the present embodiment can be terminal device having data processing function, such as: hand
Machine, computer, plate etc. can also be background server equipment.
In the present embodiment, it is described import file template can according to user need content formulate table, table
Each field is set according to the content that user needs, such as user needs to import the mistake of each error items found in check and correction
The fields such as type, wrong lexeme set, wrong word content.It is described to import to be imported file data of the file template as carrier, Ke Yiwei
The data content of corresponding position filling in the importing file template, such as: correspond to type of error field, the wrongly written character filled in
The contents such as type, malapropism type.Corresponding to wrong word location field, the contents such as page 5 the 2nd row, the eighth row of page 12 for filling in.
The importing template is generated using note mode, such as: reflecting for java domain object and excel data can be set
Relationship is penetrated, the domain object of the corresponding java of the every a line of excel file is made.
102, the file data to be imported is verified according to the corresponding verification rule of the importing file template, it is raw
At check results;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check rule, data
Type checking rule and spelling verification rule.
In the present embodiment, the verification rule can be arranged in the form of note in the corresponding neck of the every a line of Excel data
In field object.The non-empty verification rule refers to that field contents cannot be sky, such as the corresponding each occurrence of type of error field
It cannot refer to that the occurrence of field need to meet length threshold range for sky, length check rule, such as type of error field corresponds to
Each occurrence need to be less than 2 bytes.Data type verification rule refers to that field occurrence need to match predefined type, such as date word
The corresponding data type of section need to match date type.Spelling verification rule, refers to that field occurrence need to meet the canonical table of setting
Up to formula.
If 103, check results are to verify successfully, the file data to be imported is imported into database.
In practical application, the database can be stored in a variety of forms, can for locally stored database or
The database of cloud storage.
Optionally, data import before database, can also carry out school according to database association rule to file data to be imported
It tests, database is imported data to if meeting database association rule.The database association rule may include length rule, data type
Rule etc., this embodiment is not limited.
In practical application, the present embodiment further includes customized import feature, be can specifically include:
According to default importing template, filling imports data.
Definition imports parameter, and setting imports parameter value, and setting map mode handles rule.Specifically, by Excel file number
Each field is mapped to the keyword in map in.So that when reading file data to be imported that the data of every a line are automatic
It is arranged in map, is saved in the form of map.Such as: " canonical name " -- > regularWord;" noun lack of standardization " -- >
irrWord。
Rule is handled by map mode, and data to be imported are imported into database.
The customized import feature by using map mode, can more flexible design template, realize customized leads
Enter.
Excel file introduction method provided in this embodiment generates acquisition according to according to note entity rule by reading
The content for importing file template filling, and after legitimacy verifies verifys successfully, by the file data importing data after verification
Library, this method is easy to use, by using explain entity rule mode drawing template establishment, avoid elaborated code exploitation and
Higher maintenance cost.
Fig. 2 is the flow diagram for the Excel file introduction method that further embodiment of this invention provides.As shown in Fig. 2,
On the basis of embodiment shown in FIG. 1, the generation for importing file template is described in detail with application for the present embodiment, the party
Method may include:
201, the importing file template is generated according to note entity rule.
During specific implementation, which can be specifically included:
2011, entity bean to be imported is created.
2012, increase to import above each attribute of the entity bean and explain configuration, obtain the importing file
Template.
Specifically, different fields is arranged according to the demand of practical business scene, to create entity bean.The entity
Each attribute of bean refers to the attribute of each field, and increases to import for each field and explain, and it includes word which, which explains,
Section name, for contents such as the rules such as non-empty, the length of the field.
202, the download instruction of user is received, and the importing file template is exported according to the download instruction, to use
File data to be imported is filled in the importing file template in family.
Specifically, importing the signal at interface in the Excel file introduction method that Fig. 6 provides for further embodiment of this invention
Scheme, the schematic diagram of file template is imported in the Excel file introduction method that Fig. 7 provides for further embodiment of this invention, such as Fig. 6 institute
Show, terminal device is pushed to user imports interface, and user can be by clicking the download button in the importing interface, input downloading
Instruction, so that terminal device exports the importing file template.As shown in fig. 7, user can be in the importing file template
Corresponding field occurrence is filled in below respective field name.
203, it reads to import to be imported file data of the file template as carrier;Wherein, the importing file template is
Acquisition is generated according to entity rule is explained.
204, the file data to be imported is verified according to the corresponding verification rule of the importing file template, it is raw
At check results;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check rule, data
Type checking rule and spelling verification rule;
If 205, check results are to verify successfully, the file data to be imported is imported into database.
Step 203 is similar to step 103 with step 101 in above-described embodiment to step 205 in the present embodiment, herein not
It repeats again.
Excel file introduction method provided in this embodiment by generating importing template according to note mode, and makes user
Fills are carried out in the importing template, obtain data to be imported, and then right according to the verification rule being arranged in template is imported
Data to be imported are verified, and this method is easy to use, avoid the exploitation of elaborated code and the wave of higher maintenance cost
Take.
Fig. 3 is the flow diagram for the Excel file introduction method that further embodiment of this invention provides.As shown in figure 3,
On the basis of above-described embodiment, the case where verification failure is described in detail in the present embodiment, and this method may include:
301, it reads to import to be imported file data of the file template as carrier;Wherein, the importing file template is
Acquisition is generated according to entity rule is explained.
302, the file data to be imported is verified according to the corresponding verification rule of the importing file template, it is raw
At check results;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check rule, data
Type checking rule and spelling verification rule.
If 303, check results are to verify successfully, the file data to be imported is imported into database.
Step 301 is similar to step 103 with step 101 in above-described embodiment to step 303 in the present embodiment, herein not
It repeats again.
If 304, check results are verification failure, the position for not meeting the verification rule is returned to, and point out to be violated
Rule.
In practical application, if verification failure, can be generated journal file, journal file record does not meet verification rule
Position, and the verification Rule content violated.To be modified according to the journal file to wrong content.
Excel file introduction method provided in an embodiment of the present invention is carried out wrong by the file to be imported to verification failure
Misdescription record, can fast and accurately correct file data to be imported according to the error logging.
A specific embodiment is given below and is integrated each step in conjunction with above-described embodiment in order to facilitate understanding
Explanation.
Fig. 4 is the flow diagram for the Excel file introduction method that further embodiment of this invention provides, as shown in figure 4, should
Method may include:
401, it is generated according to note entity rule and imports file template.
402, the download instruction of user is received, and the importing file template is exported according to the download instruction, to use
File data to be imported is filled in the importing file template in family.
Step 401 is similar to step 202 with step 201 in above-described embodiment to step 402 in the present embodiment, herein not
It repeats again.
403, whether the file format for judging the file data is Excel format.
If 404, the file data to be imported is Excel format, reading to import file template is carrier wait lead
Enter file data.Wherein, the importing file template is to be generated to obtain according to note entity rule.
In the present embodiment, the file type of this document data can be judged by the file header content of file.If Excel
File then carries out subsequent step, if it is not, user is then prompted to upload mistake.To save process, improve efficiency.
405, the file data to be imported is verified according to the corresponding verification rule of the importing file template, it is raw
At check results;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check rule, data
Type checking rule and spelling verification rule.
If 406, check results are to verify successfully, the file data to be imported is imported into database.
If 407, check results are verification failure, the position for not meeting the verification rule is returned to, and point out to be violated
Rule.
Step 405 is similar to step 304 with step 302 in above-described embodiment to step 407 in the present embodiment, herein not
It repeats again.
Excel file introduction method provided in this embodiment imports template by generating according to note entity rule, so that
User's fill substance in a template, obtains data to be imported, and verify before importing to file format and legitimacy, protects
It has demonstrate,proved and has imported the accurate of data.This method is easy to use, avoids the exploitation of elaborated code and the waste of high maintenance cost.
Fig. 5 is the flow diagram for the Excel file deriving method that further embodiment of this invention provides, as shown in figure 5, should
Method may include:
501, to export data in reading database.
In practical application, the executing subject of the present embodiment can be terminal device having data processing function, such as: hand
Machine, computer, plate etc. can also be background server equipment.
In the present embodiment, the number that can be inquired from database retrieval according to demand for user to export data
According to.
Specifically, database export choosing in the Excel file deriving method that Fig. 8 provides for further embodiment of this invention
Select interface.As shown in figure 8, the qualified data inquired can be carried out frame choosing by user, thus by clicking upper end
Export button carries out export operation.
502, corresponding export template is created to export data according to described;The export template is
Acquisition is generated according to entity rule is explained.
During specific implementation, which can be specifically included:
5021, creation is to derived entity bean.
5022, increase export above each attribute of the entity bean and explain configuration, obtain the export
Template.
Specifically, according to the demand of user, different fields is arranged, to create entity bean.
Each attribute of the entity bean refers to the attribute of each field, and increases to import for each field and explain,
It includes field name, for contents such as the rules such as non-empty, the length of the field that the export, which is explained,.
503, it is verified to described to export data according to the corresponding verification rule of the export template, it is raw
At check results;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check rule, data
Type checking rule and spelling verification rule.
In the present embodiment, the verification rule can be arranged in the form of note in the corresponding neck of the every a line of Excel data
In field object.The non-empty verification rule refers to that field contents cannot be sky, such as the corresponding each occurrence of type of error field
It cannot refer to that the occurrence of field need to meet length threshold range for sky, length check rule, such as type of error field corresponds to
Each occurrence need to be less than 2 bytes.Data type verification rule refers to that field occurrence need to match predefined type, such as date word
The corresponding data type of section need to match date type.Spelling verification rule, refers to that field occurrence need to meet the canonical table of setting
Up to formula.
If 504, check results are to verify successfully, described the export template will be imported to export data,
Obtain export.
Optionally, which can also include customized export function, can specifically include:
Derived Data field names are wanted according to business rule formulation;
It formulates data and exports mapping ruler;Specifically, the field of the field of data to be exported and export template is carried out one
One is corresponding;
Such as: regularWord-- > " canonical name ";IrrWord-- > " noun lack of standardization ".
Here data can be map and be formed, such as " regularWord ", " regu0 ";"irrWord","irrWord"},
RegularWord and irrWord be key, regu0 and irrWord it is corresponding be to be worth namely to want derived data.
Mapping ruler is exported according to the data, data to be exported is exported.
The customized export function by using map mode, can more flexible design template, realize customized leads
Out.
Function can will be imported and exported in practical application to combine, therefore, Excel file export side provided in this embodiment
Method can also include:
505, it reads to import to be imported file data of the file template as carrier;Wherein, the importing file template is
Acquisition is generated according to entity rule is explained.
506, the file data to be imported is verified according to the corresponding verification rule of the importing file template, it is raw
At check results;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check rule, data
Type checking rule and spelling verification rule.
If 507, check results are to verify successfully, the file data to be imported is imported into database.
Step 505 is similar to step 103 with step 101 in above-described embodiment to step 507, and details are not described herein again.
Excel file deriving method provided in an embodiment of the present invention passes through the export mould generated according to entity rule is explained
Plate is loaded to export data, and method is simply easily realized, elaborated code exploitation is avoided to bring the wasting of resources and higher
Maintenance cost.
Fig. 9 is the structural schematic diagram that the Excel file that further embodiment of this invention provides imports equipment.As shown in figure 9, should
It includes: the first read module 901, the first correction verification module 902 and import modul 903 that Excel file, which imports equipment 90,.
First read module 901, for reading the file data to be imported to import file template as carrier;Wherein, institute
Stating and importing file template is to be generated to obtain according to note entity rule;
First correction verification module 902, for regular to the text to be imported according to the corresponding verification of the importing file template
Number of packages generates check results according to being verified;Wherein, the verification rule includes at least one of following: non-empty verification rule,
Length check rule, data type verification rule and spelling verification rule;
The file data to be imported is imported data if being to verify successfully for check results by import modul 903
Library.
Excel file provided in an embodiment of the present invention imports equipment, and the first read module is read according to according to note entity
Rule generates the content for importing file template filling obtained, and in the first correction verification module to the legitimacy of file data to be imported
After verifying successfully, the file data after verification is imported by database by import modul, it is provided in an embodiment of the present invention
Excel file importing equipment is easy to use, by using the mode drawing template establishment for explaining entity rule, avoids elaborated code
Exploitation and higher maintenance cost.
Figure 10 is the structural schematic diagram that the Excel file that further embodiment of this invention provides imports equipment.As shown in Figure 10,
The Excel file imports equipment 90 further include: generation module 904, receiving module 905.
Generation module 904, for generating the importing file template according to note entity rule;
Receiving module 905 exports the importing file for receiving the download instruction of user, and according to the download instruction
Template, so that user fills in file data to be imported in the importing file template.
Optionally, the generation module 904 is specifically used for:
Create entity bean to be imported;
Increase to import above each attribute of the entity bean and explain configuration, obtains the importing file template.
Optionally, which further includes judgment module 906, for judge the file data file format whether be
Excel format;
First read module is specifically used for: if the file data to be imported is Excel format, reading to import
File template is the file data to be imported of carrier.
Optionally, the equipment 90 further include:
Return module 907 returns to the position for not meeting the verification rule if being verification failure for check results,
And point out violated rule.
Excel file provided in an embodiment of the present invention imports equipment, can be used for executing above-mentioned embodiment of the method, realizes
Principle is similar with technical effect, and details are not described herein again for the present embodiment.
Figure 11 is the structural schematic diagram for the Excel file equipment leading out that further embodiment of this invention provides.As shown in figure 11,
The Excel file equipment leading out 110 includes: the first read module 1101, the first correction verification module 1102 and import modul 903.
Second read module 1101 is used in reading database to export data.
Creation module 1102, for, to export data, creating corresponding export template according to described;It is described to lead
File template is to be generated to obtain according to note entity rule out
Second correction verification module 1103, for regular to the text to be exported according to the corresponding verification of the export template
Number of packages generates check results according to being verified;Wherein, the verification rule includes at least one of following: non-empty verification rule,
Length check rule, data type verification rule and spelling verification rule;
Export module 1104 will be described to described in the importing of export data if being to verify successfully for check results
Export template obtains export.
Excel file equipment leading out provided in this embodiment passes through text to be exported in the second read module reading database
Number of packages evidence, the second correction verification module is according to the corresponding verification rule of the export template that creation module creates to described wait lead
File data is verified out, generates check results;Wherein, the verification rule includes at least one of following: non-empty verification
Rule, length check rule, data type verification rule and spelling verification rule;Export module check results be verification at
Function described will import the export template to export data, and obtain export.It is provided in an embodiment of the present invention
Excel file equipment leading out is easy to use, by using the mode drawing template establishment for explaining entity rule, avoids elaborated code
Exploitation and higher maintenance cost.
Figure 12 is the hardware structural diagram that the Excel file that further embodiment of this invention provides imports equipment.Such as Figure 12
Shown, it includes: at least one processor 1201 and memory 1202 that Excel file provided in this embodiment, which imports equipment 120,.Its
In, processor 1201, memory 1202 are connected by bus 1203.
During specific implementation, at least one processor 1201 executes the computer that the memory 1202 stores and executes
Instruction, so that at least one processor 1201 executes Excel file as above and imports the importing of Excel file performed by equipment 120
Method.
The specific implementation process of processor 1201 can be found in above method embodiment, implementing principle and technical effect class
Seemingly, details are not described herein again for the present embodiment.
In the embodiment shown in above-mentioned Figure 12, it should be appreciated that processor can be central processing unit (English:
Central Processing Unit, referred to as: CPU), can also be other general processors, digital signal processor (English:
Digital Signal Processor, referred to as: DSP), specific integrated circuit (English: Application Specific
Integrated Circuit, referred to as: ASIC) etc..General processor can be microprocessor or the processor is also possible to
Any conventional processor etc..Hardware processor can be embodied directly in conjunction with the step of invention disclosed method to have executed
At, or in processor hardware and software module combination execute completion.
Memory may include high speed RAM memory, it is also possible to and it further include non-volatile memories NVM, for example, at least one
Magnetic disk storage.
Bus can be industry standard architecture (Industry Standard Architecture, ISA) bus, outer
Portion's apparatus interconnection (Peripheral Component, PCI) bus or extended industry-standard architecture (Extended
Industry Standard Architecture, EISA) bus etc..Bus can be divided into address bus, data/address bus, control
Bus etc..For convenient for indicating, the bus in illustrations does not limit only a bus or a type of bus.
Figure 13 is the hardware structural diagram for the Excel file equipment leading out that further embodiment of this invention provides.Such as Figure 13
Shown, Excel file equipment leading out 130 provided in this embodiment includes: at least one processor 1301 and memory 1302.Its
In, processor 1301, memory 1302 are connected by bus 1303.
During specific implementation, at least one processor 1301 executes the computer that the memory 1302 stores and executes
Instruction, so that at least one processor 1301 executes the importing of Excel file performed by Excel file equipment leading out 130 as above
Method.
The specific implementation process of processor 1301 can be found in above method embodiment, implementing principle and technical effect class
Seemingly, details are not described herein again for the present embodiment.
In the embodiment shown in above-mentioned Figure 13, it should be appreciated that processor can be central processing unit (English:
Central Processing Unit, referred to as: CPU), can also be other general processors, digital signal processor (English:
Digital Signal Processor, referred to as: DSP), specific integrated circuit (English: Application Specific
Integrated Circuit, referred to as: ASIC) etc..General processor can be microprocessor or the processor is also possible to
Any conventional processor etc..Hardware processor can be embodied directly in conjunction with the step of invention disclosed method to have executed
At, or in processor hardware and software module combination execute completion.
Memory may include high speed RAM memory, it is also possible to and it further include non-volatile memories NVM, for example, at least one
Magnetic disk storage.
Bus can be industry standard architecture (Industry Standard Architecture, ISA) bus, outer
Portion's apparatus interconnection (Peripheral Component, PCI) bus or extended industry-standard architecture (Extended
Industry Standard Architecture, EISA) bus etc..Bus can be divided into address bus, data/address bus, control
Bus etc..For convenient for indicating, the bus in illustrations does not limit only a bus or a type of bus.
The application also provides a kind of computer readable storage medium, and calculating is stored in the computer readable storage medium
Machine executes instruction, and when processor executes the computer executed instructions, realizes that Excel file as above imports what equipment executed
Excel file introduction method.
The application also provides a kind of computer readable storage medium, and calculating is stored in the computer readable storage medium
Machine executes instruction, and when processor executes the computer executed instructions, realizes what Excel file equipment leading out as above executed
Excel file deriving method.
Above-mentioned computer readable storage medium, above-mentioned readable storage medium storing program for executing can be by any kind of volatibility or non-
Volatile storage devices or their combination realize that, such as static random access memory (SRAM), electrically erasable is only
It reads memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM) is read-only to deposit
Reservoir (ROM), magnetic memory, flash memory, disk or CD.Readable storage medium storing program for executing can be general or specialized computer capacity
Any usable medium enough accessed.
A kind of illustrative readable storage medium storing program for executing is coupled to processor, to enable a processor to from the readable storage medium storing program for executing
Information is read, and information can be written to the readable storage medium storing program for executing.Certainly, readable storage medium storing program for executing is also possible to the composition portion of processor
Point.Processor and readable storage medium storing program for executing can be located at specific integrated circuit (Application Specific Integrated
Circuits, referred to as: ASIC) in.Certainly, processor and readable storage medium storing program for executing can also be used as discrete assembly and be present in equipment
In.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey
When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or
The various media that can store program code such as person's CD.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.
Claims (12)
1. a kind of Excel file introduction method characterized by comprising
It reads to import to be imported file data of the file template as carrier;Wherein, the importing file template is according to note
Entity rule generates acquisition;
The file data to be imported is verified according to the corresponding verification rule of the importing file template, generates verification knot
Fruit;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check rule, data type verification
Rule and spelling verification rule;
If check results are to verify successfully, the file data to be imported is imported into database.
2. the method according to claim 1, wherein the reading is to import file template as the to be imported of carrier
Before file data, further includes:
The importing file template is generated according to entity rule is explained;
The download instruction of user is received, and the importing file template is exported according to the download instruction, so that user is described
It imports in file template and fills in file data to be imported.
3. according to the method described in claim 2, it is characterized in that, described generate the importing file according to note entity rule
Template, comprising:
Create entity bean to be imported;
Increase to import above each attribute of the entity bean and explain configuration, obtains the importing file template.
4. the method according to claim 1, wherein the reading is to import file template as the to be imported of carrier
Before file data, further includes:
Whether the file format for judging the file data is Excel format;
The reading is to import to be imported file data of the file template as carrier, comprising:
If the file data to be imported is Excel format, read to import to be imported number of files of the file template as carrier
According to.
5. method according to claim 1-4, which is characterized in that according to the corresponding school of the importing file template
It tests rule to verify the file data to be imported, after generation check results, further includes:
If check results are verification failure, the position for not meeting the verification rule is returned to, and point out violated rule.
6. a kind of Excel file deriving method characterized by comprising
To export data in reading database;
According to described to export data, corresponding export template is created;The export template is according to note
Entity rule generates acquisition
It is verified to described to export data according to the corresponding verification rule of the export template, generates verification knot
Fruit;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check rule, data type verification
Rule and spelling verification rule;
If check results are to verify successfully, described the export template will be imported to export data, be exported
File.
7. a kind of Excel file imports equipment characterized by comprising
First read module, for reading the file data to be imported to import file template as carrier;Wherein, the importing text
Part template is to be generated to obtain according to note entity rule;
First correction verification module, for according to the corresponding verification of the importings file template it is regular to the file data to be imported into
Row verification, generates check results;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check
Rule, data type verification rule and spelling verification rule;
The file data to be imported is imported database if being to verify successfully for check results by import modul.
8. a kind of Excel file equipment leading out characterized by comprising
Second read module is used in reading database to export data;
Creation module, for, to export data, creating corresponding export template according to described;The export mould
Plate is to be generated to obtain according to note entity rule
Second correction verification module, for according to the corresponding verification of the export template it is regular to it is described to export data into
Row verification, generates check results;Wherein, the verification rule includes at least one of following: non-empty verification rule, length check
Rule, data type verification rule and spelling verification rule;
Export module described will import the export to export data if being to verify successfully for check results
Template obtains export.
9. a kind of Excel file imports equipment characterized by comprising at least one processor and memory;
The memory stores computer executed instructions;
At least one described processor executes the computer executed instructions of the memory storage, so that at least one described processing
Device executes such as Excel file introduction method described in any one of claim 1 to 5.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
It executes instruction, when processor executes the computer executed instructions, realizes such as Excel described in any one of claim 1 to 5
File introduction method.
11. a kind of Excel file equipment leading out characterized by comprising at least one processor and memory;
The memory stores computer executed instructions;
At least one described processor executes the computer executed instructions of the memory storage, so that at least one described processing
Device executes Excel file deriving method as claimed in claim 6.
12. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
It executes instruction, when processor executes the computer executed instructions, realizes Excel file export as claimed in claim 6
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910431456.6A CN110147402A (en) | 2019-05-22 | 2019-05-22 | Excel file introduction method and equipment, deriving method and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910431456.6A CN110147402A (en) | 2019-05-22 | 2019-05-22 | Excel file introduction method and equipment, deriving method and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110147402A true CN110147402A (en) | 2019-08-20 |
Family
ID=67592877
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910431456.6A Pending CN110147402A (en) | 2019-05-22 | 2019-05-22 | Excel file introduction method and equipment, deriving method and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110147402A (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110941658A (en) * | 2019-11-15 | 2020-03-31 | 泰康保险集团股份有限公司 | Data export method, device, server and storage medium |
CN111125220A (en) * | 2019-12-18 | 2020-05-08 | 任子行网络技术股份有限公司 | Information user-defined export method and device |
CN111339137A (en) * | 2020-02-19 | 2020-06-26 | 北京奇艺世纪科技有限公司 | Data verification method and device |
CN111581210A (en) * | 2020-04-30 | 2020-08-25 | 深圳壹账通智能科技有限公司 | Data importing method and system |
CN111625586A (en) * | 2020-05-27 | 2020-09-04 | 北京思特奇信息技术股份有限公司 | Method and system for importing general service data |
CN111666745A (en) * | 2020-06-03 | 2020-09-15 | 中国建设银行股份有限公司 | File downloading method, device, server and medium |
CN111858727A (en) * | 2020-06-24 | 2020-10-30 | 金财互联数据服务有限公司 | Multi-data-source data export system and method based on template configuration |
CN113239106A (en) * | 2021-06-04 | 2021-08-10 | 平安科技(深圳)有限公司 | Excel file export method and device, electronic equipment and storage medium |
WO2021184574A1 (en) * | 2020-03-20 | 2021-09-23 | 平安国际智慧城市科技股份有限公司 | Document data importing method and apparatus, document data exporting method and apparatus, and storage medium |
CN113836213A (en) * | 2021-09-29 | 2021-12-24 | 中国平安财产保险股份有限公司 | Excel-based data import method, device, equipment and storage medium |
CN114416832A (en) * | 2022-01-26 | 2022-04-29 | 重庆允丰科技有限公司 | Method for configuring formula field and report and computer storage medium |
CN115047836A (en) * | 2022-06-27 | 2022-09-13 | 中国核动力研究设计院 | Test case generation and loading method and system based on DCS system periodic test |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107395784A (en) * | 2017-08-02 | 2017-11-24 | 郑州云海信息技术有限公司 | The method and apparatus that a kind of batch imports Internet protocol IP pond |
CN107943462A (en) * | 2017-12-15 | 2018-04-20 | 政采云有限公司 | For the processing method and high in the clouds data interactive method of the excel data in java |
CN108345682A (en) * | 2018-03-02 | 2018-07-31 | 弘成科技发展有限公司 | Platform and method are imported and exported based on what multi-tenant can configure |
CN108874866A (en) * | 2018-04-22 | 2018-11-23 | 平安科技(深圳)有限公司 | Data import management method, apparatus, mobile terminal and storage medium |
-
2019
- 2019-05-22 CN CN201910431456.6A patent/CN110147402A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107395784A (en) * | 2017-08-02 | 2017-11-24 | 郑州云海信息技术有限公司 | The method and apparatus that a kind of batch imports Internet protocol IP pond |
CN107943462A (en) * | 2017-12-15 | 2018-04-20 | 政采云有限公司 | For the processing method and high in the clouds data interactive method of the excel data in java |
CN108345682A (en) * | 2018-03-02 | 2018-07-31 | 弘成科技发展有限公司 | Platform and method are imported and exported based on what multi-tenant can configure |
CN108874866A (en) * | 2018-04-22 | 2018-11-23 | 平安科技(深圳)有限公司 | Data import management method, apparatus, mobile terminal and storage medium |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110941658A (en) * | 2019-11-15 | 2020-03-31 | 泰康保险集团股份有限公司 | Data export method, device, server and storage medium |
CN111125220A (en) * | 2019-12-18 | 2020-05-08 | 任子行网络技术股份有限公司 | Information user-defined export method and device |
CN111125220B (en) * | 2019-12-18 | 2023-04-11 | 任子行网络技术股份有限公司 | Information custom export method and device |
CN111339137A (en) * | 2020-02-19 | 2020-06-26 | 北京奇艺世纪科技有限公司 | Data verification method and device |
WO2021184574A1 (en) * | 2020-03-20 | 2021-09-23 | 平安国际智慧城市科技股份有限公司 | Document data importing method and apparatus, document data exporting method and apparatus, and storage medium |
CN111581210A (en) * | 2020-04-30 | 2020-08-25 | 深圳壹账通智能科技有限公司 | Data importing method and system |
CN111625586A (en) * | 2020-05-27 | 2020-09-04 | 北京思特奇信息技术股份有限公司 | Method and system for importing general service data |
CN111666745A (en) * | 2020-06-03 | 2020-09-15 | 中国建设银行股份有限公司 | File downloading method, device, server and medium |
CN111858727A (en) * | 2020-06-24 | 2020-10-30 | 金财互联数据服务有限公司 | Multi-data-source data export system and method based on template configuration |
CN111858727B (en) * | 2020-06-24 | 2024-02-02 | 金财互联数据服务有限公司 | Multi-data source data export system and method based on template configuration |
CN113239106A (en) * | 2021-06-04 | 2021-08-10 | 平安科技(深圳)有限公司 | Excel file export method and device, electronic equipment and storage medium |
CN113239106B (en) * | 2021-06-04 | 2023-12-19 | 平安科技(深圳)有限公司 | Excel file export method and device, electronic equipment and storage medium |
CN113836213A (en) * | 2021-09-29 | 2021-12-24 | 中国平安财产保险股份有限公司 | Excel-based data import method, device, equipment and storage medium |
CN113836213B (en) * | 2021-09-29 | 2024-02-09 | 中国平安财产保险股份有限公司 | Excel-based data importing method, device, equipment and storage medium |
CN114416832A (en) * | 2022-01-26 | 2022-04-29 | 重庆允丰科技有限公司 | Method for configuring formula field and report and computer storage medium |
CN114416832B (en) * | 2022-01-26 | 2022-11-15 | 重庆允丰科技有限公司 | Method for configuring formula field and report and computer storage medium |
CN115047836A (en) * | 2022-06-27 | 2022-09-13 | 中国核动力研究设计院 | Test case generation and loading method and system based on DCS system periodic test |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110147402A (en) | Excel file introduction method and equipment, deriving method and equipment | |
CN109976761B (en) | Software development kit generation method and device and terminal equipment | |
KR102211374B1 (en) | Method and device for outputting risk information and constructing risk information | |
CN109325729A (en) | A kind of method and server generating electronic contract | |
CN112650533B (en) | Interface document generation method and device and terminal equipment | |
CN110673839B (en) | Distributed tool configuration construction generation method and system | |
CN111581210A (en) | Data importing method and system | |
WO2020259035A1 (en) | Service code generating and executing methods and devices | |
CN110457628A (en) | Webpage edition correcting method, device, equipment and storage medium | |
CN110263316A (en) | A kind of document handling method, device and computer equipment | |
CN107995153A (en) | Form data verification method and form data verification device | |
CN109460546A (en) | List generation method, device and electronic equipment | |
CN109361628A (en) | Message assemble method, device, computer equipment and storage medium | |
CN113672520A (en) | Test case generation method and device, electronic equipment and storage medium | |
CN107357588B (en) | Object code generation method and device | |
CN106250755A (en) | For generating the method and device of identifying code | |
CN114329112A (en) | Content auditing method and device, electronic equipment and storage medium | |
CN109669678A (en) | Template engine integration method, device, electronic equipment and storage medium | |
CN111984674A (en) | Method and system for generating structured query language | |
CN116301799A (en) | Code generation method, device, computer equipment, storage medium and product | |
CN108241705A (en) | A kind of data insertion method and device | |
CN113360300B (en) | Interface call link generation method, device, equipment and readable storage medium | |
CN109254774A (en) | The management method and device of code in software development system | |
CA3138761A1 (en) | Method, device, computer equipment and storage medium for verifying inter-system data admission | |
CN110610343A (en) | Business process generation method and device and storage medium |
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 |
Application publication date: 20190820 |
|
RJ01 | Rejection of invention patent application after publication |