how to do colour coding

shwetashweta Member Posts: 94
Hi all

I have query regarding the color coding that if I want to export data into excel sheet and for different conditions there should be different colors is it possible in navision if it is then how
Thanks in advance

Regards
shweta

Comments

  • garakgarak Member Posts: 3,263
    take a look into the EXCEL Buffer.
    For a new color you can add a new field or new function and set there the color.
    The color can be set with the following Automation Methods:
    Selection.Interior.ColorIndex = INTEGERVARIABLE //<--- cell colour, or use Property color instead of colorindex
    Selection.Font.ColorIndex = INTEGERVARIABLE //<--- Font colour
    

    Regards
    Do you make it right, it works too!
  • shwetashweta Member Posts: 94
    Can u please elaburate how to do it, like which automation method is need to be call
  • garakgarak Member Posts: 3,263
    Did you take a look into Excel buffer?
    What is with Selection.Interior ;-)

    The Automation "Selection" is based, for example on Excel "Application".
    And Interior is based on Selection.

    Start Excel, start macrorecording, colour a cell or a font (that what you need) stop the recording, read the VB code, transfer this to Excel buffer with your new field. It's more then simple.
    Do you make it right, it works too!
Sign In or Register to comment.