CN106227710A - A kind of data file transition collocation method based on EXCEL - Google Patents

A kind of data file transition collocation method based on EXCEL Download PDF

Info

Publication number
CN106227710A
CN106227710A CN201610596340.4A CN201610596340A CN106227710A CN 106227710 A CN106227710 A CN 106227710A CN 201610596340 A CN201610596340 A CN 201610596340A CN 106227710 A CN106227710 A CN 106227710A
Authority
CN
China
Prior art keywords
data
file
type
destination
original document
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
CN201610596340.4A
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.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software 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 Inspur General Software Co Ltd filed Critical Inspur General Software Co Ltd
Priority to CN201610596340.4A priority Critical patent/CN106227710A/en
Publication of CN106227710A publication Critical patent/CN106227710A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation

Abstract

The invention discloses a kind of data file transition collocation method based on EXCEL, it implements process and is: the first data type of configuration conversion data and data precision in allocation list;Define former data file, target data file and data conversion rule thereof;Read former data file according to rule configuration item and generate target data file;Data file after conversion is imported goal systems.Compared with prior art, when solving the transmission of multiple system data file, goal systems can not process the problem to the data file that method, system provides, have good application value a kind of based on EXCEL data file transition collocation method of the present invention.

Description

A kind of data file transition collocation method based on EXCEL
Technical field
The present invention relates to microcomputer data processing field, a kind of data file based on EXCEL turns Change collocation method.
Background technology
EXCEL data file is because form is simple, content directly perceived, and the data being widely used between different information systems exchange In, therefore in development of information system with enforcement, the conversion of EXCEL file data is a demand that is basic and that be frequently encountered by.Institute With in development of information system and enforcement, a kind of method based on the conversion of EXCEL data is indispensable.Based on this, now carry For a kind of data file transition collocation method based on EXCEL, the EXCEL data item solving to provide between information system is different, System cannot directly read the problem that goal systems carries out storing.
Summary of the invention
The technical assignment of the present invention is for above weak point, it is provided that a kind of data file transition based on EXCEL is joined Put method.
A kind of data file transition collocation method based on EXCEL, it implements process and is:
First in allocation list, data type and the data precision of data is changed in configuration;
Define former data file, target data file and data conversion rule thereof;
Read former data file according to rule configuration item and generate target data file;
Data file after conversion is imported goal systems.
Described data type includes numeric type data, character type data, amount of money type data, number type data.
Described file destination includes data below item: interface type, file type, sequence number, row life, Chinese, number According to type, whether be required item, wherein interface type refers to data file interface type;File type refers to data file class Not;Sequence number refers to generate the serial number of file destination data item, i.e. order in file destination;Row name refers to generate target literary composition Part data item name claims, the unique identifier i.e. arranged;Chinese refers to generate the Chinese row name of file destination data item;Data class Type refers to generate file destination data item type.
Data file transition rule comprises data below item: interface type, file type, original document initiate line number, Original document terminates mark, file destination initiates line number, file destination terminates mark, and wherein interface type refers to that data file connects Mouth type;File type refers to data file classification;Original document initiates line number and refers to read the initial row of original document text Number;Original document terminates to identify the end mark referring to read original document text;File destination initiates line number and refers to generate mesh The initial line number of mark file;File destination terminates to identify the end mark referring to generate file destination.
The process that implements generating target data file is:
1) file destination data item to be changed is defined: include that the interface type of conversion destination file, files classes are wanted in definition Type;Whether definition is wanted the sequence number of conversion destination file each column data item, row life, Chinese, data type, is required item;
2) configuration data file transformational rule: configure original document to be changed according to data interface type, file type Initial row and end mark with origin identification and the end mark of file destination reading and writing of files, i.e. configuration reading original document text Know, write the initial line number of file destination and terminate mark;To be changed original according to data interface type, file type configuration File and the corresponding relation of file destination, i.e. configure the row sequence number of the corresponding file destination of certain row row of original document;
3) carry out data file transition: according to 1), 2) configuration, complete the data conversion of original document and file destination, First generate gauge outfit according to the file destination data item column name of configuration, then according to file destination and the original document file of configuration Data corresponding relation generates file destination data.
Compared to the prior art, have following has a kind of based on EXCEL data file transition collocation method of the present invention Benefit effect:
A kind of based on EXCEL data file transition collocation method of the present invention, solves multiple system data file and passes Time defeated, goal systems can not process the problem to the data file that method, system provides, and has good application value;Pass through The method, traffic operation staff passes through to configure the data conversion that can realize former data file with the data file of goal systems, Reduce traffic operation staff and make goal systems data file by hand, reduce the working time, improve work efficiency, practical, Applied widely.
Detailed description of the invention
Below in conjunction with specific embodiment, the invention will be further described.
The present invention provides a kind of data file transition collocation method based on EXCEL, to solve between multiple information system Data file is automatically converted into the technical problem of the data file that goal systems can read.
Realizing firstly the need of the definition configuration before changing of the method, particularly as follows:
In allocation list, configuration changes data type and the data precision of data, such as numeric type data, character type data, gold Volume type data (precision is 2), number type data (precision is 8) etc..
Configuration its original file type (EXCEL), original document source, original document start of text row (are such as opened from the 3rd row Begin as text), original document end of text mark (such as " terminating " to indicate).
Configuration target file type (EXCEL), file destination start of text row (such as starting as text from the 7th row), mesh Mark document text end mark (such as " terminates " mark).
Configuration to be changed file destination data row data type, file destination data row whether must be defeated, target data The line number of the former data file that row are corresponding and row number.(such as file destination data are listed as " row 1 ", and data type is " character Type ", corresponding former data file the third line first row).
Based on the configuration before above-mentioned conversion, the process that realizes of the method is:
One, file destination data item to be changed first is defined:
Name Code Data Type Primary
Interface type JKLX VARchar2(30) TRUE
File type WJLX VARchar2(30) TRUE
Sequence number XH VARchar2(100) FALSE
Row name LM VARchar2(100) FALSE
Chinese LMCN VARchar2(100) FALSE
Data type DATETYPE VARchar2(20) FALSE
Whether must fill out ISNULL char(1) FALSE
In this form, each data item specific explanations is as follows.
Interface type: data file interface type.Such as Bank of China's interface document, Pudong Development Bank's interface document etc..
File type: data file classification.Such as toll file, payment file etc..
Sequence number: generate the serial number of file destination data item, i.e. order in file destination.
Row name: generate file destination data item title (unique identifiers of row).
Chinese: generate the Chinese row name of file destination data item.
Data type: generate file destination data item type.Such as String, Date, Money etc..
Two, then definition data file transition is regular:
Name Code Data Type Primary
Interface type JKLX VARchar2(30) TRUE
File type WJLX VARchar2(30) TRUE
Original document initiates line number YSQSHH VARchar2(30) FALSE
Original document terminates mark YSJSBZ VARchar2(30) FALSE
File destination initiates line number SCQSHH VARchar2(30) FALSE
File destination terminates mark SCJSBZ VARchar2(30) FALSE
In this form, each data item is explained as follows:
Interface type: data file interface type.Such as Bank of China's interface document, Pudong Development Bank's interface document etc..
File type: data file classification.Such as toll file, payment file etc..
Original document initiates line number: read the initial line number of original document text.
Original document terminates mark: read the end mark of original document text.
File destination initiates line number: generate the initial line number of file destination.
File destination terminates mark: generate the end mark of file destination.
Three, definition data file transition rule is detailed:
In this form, each data item is explained as follows:
Interface type: data file interface type.Such as Bank of China's interface document, Pudong Development Bank's interface document etc..
File type: data file classification.Such as toll file, payment file etc..
Sequence number: the sequence number of target data file definition.
Original line number: the line number of original document.
Original row number: the row number of original document.
Four, file destination data item to be changed is defined.
The interface type of conversion destination file, file type is wanted including definition.
Whether definition is wanted the sequence number of conversion destination file each column data item, row life, Chinese, data type, is to fill out ?.
Five, configuration data file transformational rule.
Initial with file destination reading and writing of files according to data interface type, file type configuration original document to be changed Mark and end mark, i.e. configuration read initial row and end mark, the initial row of write file destination of original document text Number and terminate mark.
The corresponding relation of original document to be changed and file destination is configured, i.e. according to data interface type, file type The row sequence number of the corresponding file destination of certain row row of configuration original document.
Six, data file transition.
According to step 4, the configuration of five, the data conversion of original document and file destination can be completed.First according to the mesh of configuration Mark file data item column name generates gauge outfit, and then file destination and original document file data corresponding relation according to configuration are raw Become file destination data.
Illustrate: assume that original document is as follows with destination file format:
Original document:
File destination:
Configuration file destination data item:
The initial line number of configuration original document and end mark:
According to A) in citing original document and file destination it can be seen that the initial line number of original document text is second Row, terminate be designated " ends ", then need configure original document initial behavior the second row, end be designated " end ";Target The initial behavior fourth line of document text, terminate to be designated " end ", then need configuration file destination initial behavior fourth line, Terminate to be designated " end ".
The corresponding relation that configuration file destination data item row arrange with original file data item:
Generate file destination, first according to B) generate the gauge outfit of file destination, then according to C), D) generate the number of file destination According to content.
Process provides method original target file data being converted into file destination according to collocation method, system is grasped Make personnel to be changed by the data configuring the data file that can realize former data file and goal systems, reduce and make mesh by hand The risk of mark data file, reduces the working time, improves work efficiency.
By detailed description of the invention above, described those skilled in the art can readily realize the present invention.But should Working as understanding, the present invention is not limited to above-mentioned detailed description of the invention.On the basis of disclosed embodiment, described technical field Technical staff can the different technical characteristic of combination in any, thus realize different technical schemes.
In addition to the technical characteristic described in description, it is the known technology of those skilled in the art.

Claims (5)

1. a data file transition collocation method based on EXCEL, it is characterised in that it implements process and is:
First in allocation list, data type and the data precision of data is changed in configuration;
Define former data file, target data file and data conversion rule thereof;
Read former data file according to rule configuration item and generate target data file;
Data file after conversion is imported goal systems.
A kind of data file transition collocation method based on EXCEL the most according to claim 1, it is characterised in that described Data type includes numeric type data, character type data, amount of money type data, number type data.
A kind of data file transition collocation method based on EXCEL the most according to claim 1 and 2, it is characterised in that institute State file destination and include data below item: interface type, file type, sequence number, row life, Chinese, data type, whether For required item, wherein interface type refers to data file interface type;File type refers to data file classification;Sequence number refers to raw Become the serial number of file destination data item, i.e. order in file destination;Row name refers to generate file destination data item title, The unique identifier i.e. arranged;Chinese refers to generate the Chinese row name of file destination data item;Data type refers to generate mesh Mark file data item type.
A kind of data file transition collocation method based on EXCEL the most according to claim 3, it is characterised in that data File transformational rule comprises data below item: interface type, file type, original document initiate line number, original document terminates Mark, file destination initiate line number, file destination terminates mark, and wherein interface type refers to data file interface type;File Type refers to data file classification;Original document initiates line number and refers to read the initial line number of original document text;Original document Terminate mark and refer to read the end mark of original document text;File destination initiates line number and refers to generate the initial of file destination Line number;File destination terminates to identify the end mark referring to generate file destination.
A kind of data file transition collocation method based on EXCEL the most according to claim 4, it is characterised in that generate The process that implements of target data file is:
1) file destination data item to be changed is defined: include that the interface type of conversion destination file, file type are wanted in definition;Fixed Whether justice is wanted the sequence number of conversion destination file each column data item, row life, Chinese, data type, is required item;
2) configuration data file transformational rule: configure original document to be changed and mesh according to data interface type, file type Mark file read-write file origin identification and terminate mark, i.e. configuration read original document text initial row and terminate mark, The initial line number of write file destination and end mark;Original literary composition to be changed is configured according to data interface type, file type Part and the corresponding relation of file destination, i.e. configure the row sequence number of the corresponding file destination of certain row row of original document;
3) carry out data file transition: according to 1), 2) configuration, complete the data conversion of original document and file destination, first root Gauge outfit is generated, then according to file destination and the original document file data of configuration according to the file destination data item column name of configuration Corresponding relation generates file destination data.
CN201610596340.4A 2016-07-26 2016-07-26 A kind of data file transition collocation method based on EXCEL Pending CN106227710A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610596340.4A CN106227710A (en) 2016-07-26 2016-07-26 A kind of data file transition collocation method based on EXCEL

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610596340.4A CN106227710A (en) 2016-07-26 2016-07-26 A kind of data file transition collocation method based on EXCEL

Publications (1)

Publication Number Publication Date
CN106227710A true CN106227710A (en) 2016-12-14

Family

ID=57534737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610596340.4A Pending CN106227710A (en) 2016-07-26 2016-07-26 A kind of data file transition collocation method based on EXCEL

Country Status (1)

Country Link
CN (1) CN106227710A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777398A (en) * 2017-03-02 2017-05-31 北京微影时代科技有限公司 The generation method and device of a kind of csv file

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169711A (en) * 2006-10-27 2008-04-30 鸿富锦精密工业(深圳)有限公司 Data conversion system and method
CN101504662A (en) * 2009-03-13 2009-08-12 北大方正集团有限公司 Data conversion method and apparatus
CN101958987A (en) * 2009-07-14 2011-01-26 中国电信股份有限公司 Method and system for dynamically converting telecommunications service data
CN102012935A (en) * 2010-12-06 2011-04-13 江西省电力公司信息通信中心 Method for processing data among systems by using Excel
CN102063491A (en) * 2010-12-30 2011-05-18 浪潮集团山东通用软件有限公司 Data structure capable of realizing data back-up and restoration of different types of databases and realization method
CN102629263A (en) * 2012-02-29 2012-08-08 上海安捷力信息系统有限公司 Method and system for format conversion of interactive business data among enterprises
CN105786912A (en) * 2014-12-25 2016-07-20 远光软件股份有限公司 Data acquisition and transformation method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169711A (en) * 2006-10-27 2008-04-30 鸿富锦精密工业(深圳)有限公司 Data conversion system and method
CN101504662A (en) * 2009-03-13 2009-08-12 北大方正集团有限公司 Data conversion method and apparatus
CN101958987A (en) * 2009-07-14 2011-01-26 中国电信股份有限公司 Method and system for dynamically converting telecommunications service data
CN102012935A (en) * 2010-12-06 2011-04-13 江西省电力公司信息通信中心 Method for processing data among systems by using Excel
CN102063491A (en) * 2010-12-30 2011-05-18 浪潮集团山东通用软件有限公司 Data structure capable of realizing data back-up and restoration of different types of databases and realization method
CN102629263A (en) * 2012-02-29 2012-08-08 上海安捷力信息系统有限公司 Method and system for format conversion of interactive business data among enterprises
CN105786912A (en) * 2014-12-25 2016-07-20 远光软件股份有限公司 Data acquisition and transformation method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777398A (en) * 2017-03-02 2017-05-31 北京微影时代科技有限公司 The generation method and device of a kind of csv file

Similar Documents

Publication Publication Date Title
CN108563796A (en) Data compressing method, device and the electronic equipment of block chain
CN103703467B (en) Method and apparatus for storing data
CN108520073A (en) Air control data integration method, device, equipment and computer readable storage medium
AU2016345990A1 (en) A system and method for processing big data using electronic document and electronic file-based system that operates on RDBMS
CN103593456B (en) Worksheet self-defining method for designing and device
CN103345469B (en) The storage of set of numbers, querying method and device thereof
CN103838875A (en) Information collecting system based on two-dimensional bar code and method of information collecting system
CN103428080A (en) Data unpacking and data packing method
CN104050424B (en) The realization of smartcard file access safety rights management and file access method
CN106095964A (en) A kind of method that data are carried out visualization filing and search
CN104021156A (en) Method for rapidly collecting multi-layer fact data based on SQL statements
CN109656986A (en) A kind of householder method that business datum summarizes, device and electronic equipment
CN106469152A (en) A kind of document handling method based on ETL and system
CN103020753A (en) Document state display system and document state display method
CN104156668A (en) Privacy protection reissuing method for multiple sensitive attribute data
CN104123376B (en) A kind of intelligent text collecting method and system based on row template
CN102169491A (en) Dynamic detection method for multi-data concentrated and repeated records
CN102004787A (en) Method for combining multiple application scene forms based on office software plugins
CN102521551B (en) Personalized IC (integrated circuit) card issuing device and method
CN106227710A (en) A kind of data file transition collocation method based on EXCEL
CN103929499A (en) Internet of things heterogeneous identification recognition method and system
CN104424596B (en) Message analysis method and production message analysis instrument based on communication log
CN102437911A (en) Safety processing system and method for intelligent card (IC) card application
CN101425167A (en) Method for generating and parsing trading information
CN107169044A (en) A kind of city talent resource integrated management method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20161214

RJ01 Rejection of invention patent application after publication