CN109783558A - Introduction method, device, computer equipment and the storage medium of Excel data - Google Patents

Introduction method, device, computer equipment and the storage medium of Excel data Download PDF

Info

Publication number
CN109783558A
CN109783558A CN201811621421.0A CN201811621421A CN109783558A CN 109783558 A CN109783558 A CN 109783558A CN 201811621421 A CN201811621421 A CN 201811621421A CN 109783558 A CN109783558 A CN 109783558A
Authority
CN
China
Prior art keywords
imported
excel file
version
excel
business object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811621421.0A
Other languages
Chinese (zh)
Inventor
车光爱
翁浦益
初旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yi - Lizi Network Technology (china) Co Ltd
Original Assignee
Yi - Lizi Network Technology (china) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yi - Lizi Network Technology (china) Co Ltd filed Critical Yi - Lizi Network Technology (china) Co Ltd
Priority to CN201811621421.0A priority Critical patent/CN109783558A/en
Publication of CN109783558A publication Critical patent/CN109783558A/en
Priority to PCT/CN2019/123875 priority patent/WO2020134989A1/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

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

This application involves introduction method, device, computer equipment and the storage mediums of a kind of Excel data, and wherein method includes: to identify the version of Excel file to be imported;Corresponding processing mode is determined according to the version of Excel file to be imported;Excel file to be imported is converted into corresponding business object according to determining processing mode;Business object after conversion is imported.The version that the embodiment of the present application passes through identification Excel file to be imported, corresponding processing mode is determined according to the version of Excel file to be imported, to which Excel file to be imported is converted to corresponding business object according to determining processing mode, it is imported with the business object after converting, to realize when being shifted to data under line on line, Excel file under line is automatically imported inline system, it improves data and imports efficiency, and the mistake generated when avoiding manual entry data, improve the accuracy of data importing.

Description

Introduction method, device, computer equipment and the storage medium of Excel data
Technical field
This application involves field of computer technology, introduction method, device, calculating more particularly to a kind of Excel data Machine equipment and storage medium.
Background technique
With the development of internet technology, the application of all kinds of management systems is also more and more extensive.Each enterprise manages in application When reason system, the problem of management system shifts on line by data under line is all suffered from.Data are generally remembered by Excel under line at present Record, but since Excel file directly cannot be operated directly by other management systems, it can not be by the data in Excel file It is importing directly into management system.
Data under line are shifted on line generally by way of manually typing at present, but due to manually recording Enter that efficiency is lower, to seriously affect the normal use of management system.
Summary of the invention
Based on this, it is necessary to when data are shifted on line under above-mentioned line aiming at the problem that manual entry low efficiency, provide one Kind can be automatically by introduction method, device, computer equipment and the storage medium of the Excel data under line on data lead-in wire.
To achieve the goals above, on the one hand, the embodiment of the present application provides a kind of introduction method of Excel data, institute The method of stating includes:
Identify the version of Excel file to be imported;
Corresponding processing mode is determined according to the version of Excel file to be imported;
Excel file to be imported is converted into corresponding business object according to determining processing mode;
Business object after conversion is imported.
Before the business object after conversion is imported in one of the embodiments, the method also includes: it obtains wait lead Enter the configuration information of Excel file;The business object after conversion is verified according to configuration information;When verification passes through, then will Business object after conversion imports.
In one of the embodiments, further include: do not pass through when verifying, then return to warning note.
The version of Excel file to be imported is identified in one of the embodiments, comprising: reads Excel text to be imported Part;Excel file to be imported is converted into flow object;Excel text to be imported is determined according to the start byte recorded in flow object The version of part, wherein the version of Excel file to be imported includes first version or the second edition.
Corresponding processing mode is determined according to the version of Excel file to be imported in one of the embodiments, comprising: When the version for determining Excel file to be imported is first version, then Excel file to be imported is converted to pair using POI component The business object answered;When the version for determining Excel file to be imported is the second edition, then the mode that use is parsed based on event will Excel file to be imported is converted to corresponding business object.
Excel file to be imported is converted to by corresponding business object using POI component in one of the embodiments, It include: that the Excel file to be imported for having been converted into flow object is converted to by workbook object using POI component;According to default Mapping relations workbook object is converted into corresponding business object.
It uses and is converted to the Excel file to be imported in one of the embodiments, based on the mode that event parses Corresponding business object, comprising: the Excel file to be imported for having been converted into flow object is read using the mode parsed based on event In each cell content;The content of each cell is encapsulated as corresponding business object according to preset mapping relations.
On the other hand, the embodiment of the present application also provides a kind of gatherers of Excel data, comprising:
Identification module, for identification version of Excel file to be imported;
Processing mode determining module, for determining corresponding processing mode according to the version of Excel file to be imported;
Conversion module, for Excel file to be imported to be converted to corresponding business object according to determining processing mode;
Import modul is imported for the business object after converting.
Another aspect, it is described to deposit the embodiment of the present application also provides a kind of computer equipment, including memory and processor The step of reservoir is stored with computer program, and the processor realizes method as described above when executing the computer program.
In another aspect, being stored thereon with computer the embodiment of the present application also provides a kind of computer readable storage medium The step of program, the computer program realizes method as described above when being executed by processor.
Introduction method, device, computer equipment and the storage medium of above-mentioned Excel data, by identifying Excel to be imported The version of file determines corresponding processing mode according to the version of Excel file to be imported, thus according to determining processing mode Excel file to be imported is converted into corresponding business object, the business object after converting imports, to realize right When data are shifted on line under line, Excel file under line is automatically imported inline system, data is improved and imports efficiency, and keep away Exempt from the mistake generated when manual entry data, improves the accuracy of data importing.
Detailed description of the invention
Fig. 1 is the flow diagram of the introduction method of Excel data in one embodiment;
Fig. 2 is the flow diagram that the version step of Excel file to be imported is identified in one embodiment;
Fig. 3 is that process the step of processing according to the version of Excel file to be imported it in one embodiment is shown It is intended to;
Fig. 4 is the exemplary diagram of business object in one embodiment;
Fig. 5 is the exemplary diagram of Excel file to be imported in one embodiment;
Fig. 6 is the Mapping Examples figure of business object in one embodiment;
Fig. 7 is process the step of processing according to the version of Excel file to be imported it in another embodiment Schematic diagram;
Fig. 8 is the flow diagram of the introduction method of Excel data in another embodiment;
Fig. 9 is the structural block diagram of the gatherer of Excel data in one embodiment;
Figure 10 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
The embodiment of the present application provides a kind of introduction method of Excel data, as shown in Figure 1, this method may include with Lower step:
Step 102, the version of Excel file to be imported is identified.
It should be noted that since Excel file is presently, there are two kinds of version, and the corresponding tray of two kinds of version Formula is different.For example, before Office2007 (not including Office2007), Excel file is to deposit in a binary format Data are stored up, it is usually " xls " that file, which expands name,.And since Office2007 (including Office2007), Excel file is With text formatting storing data, it is usually " xlsx " that file, which expands name,.And for the Excel file of different-format, to it It is needed when being handled using different methods, therefore, in the present embodiment, when Excel file to be imported, it is necessary first to right The version of Excel file to be imported is identified, so that it is determined that the specific release type of Excel file to be imported.
Step 104, corresponding processing mode is determined according to the version of Excel file to be imported.
Due to the Excel file of different-format, needed when handling it using different methods, it therefore, can be with According to the difference of Excel file version, corresponding processing mode is preset, it is to be imported when identifying through the above steps After the version of Excel file, corresponding processing mode can be determined according to the version of Excel file to be imported.
Step 106, Excel file to be imported is converted to by corresponding business object according to determining processing mode.
As stated in the background art, since Excel file cannot directly be operated by other management systems, determine to It, then can be according to corresponding processing mode to Excel to be imported after importing the version and corresponding processing mode of Excel file File is handled, and Excel file to be imported is converted to the corresponding business object that system can be operated directly.Wherein, Business object is the list with Excel file to be imported with certain mapping relations and with specific format and content, and system can Directly to be operated to the list.
Step 108, the business object after conversion is imported.
After completing above-mentioned processing, the business object after conversion can be imported the system needed, to realize Excel number According to be automatically imported.
The introduction method of above-mentioned Excel data, by identifying the version of Excel file to be imported, according to Excel to be imported The version of file determines corresponding processing mode, to be converted to Excel file to be imported pair according to determining processing mode The business object answered, the business object after converting imports, to realize when shifting to data under line on line, by line Lower Excel file is automatically imported inline system, the mistake generated when improving data and import efficiency, and avoiding manual entry data Accidentally, the accuracy of data importing is improved.
In one embodiment, as shown in Fig. 2, identifying the version of Excel file to be imported, it can specifically include following step It is rapid:
Step 202, Excel file to be imported is read.
Step 204, Excel file to be imported is converted into flow object.
Step 206, the version of Excel file to be imported is determined according to the start byte recorded in flow object.
Specifically, since file is stored in the form of byte in a computer, and it is right in the present embodiment The importing of Excel data is also to be completed by computer.It therefore, will be wait lead when computer reads Excel file to be imported Enter Excel file and be converted to flow object, wherein flow object can be java object.Again since Excel file is stored in computer When middle, the content (i.e. magic number) of several bytes of starting be it is fixed, usually can be true by originating the content of several bytes Determine file type, therefore, computer according to the start byte recorded in flow object and parses it, that is, can determine to be imported The version of Excel file.
Wherein, the version of Excel file to be imported includes first version or the second edition.In the present embodiment, the first edition The version of (not including Office2007), can be referred to as lowest version, the second edition before this specifically can be Office2007 It specifically can be the version since Office2007 (including Office2007), highest version can be referred to as.Specifically, calculating Machine determines that corresponding Excel file type belongs to " xls " or " xlsx " by the start byte recorded in flow object, from And corresponding relationship determines the version of Excel file to be imported with version according to file type.The present embodiment by knowing automatically The version of Excel file not to be imported, so that the compatibility for being automatically imported Excel file is greatly improved, regardless of to be imported Excel file is which kind of version can be achieved to be automatically imported, and handles Excel without developer and imports details, greatly mentions High user experience, and realize higher the degree of automation.
Different editions and its corresponding place for Excel file to be imported are further illustrated below by way of specific embodiment The difference of reason mode, specifically, in one embodiment, being carried out so that the version of Excel file to be imported is first version as an example Illustrate, as shown in figure 3, may include steps of:
Step 302, it when the version for determining Excel file to be imported is first version, will be had been converted into using POI component The Excel file to be imported of flow object is converted to workbook object.
Wherein, POI component, which refers to, is supplied to the function that java applet is read and write to Microsoft Office format archives API (Application Programming Interface, application programming interface).Workbook is then book The advanced form of expression, be higher level's object of sheet, for example, an excel file can be considered one work Book is can wrap containing multiple worksheets (i.e. sheet) again in one book.
Specifically, when the version for determining Excel file to be imported through the above steps is first version (i.e. lowest version), Since the Excel file of lowest version is to be stored in binary form, it can be read and be had been converted by POI component The Excel file to be imported of flow object is converted into being operated on it by software (such as java applet) Workbook object.
Step 304, workbook object is converted into corresponding business object according to preset mapping relations.
In the present embodiment, pre- point to Excel file to be imported of the demand according to user to business object and early period Analysis, can pre-establish the mapping relations between Excel file and business object to be imported.Specifically, can pre-define to Import the mapping relations between the attribute value recorded in the every row or each column and business object that correspond to sheet in Excel file.It lifts For example, it is assumed that business object is sales slip, wherein the attribute value recorded includes content as shown in Figure 4, and Excel to be imported Therefore file is as shown in figure 5, can pre-establish " serial number " and business object that first row records in Excel file to be imported In " O/No. " mapping relations, " purchase in " customer name " and business object of secondary series record in Excel file to be imported The mapping relations of manifest position ", " purchase name in " name of product " of third column record and business object in Excel file to be imported Claim " mapping relations ..., in Excel file to be imported in " total price " and business object of last column record " consumption sum " Mapping relations.To which according to the mapping relations of foundation, by data specific in Excel file to be imported, (such as customer name is A Sales slip) write-in business object in, as shown in Figure 6.It, can be real in systems so as to after completing to the importing of business object Now directly to the operation of business object, such as by a certain screening conditions summarized, inquired, analyzed, exported or printed, thus pole The big operation for facilitating user.
In one embodiment, it is illustrated so that the version of Excel file to be imported is the second edition as an example, such as Fig. 7 institute Show, may include steps of:
Step 702, when the version for determining Excel file to be imported is the second edition, using the mould parsed based on event Formula reads the content of each cell in the Excel file to be imported for having been converted into flow object.
Step 704, the content of each cell is encapsulated as corresponding business object according to preset mapping relations.
Specifically, when the version for determining Excel file to be imported through the above steps is the second edition (i.e. highest version), Since the Excel file of highest version is to be stored in the form of text, if being converted at this time using POI component, can occupy A large amount of memories of computer, or even the risk for causing computer to be paralysed.Therefore, in the present embodiment, for the Excel of highest version File then reads the Excel file to be imported for having been converted into flow object by the mode that parses based on event, i.e., read one by one to The content of each cell in Excel file is imported, and then is encapsulated the content of each cell according to preset mapping relations For corresponding business object.It is to cell each in Excel file by the mode in this present embodiment based on event parsing Content read and encapsulate one by one, and the form of entire file is read different from POI component, therefore, in treatment process occupancy Deposit less, treatment effeciency is higher.By similar in the foundation of specific mapping relations in this present embodiment and above-described embodiment, thus It is not reinflated herein to repeat.
In one embodiment, which kind of either above-mentioned processing mode, is able to achieve and records in Excel file to be imported Numerous types of data handled, such as text data, numerical data, date data, formula data or image data, and prop up Hold the importing of multiple worksheets.Therefore, the method scope of application of the present embodiment is wider, can satisfy the primary demand of client, and Intelligence degree is higher.
In one embodiment, as shown in figure 8, this method can also include before the business object after conversion is imported Following steps:
Step 802, the configuration information of Excel file to be imported is obtained.
Step 804, the business object after conversion is verified according to configuration information, if upchecking, is thened follow the steps 806, it is no to then follow the steps 808.
Step 806, the business object after conversion is imported.
Step 808, warning note is returned.
Wherein, the configuration information of Excel file to be imported, which specifically can be, is establishing Excel file to be imported and business pair The configuration information being arranged when mapping relations as between, such as specific requirement to the attribute value in the business object after mapping, example Such as, to the regulation of the data format after mapping, regulation of data area etc..For example, it is illustrated by taking Fig. 4, Fig. 5 as an example, Assuming that " unit price " that records in Excel file to be imported, specifically showing format is " currency ", as customer name is B in Fig. 5 The specific unit price of a certain product recorded in document is " $123.00 ", if defining it when establishing mapping relations is mapped to industry The mode of Ying Caiyong " Chinese amount in Chinese character " in business object, then the form of expression of " kinds of goods unit price " corresponding after its mapping should be " 123 circle ".
Therefore, after above-mentioned conversion, i.e., after Excel file to be imported being converted to corresponding business object, may be used also To be tested according to pre-set configuration information to the business object after conversion, the business object only after conversion meets When related request in configuration information, just the business object after conversion is imported.Otherwise without import operation, and alarm is returned Prompt.Wherein, specific prompt information can be showed in warning note, as prompt be specifically business object in which attribute value not The business for meeting the requirements, so that relevant operation personnel can find the problem in time, it being repaired, and then ensure to import The accuracy of data in object.
It should be noted that the above method provided in this embodiment can be applied to various need to Excel file progress It imports or the scene of parsing, can be encapsulated as corresponding software interface, modify mapping relations according to specific requirements when use And the interface can be called directly after configuration information, to improve development efficiency, reduce development cost.
It should be understood that although each step in the flow chart of Fig. 1-8 is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 1-8 Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately It executes.
In one embodiment, as shown in figure 9, providing a kind of gatherer of Excel data, comprising: identification module 901, processing mode determining module 902, conversion module 903 and import modul 904, in which:
Identification module 901, for identification version of Excel file to be imported;
Processing mode determining module 902, for determining corresponding processing mode according to the version of Excel file to be imported;
Conversion module 903, for Excel file to be imported to be converted to corresponding business pair according to determining processing mode As;
Import modul 904 is imported for the business object after converting.
It in one embodiment, further include correction verification module: for obtaining the configuration information of Excel file to be imported;According to Configuration information verifies the business object after conversion;When verification passes through, then by the business object importing after conversion.
In one embodiment, correction verification module is also used to: not being passed through when verifying, is then returned to warning note.
In one embodiment, the version of Excel file to be imported is identified, comprising: read Excel file to be imported;It will Excel file to be imported is converted to flow object;The version of Excel file to be imported is determined according to the start byte recorded in flow object This, wherein the version of Excel file to be imported includes first version or the second edition.
In one embodiment, corresponding processing mode is determined according to the version of Excel file to be imported, comprising: when true The version of fixed Excel file to be imported is first version, then is converted to Excel file to be imported using POI component corresponding Business object;When the version for determining Excel file to be imported is the second edition, then the mode that use is parsed based on event will be wait lead Enter Excel file and is converted to corresponding business object.
In one embodiment, Excel file to be imported is converted to by corresponding business object using POI component, comprising: The Excel file to be imported for having been converted into flow object is converted to by workbook object using POI component;According to preset mapping Workbook object is converted to corresponding business object by relationship.
In one embodiment, the Excel file to be imported is converted to by correspondence using the mode parsed based on event Business object, comprising: read using mode parse based on event in the Excel file to be imported for having been converted into flow object often The content of a cell;The content of each cell is encapsulated as corresponding business object according to preset mapping relations.
The specific of gatherer about Excel data limits the importing side that may refer to above for Excel data The restriction of method, details are not described herein.Modules in the gatherer of above-mentioned Excel data can be fully or partially through soft Part, hardware and combinations thereof are realized.Above-mentioned each module can be embedded in the form of hardware or independently of the processing in computer equipment It in device, can also be stored in a software form in the memory in computer equipment, in order to which processor calls execution above each The corresponding operation of a module.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure Figure can be as shown in Figure 10.The computer equipment includes the processor connected by system bus, memory, network interface, shows Display screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment Memory includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer Program.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The meter The network interface for calculating machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor To realize a kind of introduction method of Excel data.The display screen of the computer equipment can be liquid crystal display or electronic ink Water display screen, the input unit of the computer equipment can be the touch layer covered on display screen, be also possible to computer equipment Key, trace ball or the Trackpad being arranged on shell can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Figure 10, only part relevant to application scheme The block diagram of structure, does not constitute the restriction for the computer equipment being applied thereon to application scheme, and specific computer is set Standby may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory Computer program, the processor perform the steps of when executing computer program
Identify the version of Excel file to be imported;
Corresponding processing mode is determined according to the version of Excel file to be imported;
Excel file to be imported is converted into corresponding business object according to determining processing mode;
Business object after conversion is imported.
In one embodiment, before the business object after conversion being imported, the method also includes: it obtains to be imported The configuration information of Excel file;The business object after conversion is verified according to configuration information;When verification passes through, then will turn Business object after changing imports.
In one embodiment, further includes: do not pass through when verifying, then return to warning note.
In one embodiment, the version of Excel file to be imported is identified, comprising: read Excel file to be imported;It will Excel file to be imported is converted to flow object;The version of Excel file to be imported is determined according to the start byte recorded in flow object This, wherein the version of Excel file to be imported includes first version or the second edition.
In one embodiment, corresponding processing mode is determined according to the version of Excel file to be imported, comprising: when true The version of fixed Excel file to be imported is first version, then is converted to Excel file to be imported using POI component corresponding Business object;When the version for determining Excel file to be imported is the second edition, then the mode that use is parsed based on event will be wait lead Enter Excel file and is converted to corresponding business object.
In one embodiment, Excel file to be imported is converted to by corresponding business object using POI component, comprising: The Excel file to be imported for having been converted into flow object is converted to by workbook object using POI component;According to preset mapping Workbook object is converted to corresponding business object by relationship.
In one embodiment, the Excel file to be imported is converted to by correspondence using the mode parsed based on event Business object, comprising: read using mode parse based on event in the Excel file to be imported for having been converted into flow object often The content of a cell;The content of each cell is encapsulated as corresponding business object according to preset mapping relations.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
Identify the version of Excel file to be imported;
Corresponding processing mode is determined according to the version of Excel file to be imported;
Excel file to be imported is converted into corresponding business object according to determining processing mode;
Business object after conversion is imported.
In one embodiment, before the business object after conversion being imported, the method also includes: it obtains to be imported The configuration information of Excel file;The business object after conversion is verified according to configuration information;When verification passes through, then will turn Business object after changing imports.
In one embodiment, further includes: do not pass through when verifying, then return to warning note.
In one embodiment, the version of Excel file to be imported is identified, comprising: read Excel file to be imported;It will Excel file to be imported is converted to flow object;The version of Excel file to be imported is determined according to the start byte recorded in flow object This, wherein the version of Excel file to be imported includes first version or the second edition.
In one embodiment, corresponding processing mode is determined according to the version of Excel file to be imported, comprising: when true The version of fixed Excel file to be imported is first version, then is converted to Excel file to be imported using POI component corresponding Business object;When the version for determining Excel file to be imported is the second edition, then the mode that use is parsed based on event will be wait lead Enter Excel file and is converted to corresponding business object.
In one embodiment, Excel file to be imported is converted to by corresponding business object using POI component, comprising: The Excel file to be imported for having been converted into flow object is converted to by workbook object using POI component;According to preset mapping Workbook object is converted to corresponding business object by relationship.
In one embodiment, the Excel file to be imported is converted to by correspondence using the mode parsed based on event Business object, comprising: read using mode parse based on event in the Excel file to be imported for having been converted into flow object often The content of a cell;The content of each cell is encapsulated as corresponding business object according to preset mapping relations.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of introduction method of Excel data, which is characterized in that the described method includes:
Identify the version of Excel file to be imported;
Corresponding processing mode is determined according to the version of the Excel file to be imported;
The Excel file to be imported is converted into corresponding business object according to determining processing mode;
Business object after conversion is imported.
2. the introduction method of Excel data according to claim 1, which is characterized in that the business pair by after conversion Before importing, the method also includes:
Obtain the configuration information of the Excel file to be imported;
The business object after conversion is verified according to the configuration information;
When verification passes through, then by the business object importing after conversion.
3. the introduction method of Excel data according to claim 2, which is characterized in that the method also includes:
Do not pass through when verifying, then returns to warning note.
4. the introduction method of Excel data according to any one of claims 1 to 3, which is characterized in that described to identify wait lead Enter the version of Excel file, comprising:
Read the Excel file to be imported;
The Excel file to be imported is converted into flow object;
The version of the Excel file to be imported is determined according to the start byte recorded in the flow object, it is described to be imported The version of Excel file includes first version or the second edition.
5. the introduction method of Excel data according to claim 4, which is characterized in that described according to described to be imported The version of Excel file determines corresponding processing mode, comprising:
When the version for determining the Excel file to be imported is first version, then using POI component by the Excel to be imported File is converted to corresponding business object;
When determining the version of the Excel file to be imported as the second edition, then use the mode parsed based on event will be described Excel file to be imported is converted to corresponding business object.
6. the introduction method of Excel data according to claim 5, which is characterized in that described to use POI component described Excel file to be imported is converted to corresponding business object, comprising:
The Excel file to be imported for having been converted into flow object is converted to by workbook object using POI component;
The workbook object is converted into corresponding business object according to preset mapping relations.
7. the introduction method of Excel data according to claim 5, which is characterized in that described to be parsed using based on event Mode the Excel file to be imported is converted into corresponding business object, comprising:
It is read using the mode parsed based on event in the Excel file to be imported for having been converted into flow object in each cell Hold;
The content of each cell is encapsulated as corresponding business object according to preset mapping relations.
8. a kind of gatherer of Excel data, which is characterized in that described device includes:
Identification module, for identification version of Excel file to be imported;
Processing mode determining module, for determining corresponding processing mode according to the version of the Excel file to be imported;
Conversion module, for the Excel file to be imported to be converted to corresponding business object according to determining processing mode;
Import modul is imported for the business object after converting.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of any one of claims 1 to 7 the method is realized when being executed by processor.
CN201811621421.0A 2018-12-28 2018-12-28 Introduction method, device, computer equipment and the storage medium of Excel data Pending CN109783558A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811621421.0A CN109783558A (en) 2018-12-28 2018-12-28 Introduction method, device, computer equipment and the storage medium of Excel data
PCT/CN2019/123875 WO2020134989A1 (en) 2018-12-28 2019-12-09 Excel data import method and apparatus, and computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811621421.0A CN109783558A (en) 2018-12-28 2018-12-28 Introduction method, device, computer equipment and the storage medium of Excel data

Publications (1)

Publication Number Publication Date
CN109783558A true CN109783558A (en) 2019-05-21

Family

ID=66498698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811621421.0A Pending CN109783558A (en) 2018-12-28 2018-12-28 Introduction method, device, computer equipment and the storage medium of Excel data

Country Status (2)

Country Link
CN (1) CN109783558A (en)
WO (1) WO2020134989A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111240688A (en) * 2020-01-10 2020-06-05 深圳前海环融联易信息科技服务有限公司 excel file analysis method and device, computer equipment and storage medium
WO2020134989A1 (en) * 2018-12-28 2020-07-02 益萃网络科技(中国)有限公司 Excel data import method and apparatus, and computer device and storage medium
CN111898351A (en) * 2020-08-03 2020-11-06 上海嗨酷强供应链信息技术有限公司 Automatic Excel data importing method and device based on Aviator, terminal equipment and storage medium
CN112256778A (en) * 2020-10-20 2021-01-22 大唐融合通信股份有限公司 Data import method, device and equipment
CN112801319A (en) * 2021-02-01 2021-05-14 神州数码融信云技术服务有限公司 Operation and maintenance workflow propelling method
WO2021184574A1 (en) * 2020-03-20 2021-09-23 平安国际智慧城市科技股份有限公司 Document data importing method and apparatus, document data exporting method and apparatus, and storage medium
CN113448960A (en) * 2020-03-27 2021-09-28 北京沃东天骏信息技术有限公司 Method and device for importing form file
CN116757170A (en) * 2023-08-21 2023-09-15 成都数联云算科技有限公司 Excel table importing method and system based on JAVA language

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120303642A1 (en) * 2011-05-23 2012-11-29 Gbs Corp. Automated file-conversion system and process for a media-generation system
CN106933835A (en) * 2015-12-29 2017-07-07 航天信息软件技术有限公司 The data lead-in method and system of a kind of compatibility parsing Excel file
CN107368593A (en) * 2017-07-25 2017-11-21 万帮充电设备有限公司 Data lead-in method, device and server
CN108763185A (en) * 2018-05-31 2018-11-06 苏州市计量测试院 The method of calibration and system of Excel file
CN108763275A (en) * 2018-04-09 2018-11-06 中国电力科学研究院有限公司 A kind of method and system that Excel data sources are dumped to big data platform

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050251812A1 (en) * 2004-04-27 2005-11-10 Convertabase, Inc. Data conversion system, method, and apparatus
CN109783558A (en) * 2018-12-28 2019-05-21 益萃网络科技(中国)有限公司 Introduction method, device, computer equipment and the storage medium of Excel data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120303642A1 (en) * 2011-05-23 2012-11-29 Gbs Corp. Automated file-conversion system and process for a media-generation system
CN106933835A (en) * 2015-12-29 2017-07-07 航天信息软件技术有限公司 The data lead-in method and system of a kind of compatibility parsing Excel file
CN107368593A (en) * 2017-07-25 2017-11-21 万帮充电设备有限公司 Data lead-in method, device and server
CN108763275A (en) * 2018-04-09 2018-11-06 中国电力科学研究院有限公司 A kind of method and system that Excel data sources are dumped to big data platform
CN108763185A (en) * 2018-05-31 2018-11-06 苏州市计量测试院 The method of calibration and system of Excel file

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YCB1689: "Java通过魔数判断上传文件的类型", 《HTTPS://BLOG.CSDN.NET/YCB1689/ARTICLE/DETAILS/79712623》 *
小码锋: "POI操作Excel文件,通过文件流判断Excel的版本", 《HTTPS://BLOG.CSDN.NET/ZHANGFENG2124/ARTICLE/DETAILS/72846344》 *
林雪南: "基于Apache POI解析Excel文件及内存使用分析", 《电脑编辑技巧与维护》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020134989A1 (en) * 2018-12-28 2020-07-02 益萃网络科技(中国)有限公司 Excel data import method and apparatus, and computer device and storage medium
CN111240688A (en) * 2020-01-10 2020-06-05 深圳前海环融联易信息科技服务有限公司 excel file analysis method and device, computer equipment and storage medium
CN111240688B (en) * 2020-01-10 2023-08-18 深圳前海环融联易信息科技服务有限公司 excel file analysis method and device, computer 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
CN113448960A (en) * 2020-03-27 2021-09-28 北京沃东天骏信息技术有限公司 Method and device for importing form file
CN111898351A (en) * 2020-08-03 2020-11-06 上海嗨酷强供应链信息技术有限公司 Automatic Excel data importing method and device based on Aviator, terminal equipment and storage medium
CN111898351B (en) * 2020-08-03 2021-06-22 汇链通供应链科技(上海)有限公司 Automatic Excel data importing method and device based on Aviator, terminal equipment and storage medium
CN112256778A (en) * 2020-10-20 2021-01-22 大唐融合通信股份有限公司 Data import method, device and equipment
CN112801319A (en) * 2021-02-01 2021-05-14 神州数码融信云技术服务有限公司 Operation and maintenance workflow propelling method
CN116757170A (en) * 2023-08-21 2023-09-15 成都数联云算科技有限公司 Excel table importing method and system based on JAVA language
CN116757170B (en) * 2023-08-21 2023-10-20 成都数联云算科技有限公司 Excel table importing method and system based on JAVA language

Also Published As

Publication number Publication date
WO2020134989A1 (en) 2020-07-02

Similar Documents

Publication Publication Date Title
CN109783558A (en) Introduction method, device, computer equipment and the storage medium of Excel data
CN109445842A (en) Rule generating method, device, computer equipment and storage medium
CN109033150A (en) Sensitive word verification method, device, computer equipment and storage medium
CN110990411B (en) Data structure generation method and device, and calling method and device
CN113076731A (en) Report file generation method and device, computer equipment and storage medium
CN109543073A (en) Enterprise's supply and marketing relation map generation method, device and computer equipment
CN106445815A (en) Automated testing method and device
CN110309099A (en) Interface managerial method, device, equipment and computer readable storage medium
CN105740219A (en) Report self-defining method and device
CN108418797A (en) Web access method, device, computer equipment and storage medium
CN110147354B (en) Batch data editing method, device, computer equipment and storage medium
CN107832227A (en) Interface parameters method of testing, device, equipment and the storage medium of operation system
CN110908657A (en) Product generation method and device
CN109558315A (en) The determination method, device and equipment of test scope
CN108241607A (en) Automatically imported method, server and the storage medium of test of heuristics case
CN113158988A (en) Financial statement processing method and device and computer readable storage medium
CN109446055A (en) Print routine test method, device, computer equipment and storage medium
CN115203300A (en) Data verification method and device
CN111680066B (en) Information processing method, information processing device, storage medium and electronic equipment
CN111124932A (en) Scheme verification method, system, device, computer equipment and storage medium
KR101737575B1 (en) Method and device for verifying data based on sql sentences generated automatically
CN111506299B (en) Front-end data verification method and device and computer equipment
CN109857302B (en) Electronic book information repairing method, electronic equipment and computer storage medium
CN117132283A (en) Identification method, apparatus, computer device, storage medium, and program product
CN115660875A (en) Account data processing method and device, computer equipment 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: 20190521

RJ01 Rejection of invention patent application after publication