Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to partially change the font color of the words in a excel cell

how to partially change the font color of the words in a excel cell

Scheduled Pinned Locked Moved C#
csharpvisual-studiographicstutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    neodeaths
    wrote on last edited by
    #1

    hi all i am using vs.net 2005 to change the excel's cell word partially e.g abc <==where by only the a is red is this possible so far i am able to change the whole cell color with this Excel.Range rng2 = oSheet.get_Range("A1", Missing.Value); rng2.Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red); can anyone advice please

    O 1 Reply Last reply
    0
    • N neodeaths

      hi all i am using vs.net 2005 to change the excel's cell word partially e.g abc <==where by only the a is red is this possible so far i am able to change the whole cell color with this Excel.Range rng2 = oSheet.get_Range("A1", Missing.Value); rng2.Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red); can anyone advice please

      O Offline
      O Offline
      OkkiePepernoot
      wrote on last edited by
      #2

      //Assuming you did not select the cell yourself rng2.get_characters(1,1).Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red);

      N 1 Reply Last reply
      0
      • O OkkiePepernoot

        //Assuming you did not select the cell yourself rng2.get_characters(1,1).Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red);

        N Offline
        N Offline
        neodeaths
        wrote on last edited by
        #3

        thanks alot it works very interesting what can be done with c# and excel

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups