Borders in Export to Excel...

Chandan_kansalChandan_kansal Member Posts: 27
edited 2006-05-26 in Navision Attain
Hello

I want to know that wheather we can create border in excel sheet while exporting to excel...

Thanx

Comments

  • kinekine Member Posts: 12,562
    Yes, you can. For example you can extend the excel buffer with some new fields and in export function add something like:
    XlEdgeBottom := 9;
    XlEdgeTop := 8;
    XlEdgeLeft := 7;
    XlEdgeRight := 10;
    ...
    
        IF "Left Border Type" <> 0 THEN
          XlWorkSheet.Range(xlColID + xlRowID).Borders.Item(XlEdgeLeft).LineStyle := XlContinuous;
        IF "Right Border Type" <> 0 THEN
          XlWorkSheet.Range(xlColID + xlRowID).Borders.Item(XlEdgeRight).LineStyle := XlContinuous;
        IF "Top Border Type" <> 0 THEN
          XlWorkSheet.Range(xlColID + xlRowID).Borders.Item(XlEdgeTop).LineStyle := XlContinuous;
        IF "Bottom Border Type" <> 0 THEN
          XlWorkSheet.Range(xlColID + xlRowID).Borders.Item(XlEdgeBottom).LineStyle := XlContinuous;
    

    Where "xxx Border Type" are Integer fields in the Excel buffer (in this case it can be just boolean, but you can use it as thickness or something...), and XlEdgeXXX are new Integer constants...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • David_CoxDavid_Cox Member Posts: 509
    Sorry didn't see the XlEdgeLeft =

    Ooops
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
Sign In or Register to comment.