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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

696 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