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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Reading specific columns from Excel

Reading specific columns from Excel

Scheduled Pinned Locked Moved Visual Basic
databasehelp
4 Posts 3 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.
  • V Offline
    V Offline
    Vipul Bhatt
    wrote on last edited by
    #1

    Dear All Normally the query used to read Excel file is "SELECT * FROM SHEET1$" Can anoyone help on how can we read specific columns using the query. For Eg. If we wan to read only columns C, D, and F then is there anything like "SELECT C, D, F FROM SHEET1$" Regards.

    P R 2 Replies Last reply
    0
    • V Vipul Bhatt

      Dear All Normally the query used to read Excel file is "SELECT * FROM SHEET1$" Can anoyone help on how can we read specific columns using the query. For Eg. If we wan to read only columns C, D, and F then is there anything like "SELECT C, D, F FROM SHEET1$" Regards.

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      Has the thought occurred to you to go and look on MSDN? Have you tried:

      Vipul Bhatt wrote:

      SELECT C, D, F FROM SHEET1$

      and what was the result?

      "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

      V 1 Reply Last reply
      0
      • P Paul Conrad

        Has the thought occurred to you to go and look on MSDN? Have you tried:

        Vipul Bhatt wrote:

        SELECT C, D, F FROM SHEET1$

        and what was the result?

        "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

        V Offline
        V Offline
        Vipul Bhatt
        wrote on last edited by
        #3

        Getting an error "No value given for one or more required parameters." if any of the following queries are used. > SELECT C, D, F FROM SHEET1$ > SELECT COLUMN3, COLUMN4 FROM SHEET1$ And yes tried searching MSDN as well. The process is still on. Regards.

        1 Reply Last reply
        0
        • V Vipul Bhatt

          Dear All Normally the query used to read Excel file is "SELECT * FROM SHEET1$" Can anoyone help on how can we read specific columns using the query. For Eg. If we wan to read only columns C, D, and F then is there anything like "SELECT C, D, F FROM SHEET1$" Regards.

          R Offline
          R Offline
          rprateek
          wrote on last edited by
          #4

          To find your exact answer you can go to Read Excel File From VB application

          Blog for Programmers

          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