Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 279
  • Last Modified:

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

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.
0
roby
Asked:
roby
1 Solution
 
trestanCommented:
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.
http://www.scitek.co.uk/html/excel_toolkit.html

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.
ODBC:
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
DAO:
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.

0
 
RalfGriggelCommented:
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.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now