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

c++ spreadsheet libraries?

P: n/a
Does anyone know of any c++ libraries that can load some spreadsheet
from a file and manipulate it?

I'm making a simple address book so I can learn applications design and
I'm trying to store user data such as addresses and phone numbers etc.

Dec 18 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
There are under UNI*X, but M$Win.... no, I don't think so.

twoeyedhuman1111 wrote:
Does anyone know of any c++ libraries that can load some spreadsheet
from a file and manipulate it?

I'm making a simple address book so I can learn applications design and
I'm trying to store user data such as addresses and phone numbers etc.


Dec 18 '05 #2

P: n/a
twoeyedhuman1111 wrote:

I'm making a simple address book so I can learn applications design and
I'm trying to store user data such as addresses and phone numbers etc.


Try sqlite, I think it will be good solution for your problem:
http://www.sqlite.org

Cheers
--
Mateusz £oskot
http://mateusz.loskot.net

Dec 18 '05 #3

P: n/a
twoeyedhuman1111 wrote:
Does anyone know of any c++ libraries that can load some spreadsheet
from a file and manipulate it?

I'm making a simple address book so I can learn applications design and
I'm trying to store user data such as addresses and phone numbers etc.

You can use a CSV file to store your data, and with Excel or OpenOffice
Calc you can use it.

Regards,

Stephane
Dec 18 '05 #4

P: n/a
"twoeyedhuman1111" <tw**************@gmail.com> wrote:
Does anyone know of any c++ libraries that can load some spreadsheet
from a file and manipulate it?
I'm making a simple address book so I can learn applications design and
I'm trying to store user data such as addresses and phone numbers etc.


Using such libraries won't teach you application design.
Why not design your program using just C++ and the STL?
Create your own file format and save the data in that.
If you want GUI, get MS-VC++, read Petzold's "Programming
Windows", and learn Win32API. Then you'll have forced
yourself to design an app, pretty much from the ground
up. Finding some library that does most of the work
may speed design time, but will hardly serve to "teach
you to design apps".

Hint: there's something in the C++ STL called "multimap".
I think you'll find it very useful for phonebook design.

--
Robbie Hatley
Tustin, CA, USA
email: lonewolfintj at pacbell dot net
web: home dot pacbell dot net slant earnur slant
Dec 18 '05 #5

P: n/a
"twoeyedhuman1111" <tw**************@gmail.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
Does anyone know of any c++ libraries that can load some spreadsheet
from a file and manipulate it?

I'm making a simple address book so I can learn applications design and
I'm trying to store user data such as addresses and phone numbers etc.


A simple array of structures would do this for you.

struct sAddress
{
std::string Name;
std::string Address1;
std::string Address2;
std::string City;
std::string State;
std::string Zipcode;
std::string Phone;
};

std::vector<sAddress> PhoneBook;

Read up on vectors. Read up on structures. Basically you can now build an
address object and populate it with information. Then "push" it onto the
vector.

Then read up on file IO to read from/write to a file.

This is what you need to learn, basic file IO, not using some library that
you're not going to learn a thing from.
Dec 18 '05 #6

P: n/a
twoeyedhuman1111 wrote:
Does anyone know of any c++ libraries that can load some spreadsheet
from a file and manipulate it?

I'm making a simple address book so I can learn applications design and
I'm trying to store user data such as addresses and phone numbers etc.


I agree with the other replies, that if you're learning to write Windows
applications then read Petzold, although I personally think 'Win32 Programming'
by Rector and Newcomer is far superior.

But basically forget the idea of reading spreadsheet data like out of a binary
..xls file - thats a deep exercise in file IO and binary file formats that
although its _really_ interesting doesn't sound like its what you want to achieve.

If you're trying to write a small app that reads XLS files directly (for
example) then look into COM programming. Of course, there is an argument that
for this problem domain you're better off with other technologies, like VB, C#,
or I know wxPython would do a good job of an address book that can interface to
Excel files (if you have Excel installed, naturally).

HTH
Dec 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.