Message in Excel when created for a ASP page

M

mensand

Hi,

I've the problem that Excel gets hang when i try to open a XLS whit a macro
in it.
I open the Excel as follwing


function TDFXLSImport.SheetName(const aFileName: string): string;
var
Excel, WorkBook: OLEVariant;
begin
result := '';
try
Excel := CreateOLEObject('Excel.Application');
Excel.ScreenUpdating := false;
Excel.Interactive := false;
Excel.DisplayAlerts := false;
WorkBook := Excel.WorkBooks.Open(aFileName, false,
true,null,null,true,,,false,false,false,false);
result := WorkBook.Sheets.Item[1].Name;
WorkBook.Close;
WorkBook := NULL;
Excel := NULL;
except
on E: Exception do
begin
end;
end;
end;

The server keeps beeping with the messagebox and then EXCEL hangs becuase
the ASP.NET user is not having a desktop to show the dialog. I just want the
dialog not to appear. Is this possible ?

Greetings Andre Mens
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top