Hello,
I have following problem, i use the code below:
CREATE(xlApp); xlBook := xlApp.Workbooks.Add(-4167); xlsheet := xlApp.ActiveSheet; xlsheet.Name := 'Projekt Statistik'; ....... ...... .... xlApp.Visible := TRUE CLEAR(xlApp);
And if all datas are exportes to excel i get an Dr. Watson ( Error) afer i close Excel (manuelly) !
Anyone knows whats work, maybe i must unlink the session ?!
Best regards
Alex Schubert
ERP & Navision
Dolphin Communication Technologies GmbH
Otto-Hahnstr. 1 c
D-69190 Walldorf
0
Comments
<PRE>
//xlApp Automation 'Microsoft Excel 8.0 Object Library'.Application
//xlBook Automation 'Microsoft Excel 8.0 Object Library'.Workbook
//xlSheet Automation 'Microsoft Excel 8.0 Object Library'.Worksheet
CLEAR(xlApp);
CLEAR(xlBook);
CLEAR(xlSheet);
CREATE(xlApp);
xlBook := xlApp.Workbooks.Add;
xlSheet := xlBook.Sheets().Add;
xlSheet.Name('Projekt Statistik');
xlSheet.Range('A1').Value := 'This is cell A1';
xlApp.Visible(TRUE);
CLEAR(xlApp);
CLEAR(xlBook);
CLEAR(xlSheet);
</PRE>
If i don't save the Excel sheet i get an Program
crash :-(
P.S.: But thanks anyway ...
Alex Schubert
ERP & Navision
Dolphin Communication Technologies GmbH
Otto-Hahnstr. 1 c
D-69190 Walldorf
I was using only CLEAR(xlAPP), but when code as Luc:
CLEAR(xlAPP)
CLEAR(xlBook)
CLEAR(xlSheet)
everything is OK,
10x Luc <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
befor and after the Code !!!
Thanks Alex
Alex Schubert
ERP & Navision
Dolphin Communication Technologies GmbH
Otto-Hahnstr. 1 c
D-69190 Walldorf