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
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