473,385 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

coding a csv to xls tool

Hi !

I am looking for a command line tool which converts csv to xls. A c, c++
example source for a commandline application, which reads a file, parses
it, and writes it to another file would be a good help for the first
step. The source and destination should be given as command line
arguments. I hope this must be simple and was done million times before.

If there is a complete source / tool out there and someone knows about
it, a link or the whole script would be fine.

Thanks for every advice
Mirko

Jul 19 '05 #1
5 7673
Mirko wrote:
Hi !

I am looking for a command line tool which converts csv to xls. A c, c++
example source for a commandline application, which reads a file, parses
it, and writes it to another file would be a good help for the first
step. The source and destination should be given as command line
arguments. I hope this must be simple and was done million times before.

If there is a complete source / tool out there and someone knows about
it, a link or the whole script would be fine.

Thanks for every advice
Mirko


My understanding is that XLS format is one defined by Microsoft and
used by the Excel application. Perhaps you would want to search the
MSDN web site for information about a command line interface to
Microsoft Excel. Why re-invent the wheel? I know that it can open
a CSV (Comma separated values) file. Also check if Excel has
the ability to execute programs or scripts.

Next time, your best source for these issues is a Microsoft
newsgroup. See the FAQ and Welcome.txt links below. This newsgroup,
news:comp.lang.c++, discusses issues about the language, not
applications of it.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 19 '05 #2
Hello,
Dont know abt your reqmt clearly,
but if the target is .xls (excel sheet) then why dont you use the
features
in microsoft excel itself which will allow you to get a csv file and
convert to the xls..
Mirko <mi***********@mouseattack.de> wrote in message news:<bn0q97$2ja$01
$1@news.t-online.com>...
Hi !

I am looking for a command line tool which converts csv to xls. A c, c++
example source for a commandline application, which reads a file, parses
it, and writes it to another file would be a good help for the first
step. The source and destination should be given as command line
arguments. I hope this must be simple and was done million times before.

If there is a complete source / tool out there and someone knows about
it, a link or the whole script would be fine.

Thanks for every advice
Mirko

Jul 19 '05 #3
Help_xyz wrote:
but if the target is .xls (excel sheet) then why dont you use the
features
in microsoft excel itself which will allow you to get a csv file and
convert to the xls..


Thanks for your answers but i think i have to explain a litte more:
I need this tool because MS-Excel is _not_ available on the target
machine. So its not possible to load the csv data into Excel.
Unfortunaly Excel-Format is needed for the importfilter of a special db
system. I may not change anything around. I have to take it as it is. I
would care about the conversion myself, i only hoped to find the simple
c++ structure around it, where i could implement the parsing function
(MS-Excel Format is documented in the MSDN, so it must be possible). I
don't want to use MFC or something - only native c, c++, because it has
to run potentially on different os's and should be compileable with
different compilers.

Greetings,
Mirko

Jul 19 '05 #4
Mirko wrote:
Help_xyz wrote:
but if the target is .xls (excel sheet) then why dont you use the
features
in microsoft excel itself which will allow you to get a csv file and
convert to the xls..

Thanks for your answers but i think i have to explain a litte more:
I need this tool because MS-Excel is _not_ available on the target
machine. So its not possible to load the csv data into Excel.
Unfortunaly Excel-Format is needed for the importfilter of a special db
system. I may not change anything around. I have to take it as it is. I
would care about the conversion myself, i only hoped to find the simple
c++ structure around it, where i could implement the parsing function
(MS-Excel Format is documented in the MSDN, so it must be possible). I
don't want to use MFC or something - only native c, c++, because it has
to run potentially on different os's and should be compileable with
different compilers.

Greetings,
Mirko


http://www.wotsit.org
--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 19 '05 #5
"Mirko" <mi***********@mouseattack.de> wrote in message
news:bn*************@news.t-online.com...

[Snip]
A c, c++ example source for a commandline application, which
reads a file, parses it, and writes it to another file would be a
good help for the first step. The source and destination should
be given as command line arguments.
I recommend to read Chapter 21.5.1 (File Streams) of the book "The C++
Programming Language", 3rd edition, by Bjarne Stroustrup. It shows a
complete program that copies one file to another. The file names are taken
as commandline arguments.

[Snip]
Thanks for every advice
Mirko


Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Isaac Rodriguez | last post by:
Hi, I am fairily new to Python, but I am really liking what I am seeing. My team is going to re-design some automation projects, and we were going to use Python as our programming language. One...
102
by: RFox | last post by:
I date back to the early days of the web when HTML was limited but very managable, and have always maintained that hand-coding HTML gives you far better control and cleaner HTML markup than any...
2
by: Fred Iannon | last post by:
Does anyone know of a tool to help verify that source code is following a companies' established coding guidelines? In other words, you would somehow specify the "coding rules" for your...
4
by: Mikkel christensen | last post by:
Hi there I wonder if any of you could point me in a direction where I can find some usefull information about coding standarts. I have some generel experiense in programming but I lack many...
2
by: Dave | last post by:
Does anyone know much about this tool? Also, if anyone can point me to a TSQL coding standard, please let me know. -- Dave
8
by: Fernan Bolando | last post by:
I have been going through some of the tutorials on the internet regarding coding styles in unix C programming. Most of the stuff I have read do not prefer using global variables, But for multi-file...
50
by: Konrad Palczynski | last post by:
I am looking for tool to validate conformity to defined coding standard. I have already found Parasoft's C++ Test, but it is quite expensive. Is there any Open Source alternative? I do not need...
17
by: M.Siler | last post by:
I'm trying to get my head around a conversation I had with a developer the other day. We were talking about Codesmith vs. Hand coding. He's position is Codesmith is for junior to mid level...
3
by: editormt | last post by:
A recent poll asked if programming standards are used by development organisations... and if they are controlled. None: 20% Yes, but without control: 49% Yes, with control: 31% Participants:...
19
by: auratius | last post by:
http://www.auratius.co.za/CSharpCodingStandards.html Complete CSharp Coding Standards 1. Naming Conventions and Styles 2. Coding Practices 3. Project Settings and Project Structure 4....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.