Use xlWorkbook.SaveAs(Filename, FileFormat)
I've tryied this, but I got the exception
Microsoft Business Solutions-Navision
This message is for C/AL programmers:
An exception was raised in method SaveAs. The OLE control or Automation server has returned error (HRESULT) -2147352567.
The component did not provide the exception description.
The code is:
XlWrkSht := XlWrkBk.Worksheets.Item(SheetName);
expFileName := recCompanyInfo."Excel Export Path"
+ STRSUBSTNO(savFileName, RANDOM(100000000), '');
expFileFormat:= 'xlCSV';
XlWrkSht.SaveAs(expFileName, '*.CSV');
Where am I wrong?
I also mention that the FileFormat is an Variant in the definition of worksheet functions.
Answers
Please tell me where I can find that integer representation.
Thank you very much for your fast reply.
http://www.geocities.com/ResearchTriang ... excel8.htm
\:D/