473,387 Members | 1,942 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,387 software developers and data experts.

how to manipulate .csv file

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
7 3929
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
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
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

<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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Paul | last post by:
This method: static void swap(int a, int b) { int c = a; a = b; b = c; } does not swap the values of a and b over. It doesn't work for String variables either. However the following method...
6
by: Tim | last post by:
I need to manipulate files (rtf and wav files) on the server side. Can you show me how to do that? Thank you,
1
by: Andreas Palm | last post by:
I have the problem that when I write XML from a dataset I get certain columns that are empty not as empty elements, rather not at all. To avoid that I thought I can go to the dataset and easily...
8
by: Steve Jorgensen | last post by:
Hi all, I was wondering if anyone has been able to find a way to read layout information and manipulate the layout in the Relationships window. I've tried a few different angles, but couldn't...
2
by: Guogang | last post by:
Is it possible to manipulate client computer's direcotries through an ASP.NET page? For example: user click "Down Load Package To Temporary Directory", then a whole package with proper directory...
0
by: intec studenf | last post by:
Is it possible to retrieve and manipulate the description attributes (meta info?) from an image file, using asp.net? In windows you can give an image (for example a jpg file) through the...
2
by: Steve Hershoff | last post by:
Hi everyone, I'm going to manipulate some XML files in my next project-- crawl through the tags, compare if file X has the same nodes as file Y, and if not, what the differences are and who's...
1
by: Ron | last post by:
I would like to write a small program to manipulate this XML: http://www.keepitsimplekid.com/xml/Ad00304.xml What I want the program to do. it would look at all.xml documents in a directory...
4
by: isakb | last post by:
Hi, I am quite new to Python, and the following puzzles me, maybe there is someone here who can tell me what is wrong? I have a list of words in a plain textfile (encoded in latin-1). There is...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.