Free Support Forum -

Demo-ing outside of the demo

Is it possible to demo the Excel component outside of the Demo?

I’ve tried creating a reference to the dll in another app but the app can’t see it.

It would be helpful for management to buy off on purchasing the control if they could see a demo of the Excel component displaying “real” data.

Michael Minadeo
IBM Global Services
Nissan Account

Hi Michael,

I’ve tried creating a reference to the dll in another app but the app can’t see it.

Please elaborate on it…

Hi Ben,

Thanks for your response to my other posting. We very much appreciate your looking into the Excel97 issue and look forward to your response.

Regarding demo-ing outside of the demo, I created a reference to the dll in another app and then tried to instanciate the object in a c# web app, but the compiler reports that the I am missing a reference (i.e. the app can’t see the component)

Any suggestions?

Michael Minadeo
IBM Global Services
Nissan Account

Dear Michael,

Sorry for my stupidness.

I’m not very sure what’s the problem.

Which dll do you reference? The Aspose.Excel.dll or the Aspose.Excel.Demos.dll?

Could you post your code here? Or any other more detailed info, such as the exact steps you’re doing.

Thanks for your cooperation.


No worries.

I referenced Aspose.Excel.dll just like in the c# demo, but at first did not include a using statement since there was none in the demo.

This is what I pasted into a class from the demo:

protected System.Data.OleDb.OleDbConnection oleDbConnection1;
protected System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1;
protected System.Data.OleDb.OleDbCommand oleDbSelectCommand1;
protected System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter2;
protected System.Data.OleDb.OleDbCommand oleDbSelectCommand2;
protected DataTable dataTable1;

I instanciated the Aspose component:

Excel excel = new Excel();

and init-ed the DB
DBInit(); (from the demo)

Then I modifed the demo code and pasted it in class method I called:

string path = MapPath(".");
path = path.Substring(0, path.LastIndexOf("\"));
string designerFile = path + “\XLSheets\MassExtract.xls”;

this.oleDbSelectCommand1.CommandText =
FROM auto_upload_temp_t”;


Worksheet sheet = excel.Worksheets[0];
sheet.Cells.ImportDataTable(this.dataTable1, false, 6, 1);
sheet.Name = “Products List”;

while(excel.Worksheets.Count > 1)
excel.Worksheets.RemoveAt(excel.Worksheets.Count - 1);
excel.Save(“Bob.xls”, FileFormatType.Default);

The above code is not final so it will not work…

The problem I encountered was that the compiler complained about a reference to “Excel”, even though it was included in the references and implemented as it was in the demo.

So, I added:

using Aspose.Excel

which stopped the complier complaints.

Why is this not required inside of the demo?


Dear Mike,

Thanks for your consideration.

The namespace of the demo is Aspose.Excel.Demos. So it does not need “using Aspose.Excel”. You can test it by creating a project named “Aspose.Exce.Test” or so.

About the Excel97 issue of OpenInBrowser option, I install an Excel97 in my machine and it works fine. So could you try the demo after restarting your machine or in another machine?
Or maybe you’d better update your IE.

I have meet this problem in the following situations:
1. Excel is running on the background
2. IE is not updated
3. Debug a web app and it fails


Thank you for taking the time to look into this issue.

Unfortunately, I restarted my machine, and ran the demo with the same result.

But, when I tried in on another a machine, it worked perfectly.

I will try updating my IE, or maybe re-installing office to get this to work on my machine.

In any case, the Aspose.Excel demo works very well on my co-workers machines.

Now, if we can resolve the other issue that I have, with the object creation, then I will be able to demo the Aspose.Excel for management, which I’m sure will impress them as much as it has impressed the other developers.

Best Regards,
Michael Minadeo
IBM Global Services
Nissan Account