Options

formatting within excelbuffer

sbillysbilly Member Posts: 231
Hi all,
Who knows how can I set the background color of a column when exporting a report to excel with excel buffer.
And how can I control the font size.
Thanks

Comments

  • Options
    ClausHamannClausHamann Member Posts: 80
    You can do this by adding the following lines to the CreateSheet function in table 370 - Excel Buffer
    IF "Font Size" <> 0 THEN
      XlWrkSht.Range(xlColID + xlRowID).Font.Size := "Font Size";
    
    IF "Background Colour" <> 0 THEN
      XlWrkSht.Range(xlColID + xlRowID).Interior.ColorIndex := "Background Colour";
    

    where "Font Size" and "Background Colour" are new fields in the Excel Buffer table.
    Add the lines in the REPEAT UNTIL loop after
    IF Underline THEN
      XlWrkSht.Range(xlColID + xlRowID).Borders.Item(XlEdgeBottom).LineStyle := XlContinuous;
    

    Regards
  • Options
    sbillysbilly Member Posts: 231
    Thanks for your replay, but tell how can I exploit it in the report.
    Thanks
  • Options
    mohasinmohasin Member Posts: 16
    hi guys,
    I m new to nav
    can u tel me how i wil get xlSheet and XlWrkBk objects;
    i knw only excel buffer object from that i hav used createbook();
    please tel me all thing about this.
  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,504
    They are automation Variables..

    Check Excel Buffer Table - 370
  • Options
    ClausHamannClausHamann Member Posts: 80
    You have to find the places in the report that insets the data you want colored or changed size on and then update the code to populated the new fields in the Excel Buffer table.

    Regards
  • Options
    mohasinmohasin Member Posts: 16
    Hi mohana, can u brief what autamtion variable how to creat that and use it
  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,504
    Did you check Table Excel Buffer..how it is created and used?
    Search the forum please..
Sign In or Register to comment.