Click here to Skip to main content
12,893,816 members (52,702 online)
Click here to Skip to main content


112 bookmarked
Posted 12 Sep 2002

Saving Excel 2.1 Workbook

, 12 Sep 2002
Classes used to save data in Excel 2.1 Workbook format
#include <stdio.h>
#include <stdlib.h>

#include "mexcel.h"
using namespace miniexcel;

#define SAVEPATH "c:\\temp\\a.xls"
//#define SAVEPATH "/home/andy/tmp/a.xls"

int main (int argc, char **args)
  FILE *f = fopen (SAVEPATH, "wb");

  CMiniExcel miniexcel;
  miniexcel(0,0) = "Item1:";
  miniexcel(1,0) = "Item2:";
  miniexcel(2,0) = "Sum = ";
  miniexcel(2,0).setBorder(BORDER_LEFT | BORDER_TOP | BORDER_BOTTOM);

  miniexcel(0,1) = 10;
  miniexcel(1,1) = 20;
  miniexcel(2,1) = (double)miniexcel(0,1) + (double)miniexcel(1,1);
  miniexcel(2,1).setBorder(BORDER_RIGHT | BORDER_TOP | BORDER_BOTTOM);

  return 0;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Andrei Litvin
Web Developer
Canada Canada
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170424.1 | Last Updated 13 Sep 2002
Article Copyright 2002 by Andrei Litvin
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid