CN102541903A - Comma separated value (CSV) to microsoft excel (XLS) format conversion mode - Google Patents

Comma separated value (CSV) to microsoft excel (XLS) format conversion mode Download PDF

Info

Publication number
CN102541903A
CN102541903A CN201010605204XA CN201010605204A CN102541903A CN 102541903 A CN102541903 A CN 102541903A CN 201010605204X A CN201010605204X A CN 201010605204XA CN 201010605204 A CN201010605204 A CN 201010605204A CN 102541903 A CN102541903 A CN 102541903A
Authority
CN
China
Prior art keywords
csv
xls
file
excel
format conversion
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
CN201010605204XA
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.)
Wuxi CSMC Semiconductor Co Ltd
Original Assignee
Wuxi CSMC Semiconductor 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 Wuxi CSMC Semiconductor Co Ltd filed Critical Wuxi CSMC Semiconductor Co Ltd
Priority to CN201010605204XA priority Critical patent/CN102541903A/en
Publication of CN102541903A publication Critical patent/CN102541903A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a comma separated value (CSV) to microsoft excel (XLS) format conversion mode, which includes the following steps: step 1 establishing a GetFileList function capable of reading CSV files in a circulation mode; step 2 editing and revising the content of the CSV files of each circulation through Excel macro technology; step 3 saving the CSV files of each circulation as an XLS format through an Excel application component in visual basic (VB). Compared with the prior art, the CSV to XLS format conversion mode has the advantages of being capable of achieving batch conversion of CSV files to XLS, and high in universality, practical applicability and reliability, better utilizing macro technology of Excel, and being capable of flexibly revising data in Excel files in a program, time-saving and labor-saving.

Description

CSV TO XLS format conversion mode
[technical field]
The present invention relates to a kind of CSV TO XLS format conversion mode, especially relate to a kind of batch and compile CSV and format transformation the conversion regime of compiling to XLS.
[background technology]
CSV is the most general a kind of file layout; It can be imported in various PC forms and the database, equally also can from database, derive csv file, but will use these data to carry out graphic analyses; When formula calculates, will convert the XLS form earlier into.Existing technology has only disclosed the program that converts CSV from XLS to, but does not convert the program of XLS form to from CSV, like this when running into the bigger csv file of quantity; If each file all has a same place to change; For example Merge Cells is changed Sheet name etc., all needs change behind the File Open one by one; Save as the XLS form again, waste time and energy.
In the prior art, can adopt the procedure of oracle to carry out format conversion, but this technology is a kind of IT technology; With this technology convert file, oracle must be installed earlier, and will understand the oracle technology is preliminary; And will sign in to database during use could operate, for non-IT personnel; Use inconvenience, and ubiquity is not strong; Simultaneously,,, can not realize the function of conversion in batches though this technology can convert file from practicality, simultaneously to the operation of file content also a little less than; In addition, from reliability, the resource that this technology expends is bigger, because the oracle environment will be arranged, if oracle is unavailable, should technology also can't operate so.
[summary of the invention]
To the deficiency of prior art, the technical matters that the present invention solves provides a kind of CSV TO XLS format conversion mode, not only can realize the conversion of batch documents, and can be in the process of conversion to file carry out moderate complicated compile operation.
The object of the invention is realized through following technical scheme is provided:
A kind of CSV TO XLS format conversion mode wherein, may further comprise the steps:
The first step, set up a function G etFileList who reads csv file capable of circulation;
Second the step, through the excel macro technology each round-robin csv file content is compiled processing;
The 3rd the step, through Excel application component among the VB each round-robin csv file is saved as the XLS form.
Further, before the first step, set up a catalogue earlier, and said catalogue is put in the csv file unification.
Before the first step, set up a catalogue earlier and be used to place the XLS file that obtains after the conversion.
Again further, after accomplishing for the 3rd step, check XLS file whether all import and data whether all not correctly.
Compared with prior art, the invention has the beneficial effects as follows: can realize changing in batches the operation of csv file to XLS.Ubiquity is wide, and practicality is high, and reliability is high; The grand technology of the EXCEL of better utilization can be revised the data in the EXCEL file in program flexibly, and is time saving and energy saving.
[description of drawings]
Below in conjunction with accompanying drawing the present invention is described further:
Fig. 1 is the process flow diagram of CSV TO XLS format conversion mode of the present invention.
[embodiment]
Following with reference to description of drawings preferred forms of the present invention.
The present invention mainly contains following ingredient: circulation obtains module, EXCEL file content modified module, the csv file memory module of file.Its principle is: set up a function G etFileList round-robin and read the csv file under the CSV catalogue; Specially each csv file is done the action of conversion and content modification then to function of cyclic design each time; Be applied to the technology of excel macro therebetween, realized the modification of CSV data has also been used; Excel application component among the VB saves as into the XLS form to csv file.
The operation steps of CSV TO XLS format conversion mode of the present invention comprises:
(1), according to the setting of program, set up two catalogues, place the csv file name for one and be called CSV, an XLS file name of placing after the conversion is XLS;
(2), the csv file that will change is placed in the CSV catalogue;
(3), utilize function G etFileList round-robin to read the csv file in the CSV catalogue; And each round-robin csv file content is compiled processing through the excel macro technology; Use Excel application component among the VB at last, the csv file after at every turn circulating is saved as the XLS form;
(4), below the check XLS catalogue file whether all import and data all correctly.
Because of setting up function G etFileList, csv file being carried out batch modification through the excel macro technology; And the technology that through Excel application component among the VB csv file is saved as in batches the XLS file; Grasped by those of ordinary skills' quantity, so this no longer tired stating.
CSV TO XLS format conversion mode of the present invention comprises following advantage:
1, the last generation of the present invention is exe (executable file), and as long as the user is after the operation, and the address of csv file and the address of preserving XLS are preserved in input; After can carry out the batch conversion operations; Easy to use, the user has ubiquity as long as carry out shirtsleeve operation according to the method described above;
2, can show the in batches function of conversion, can utilize the grand technology of Excel again, carry out the complex modifications to file, for example: Merge Cells, enter a new line, change operation such as Sheet name, practicality is better;
3, need not use too many resource, as long as it is just passable to have adorned Windows operating system on the computer, and rapid speed, reliability is higher.
Although be the example purpose; Preferred implementation of the present invention is disclosed; But those of ordinary skill in the art will recognize, under the situation that does not break away from disclosed scope of the present invention and spirit by appending claims, various improvement, increase and replacement are possible.

Claims (4)

1. a CSV TO XLS format conversion mode is characterized in that, may further comprise the steps:
The first step, set up a function G etFileList who reads csv file capable of circulation;
Second the step, through the excel macro technology each round-robin csv file content is compiled processing;
The 3rd the step, through Excel application component among the VB each round-robin csv file is saved as the XLS form.
2. CSV TO XLS format conversion mode according to claim 1 is characterized in that, before the first step, sets up a catalogue earlier, and said catalogue is put in the csv file unification.
3. CSV TO XLS format conversion method according to claim 2 is characterized in that, before the first step, sets up a catalogue earlier and is used to place the XLS file that obtains after the conversion.
4. CSV TO XLS format conversion mode according to claim 1 is characterized in that, after accomplishing for the 3rd step, check XLS file whether all import and data whether all not correctly.
CN201010605204XA 2010-12-27 2010-12-27 Comma separated value (CSV) to microsoft excel (XLS) format conversion mode Pending CN102541903A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010605204XA CN102541903A (en) 2010-12-27 2010-12-27 Comma separated value (CSV) to microsoft excel (XLS) format conversion mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010605204XA CN102541903A (en) 2010-12-27 2010-12-27 Comma separated value (CSV) to microsoft excel (XLS) format conversion mode

Publications (1)

Publication Number Publication Date
CN102541903A true CN102541903A (en) 2012-07-04

Family

ID=46348821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010605204XA Pending CN102541903A (en) 2010-12-27 2010-12-27 Comma separated value (CSV) to microsoft excel (XLS) format conversion mode

Country Status (1)

Country Link
CN (1) CN102541903A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020024A (en) * 2012-12-27 2013-04-03 北京经纬恒润科技有限公司 File format converting method
CN107679081A (en) * 2017-08-30 2018-02-09 平安科技(深圳)有限公司 Information amending method, device, computer equipment and computer-readable recording medium
US10545942B2 (en) 2016-06-13 2020-01-28 International Business Machines Corporation Querying and projecting values within sets in a table dataset

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
COOKY0235: ""CSV转Excel(xlsx)小工具"", 《HTTP://DOWNLOAD.CSDN.NET/DOWNLOAD/COOKY0235/2164329》 *
李旭等: ""VB6在CSV文件格式处理中的应用研究"", 《信息技术》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020024A (en) * 2012-12-27 2013-04-03 北京经纬恒润科技有限公司 File format converting method
CN103020024B (en) * 2012-12-27 2016-01-27 北京经纬恒润科技有限公司 A kind of file layout change-over method
US10545942B2 (en) 2016-06-13 2020-01-28 International Business Machines Corporation Querying and projecting values within sets in a table dataset
US11222000B2 (en) 2016-06-13 2022-01-11 International Business Machines Corporation Querying and projecting values within sets in a table dataset
CN107679081A (en) * 2017-08-30 2018-02-09 平安科技(深圳)有限公司 Information amending method, device, computer equipment and computer-readable recording medium
CN107679081B (en) * 2017-08-30 2020-06-30 平安科技(深圳)有限公司 Information modification method and device, computer equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN104199723B (en) Camera mapping method based on virtual equipment
CN106682036A (en) Data exchange system and exchange method thereof
TW200519752A (en) Mechanism for enabling a program to be executed while the execution of an operating system is suspended
CN103455350A (en) Method for updating BIOS (Basic Input/Output System)
CN108280056A (en) A kind of Excel file analytic method
CN102999480A (en) Method and system for editing document
CN102289497A (en) Document preview image generating system and method
CN106126279A (en) Automatically the method and system of interpolation BIM model race fileinfo
CN102541903A (en) Comma separated value (CSV) to microsoft excel (XLS) format conversion mode
CN102592034A (en) EMTDC (electro-magnetic transient in DC (direct current) system) playback simulation method based on fault recording data of SIMADYN D device
CN104572666A (en) Method for analyzing and importing Excel into database in batch based on Jxl
CN110569076A (en) method for realizing plug-in based on embedded browser console application program
CN103336706A (en) System and method for converting pseudocode into programming language
CN102799137B (en) Method for cross-platform transportation of programmable logic controller (PLC) software of wind power control system
CN103902275A (en) Method and system for achieving conversion of language versions of applications
CN105573860A (en) STD (Suspend to disk) management method and STD management system used in computer system
CN103761395A (en) Method for generating dynamic report of virtual terminal of intelligent substation
CN103984580B (en) DBP configuration files and supervising device collocation method, supervising device
CN102880689B (en) Method for exhibiting contents of office files in web application quickly and conveniently
CN102819588A (en) Dynamic data processing method applied to Oracle database
CN104881293A (en) Rule data processing system and method for Linux system
CN106250120A (en) A kind of Compilation Method of system based on high-pass platform
CN105068833B (en) The method of BS system tab pattern fast transferrings based on card format
CN102789495B (en) Universal file automation analytical processing system
CN102880469A (en) Method for realizing mapping from ExclusiveArea to OSResource in AUTOSAR

Legal Events

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

Application publication date: 20120704