By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,061 Members | 1,523 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,061 IT Pros & Developers. It's quick & easy.

how to manipulate .csv file

P: n/a
I want to get some win32 api's which would be able to read/write/
open/
close a .csv fileand store the content in a structure. Can any one
help me out with such apis in C ?

Jun 19 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
ro******@gmail.com said:
I want to get some win32 api's which would be able to read/write/
open/
close a .csv fileand store the content in a structure. Can any one
help me out with such apis in C ?
The technique is well-documented in the literature, and there are plenty
of libraries out there.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Jun 19 '07 #2

P: n/a
Hi Richard,
I would like to know wat win32 apis are there which can be used to
retreive/set the data from/to a csv file!
Jun 19 '07 #3

P: n/a
ro******@gmail.com said:
Hi Richard,
I would like to know wat win32 apis are there which can be used to
retreive/set the data from/to a csv file!
If you're determined to use non-portable Win32 APIs rather than a fully
portable library, that's your prerogative, of course - in which case I
suggest you ask in comp.os.ms-windows.programmer.win32 where the
Windows programming experts hang out. They are far more likely to give
you an authoritative answer, and any mistakes in answers you receive
are far more likely to be corrected.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Jun 19 '07 #4

P: n/a

<ro******@gmail.comwrote in message
news:11**********************@q19g2000prn.googlegr oups.com...
Hi Richard,
I would like to know wat win32 apis are there which can be used to
retreive/set the data from/to a csv file!
The might be a Windows only api for loading CSV files.
However there is no reason at all why the bulk of the work cannot be done in
ANSI C, with only the final dispaly of data to the user Windows-specific.

If you look on my website you will find a CSV to struct converter. However
it can only spit out C code to be compiled with a compiler. There is no way
of creating struct types at runtime in C.However you don't need them - the
CSV loader has functions to retrieve data by row and column, and to query
column names.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
Jun 19 '07 #5

P: n/a
On Tue, 19 Jun 2007 06:55:44 -0700, in comp.lang.c ,
ro******@gmail.com wrote:
>Hi Richard,
I would like to know wat win32 apis are there which can be used to
retreive/set the data from/to a csv file!
A csv file is just a text file, you don't need special Win32 API calls
to manage them. I doubt that any exist, in fact , since the APIs are
to do with Windows, not text files.

Meantime STFW. The wikipedia entry even contains some relevant
external links, for once. Once you know the format, writing a tool to
read in the data is fairly simple.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Jun 19 '07 #6

P: n/a
On Jun 19, 9:16 am, royzl...@gmail.com wrote:
I want to get some win32 api's which would be able to read/write/
open/
close a .csv fileand store the content in a structure. Can any one
help me out with such apis in C ?
This can be done in portable C without resorting to system-specific
APIs. I have written a portable CSV library that can quickly parse
and write CSV data as well as a set of end-user tools that uses this
library to manipulate CSV files. Both are written in ANSI C and are
OSS:

http://sourceforge.net/projects/libcsv/
http://sourceforge.net/projects/csvutils/

Robert Gamble

Jun 20 '07 #7

P: n/a
On Jun 19, 9:16 am, royzl...@gmail.com wrote:
I want to get some win32 api's which would be able to read/write/
open/
close a .csv fileand store the content in a structure. Can any one
help me out with such apis in C ?
Aww, I thought this post was going to consist of handy tips on how to
manipulate CSV files.

I realize that not everyone on USENET is a native English speaker, and
that's fine. I'm sure I've said some ridiculous things in Japanese.
But this "how to ______" structure for asking questions is common it
really grates me.

Instead use "How does one....?" or "How do I....?" or "Does anyone
know anything about doing ....?"

Just saying "how to ...." suggests that you are giving an explanation
on how to do whatever is in the '....'.

Sorry to go all grammar nazi on this thread, but I just can't hold my
tongue on this subject any longer.

Hyuga

Jun 20 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.