a 500 points question: build a excel file in c++

Posted on 1998-07-21
Last Modified: 2010-04-01
I need to build an excel file (without using OLE), but I can't find the exact format of the excel file, perhaps that in microsoft visual c++, there are some objects that already exist to do it.
Thank you.
Question by:roby

Accepted Solution

trestan earned 500 total points
ID: 1168180
There is a toolkit to do it. They claimed that:
"The toolkit is designed to allow creation of Excel format files on any platform without having to purchase or use Microsoft Office."
You can download the trial version to see if it is what you want.

In Visual C++, I think it can be done by either ODBC or DAO. I listed the following online help index for you to get more information.
Data Format:
Platform SDK -> Data Access Objects for Micorsoft Visual C++ -> Using Microsoft Visual C++ and Data Acess Objects -> Initialzing the Microsoft Excel Driver -> Micorsoft Excel ISAM Formats.
Visual C++ -> Visual C++ Programmer's Guide -> Adding Program Functionality -> Details -> Database Topics (ODBC) -> Data Source (ODBC) -> Data Source: Programmatically Configuring an ODBC Data Source
Visual C++ -> Visual C++ Programmer's Guide -> Adding Program Functionality -> Details -> Database Topics (DAO) -> DAO External: Working with External Data Sources -> DAO External: Creating an External Table.


Expert Comment

ID: 1168181
You have a serious problem.
The Excel fileformat is in fact a so called "Structured Storage File". Which means it is a "Filesystem, file" in a File. Well this can be generated with the standard Win32 API. You don't need to use any ole stuff for this. But its a "little bit" of work. FYI, in MFC you can find support for COLEStreamfile. This is a wrapper class for the Files in the "Structured Storage Files". The rest of the files consists of several "subdirs" and "Files in this subdirs". The Format of this Entry should be found within the Office Developers Kit.
At last, you can use "DFVIEW.EXE" in order to take a look at the Excelfiles. This tool is integrated in Visual Studio. It can also too look at WORD Doc files. And if you look around at the Filesformats for the Microsoft Applications, you will find a lot more "Structured Storage Files".
A more detaild explanation of "Structured Storage Files" can be found in the WIN 32 SDK Dokumentation.

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question