In Navision 4 SP3, we export sales quote to Excel, using standard Excel Buffer functions.
In fact, we use the same report to print and export the data to Excel, simply by adding code in the Sections of the report.
For example:
RoundLoop, Body (27) - OnPostSection()
IF CurrReport.SHOWOUTPUT THEN BEGIN
RowNo := RowNo + 1;
EnterCell(RowNo,ColumnNo,Description,FALSE,FALSE,FALSE);
END;
We want to extend the Excel buffer functions, so we can also draw lines and create Frames during the export to Excel.
Does anyone know how to draw a frame and a line ?
This might help:
this is the result in VB, after drawing a line in Excel while recording a Macro:
ActiveSheet.Shapes.AddLine(119.25, 58.5, 360.75, 58.5).Select
but we do not find the link with Navision automation servers XlRange, XlWrkSht...
Thanks.
William Ulrix
Dynamics NAV
0
Comments
I usually put the app into my report so that I can use these type of functions
define the following variables
Name DataType Subtype Length
App Automation 'Microsoft Excel 11.0 Object Library'.Application
Book Automation 'Microsoft Excel 11.0 Object Library'.Workbook
Sheet Automation 'Microsoft Excel 11.0 Object Library'.Worksheet
in the code I have done the following
This will draw your line but as you can see I don't use the Excel Buffer table. Maybe you could add these function to the excel buffer table :?:
Albert