Click here to Skip to main content
12,882,806 members (40,034 online)
Rate this:
Please Sign up or sign in to vote.
See more: C
how to convert .xls file to multiple csv files using C language where i have data in a format empid,name,age,sal,depart,grade and need to create 3 files using the code . They are like file 1 : empid,name, age file 2: empid, sal file 3: empid,depart file 4: grade, salary structure and this should be done in one shot batch mode
Posted 4-Feb-13 19:12pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

1) When you have Excel installed you can use the Office-Api in Visual-Studio and iterate through the lines. This means that all code is only working on systems that have a certain version of Excel. Using the native .xls-file-format with an own C-program is beyond the scope of this task. ->(best start, when you have used Active-X and COM/OLE, most native solution)

2) You save your file in the new XLSX (xml-based) and create a program that is based on an xml-parser going through all entries. ->(most cool "standard" solution that takes most time)

3) You save your file in .csv already (Excel can do that); then go through the lines with a program. ->(Most practicable solution for a pure "C"-person)

4) You buy a third-party tool like "Altova Mapforce Enterprise Edition" and click your program together, then let the tool generate your xls2csv tool. ->(Fastest solution, most expensive when you do not already own such a tool)
ShankarSughosh 5-Feb-13 3:30am
Thanks a lot
please do tell me the procedure to do so.
And can you help me with the C source code on this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170422.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100