Print to Excel Top Border

stevo_300
Member Posts: 7
Hi,
I am creating a report within NAV that prints to excel using the excel buffer.
I am trying to figure out how to apply a top border to the report so it prints a line in the created excel workbook.
This is the code to one of the possible outputs of data. As above I need this to apply a top border to the cells created?
Any help would be greatly appreciated. As a side not is it also possible to get NAV to fill the background of the cells?
Kind Regards
Steve
I am creating a report within NAV that prints to excel using the excel buffer.
I am trying to figure out how to apply a top border to the report so it prints a line in the created excel workbook.
This is the code to one of the possible outputs of data. As above I need this to apply a top border to the cells created?
ExcelBuffer.NewRow; ExcelBuffer.AddColumn("Inbound Warehouse Entry"."Serial No.",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Inbound Warehouse Entry"."Item Description",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Inbound Warehouse Entry"."Date Entered",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn(Dispatch."Posting Date",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn(Dispatch."Serial No.",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Ship-to Address".Name,FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Sales Header"."Replacement Ship-to code",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Inbound Warehouse Entry"."Sales Returns Order No.",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Header"."Ship-to Name",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Header"."No.",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn(Desc,FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Line"."Unit of Measure",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Line".Quantity,FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Line"."Fault Code",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Fault Code".Description,FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Line"."Fault Reason Code",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Fault Reason Code".Description,FALSE,'',FALSE,FALSE,FALSE,'');
Any help would be greatly appreciated. As a side not is it also possible to get NAV to fill the background of the cells?
Kind Regards
Steve
0
Comments
-
you can make top border by modifying CreateSheet function in Excel buffer Table..
Try the following..
Create a new Field in Excel Buffer table- Top Border (type - Boolean).
and write Code in Create sheet Function
if "Top Border" then
XlWrkSht.Range(xlColID + xlRowID).Borders.Item(3).LineStyle := XlContinuous;
Instead of AddColumn Function, Create a own Function and apply top border where you want.0
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
- 320 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