The easiest way to avoid Excel crashing is to keep the
focus with the #avifiles. It also gives the user
something to look at so they know it is processing.

Hiding it is easy also:
_sysExcelApplication.visible(false);

I can email a simple XPO of how I do Excel exports for
the users using a class and an Excel template.

Randall

--- Steeve Gilbert <[EMAIL PROTECTED]>
wrote:

> I'm curious, how did you hide the Excel application?
>  I usually 
> instruct user not to play with Excel while an Excel
> generation occurs 
> in Axapta otherwise it crash.  But If I can avoid
> that, that would be 
> better.
> 
> Steeve...
> 
> --- In [email protected],
> "thnathan" <[EMAIL PROTECTED]> 
> wrote:
> >
> > Hi all, 
> > 
> > Just a brief description of what I'm trying to do:
> > I have taken a heavily modified price list report
> and am now 
> pushing 
> > it out to excel using the sysexcel* classes and
> COM.
> > To replicate the datasource of the report, I
> created a query and 
> > process the results. To cut a long story short, my
> logic works and 
> so 
> > does the code. 
> > 
> > The report runs successfuly and pushes to excel.
> On the odd 
> occasion 
> > the code will throw errors.
> > Something else seems to be killing my COM session
> while pushing out 
> > to excel. I have hidden the excel application
> while processing so 
> the 
> > user can't click around. 
> > To push each result from the query to excel I
> created a method 
> public 
> > void createSheetData(sysExcelWorkSheet _sheet, int
> _row, int _col, 
> > anytype _value, int _border = -1....
> > which basically allows me to specifiy the excel
> sheet, column and 
> row 
> > number with a value.
> > 
> > I am lead to believe that something beyond my
> control is failing. 
> The 
> > code will throw an error at random intervals of
> code. 
> > eg. The debugger stopped on line 4 of this code
> > 1.  _sheet.cells().item(_row,_col).value(_value);
> > 2.  if (_header || _underline || _size || _border
> != -1 || 
> _alignment)
> > 3.  {
> > 4.     cell = _sheet.cells().item(_row,_col);
> > claiming invalid number of parameters.
> > I could not have got to line 4 without line 1
> correct.
> > 
> > OR
> > invalid number of parameters on line 5 even though
> line 1 was 
> > successful
> > 1.     Border = Borders.Item(7);
> > 2.     Border.LineStyle(1);
> > 3.     Border.ColorIndex(-4105);
> > 4.     
> > 5.     Border = Borders.Item(8);
> > 6.     Border.LineStyle(1);
> > 7.     Border.ColorIndex(-4105);
> > 
> > 
> > Any ideas of COM conflicts or processes that may
> affect my COM 
> > session without me knowing?
> >
> 
> 
> 



      
____________________________________________________________________________________
Check out the hottest 2008 models today at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html

Reply via email to