Excel buffer: frame and line
 
            
                
                    wulrix                
                
                    Member Posts: 2                
            
                        
            
                    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.
                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
Dynamics NAV
0                
            Comments
- 
            I would recommend a technical upgrade to 5.00 instead.David Singleton0
- 
            Hi William,
 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 followingCreateBook; RowNo := 1; ColumnNo := 1; Range := GetColumnStr(1) + FORMAT(RowNo); Sheet.Range(Range).Select; Sheet.Range(Range).Activate; Sheet.Shapes.AddPicture(ENVIRON('TEMP') + '\Logo.bmp',1,1,0,0,150,50); Sheet.Shapes.AddLine(119.25, 58.5, 360.75, 58.5); CreateBook() CLEAR(App); CREATE(App); App.Visible(FALSE); Book := App.Workbooks.Add(-4167); Book.Worksheets.Add; Sheet := App.ActiveSheet;
 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 :?:
 Albert0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 322 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

