MemExcelGrid Demo

Report designing and printing are most time-consuming tasks. End users would like to change the appearance of the report themselves. Devolopers spend a lot of time to gather requirement, design and change the report. These tasks can be simplified if Excel is used. End users and developer can change the appearance of the report in Excel and developer can write a program to change the cell values, preview and print the report.

Our company (MemDB Technology Company) has developed a Borland C++ Builder package that lets the C++ program to change the Excel cells, preview and print the Excel sheet. Developers only need to decide which cells will be changed by the program and develop a program to change the cells directly and let the end user to modify, preview and print the report. Below is a demo of this. You can read the license first and then download the MemExcelGrid.zip. This demo can easily be deployed and run in Windows (95/98/NT/2000) platform. It contains a simple executable program which does not need to install and is risk-free to your machine.

For End User

Our company helps end user to tailor-made softwares. Our customers ask for the change of the report appearance frequently. So, we implement the software so that users can design a excel sheet themselves without modifying the program. For example, in this demo, you can open the excel.xls in Excel and change the appearance of the report like the figure below.

 

Then you can run MemExcelGrid.exe directly. Our company has Memory Database Technology which helps you to tailor-made program to search, insert, update records and write the record to this excel report. For example, when you open the excel file "excel.xls" from the demo application, you will see the following screen:

Then you can modify the content and click the [Print] button to preview the excel output. This demo program will write each cells to the excel file and pop up the excel preview dialog as shown below:

You can see above. The Excel cells have been changed my our demo program. You can preview and print the report.

For the Developer

If you help people to develop application and find that designing and implementing report is difficult, you may find that our package may help you. This package is written for C++ Builder and only contains two files (MemExcel.h and MemExcel.cpp). For example, when you open the excel file excel.xls in this demo. You can get the excel cells content by the following code:


void __fastcall TExcelGridForm::OpenButtonClick(TObject *Sender)
{
  if (OpenDialog1->Execute())
  {
     FileName = OpenDialog1->FileName;
     TMemExcel excel(FileName.c_str());
     if(excel.WorkBookOpen)
     {
        int col,row;
        for(col=1;col<=10;col++)
        {
           for(row=1;row<=25;row++)
              grid->Cells[col][row]=excel.ExlCell[col][row];
           grid->ColWidths[col]=excel.ColWidth[col]*grid->Font->Size;
        }
        excel.Save(); // prevent asking for "Save As"
     }
     PrintButton->Enabled=true;
  }
}

When you click the [Preview] button, the demo will use the following code to write the excel cells and pop up the excel preview dialog:


void __fastcall TExcelGridForm::PrintButtonClick(TObject *Sender)
{
   TMemExcel excel(FileName.c_str());
   if(excel.WorkBookOpen)
   {
      int col,row;
      for(col=1;col<=10;col++)
      {
         for(row=1;row<=25;row++)
            excel.ExlCell[col][row]=(Variant)grid->Cells[col][row].c_str();
      }
      excel.Preview();
      excel.Save();
   }
}

If you are interested in the package, please send an email to us.

 

Return to MemDB home page