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. Visual Basic
  4. Export to Excel

Export to Excel

Scheduled Pinned Locked Moved Visual Basic
questionannouncement
2 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.
  • H Offline
    H Offline
    helia
    wrote on last edited by
    #1

    How can I export data from datagrid to Microsoft Excel without concerning about Excel's version???

    M 1 Reply Last reply
    0
    • H helia

      How can I export data from datagrid to Microsoft Excel without concerning about Excel's version???

      M Offline
      M Offline
      Manoj Madhavan
      wrote on last edited by
      #2

      Its very easy, you can write your data to a simple csv file with comma as delemter... for eg... if you have data as 1 abc abc1 2 def def1 then you can write this data as open "somefile.csv" for output as #1 dim i as integer for i = 0 to datagrid.count - 1 dim wline as string wline = datagrid1(0).text & "," datagrid(1).text & "," & datagrid(1).text & vbcrlf() output #1, wline next i close(1) This is just a concept not actual code the purpose is to explain u just to add datagrid text to csv file.. thinking u know how to get data from the gridtable.. This csv file can then be opened easily in excel.. Hope this helps u in writing ur code. Thanks!:) Manoj Madhavan

      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