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 convert a string (D10 : E 20) to a range object?

how to convert a string (D10 : E 20) to a range object?

Scheduled Pinned Locked Moved C#
questiontutorial
2 Posts 1 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.
  • A Offline
    A Offline
    abhiram_nayan
    wrote on last edited by
    #1

    I could to convert a range object to a string, this way: string selectedRange = resRange.get_Address(false, false, XlReferenceStyle.xlA1, false, false); Now, how can I get back the range object from the string('selecteedRange' whose value is say "D10:E20")??? thanks.

    A 1 Reply Last reply
    0
    • A abhiram_nayan

      I could to convert a range object to a string, this way: string selectedRange = resRange.get_Address(false, false, XlReferenceStyle.xlA1, false, false); Now, how can I get back the range object from the string('selecteedRange' whose value is say "D10:E20")??? thanks.

      A Offline
      A Offline
      abhiram_nayan
      wrote on last edited by
      #2

      oh, no one responded yet, anywayz, i got it myself... here's what i've done: string []s = selectedRange.Split(new char[]{':'}); Range res = ((Worksheet)MyApplication.ActiveSheet).get_Range(s[0], s[1]); Regards.

      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