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. Web Development
  3. ASP.NET
  4. Reading from excel file.

Reading from excel file.

Scheduled Pinned Locked Moved ASP.NET
helpdatabasetutorialquestion
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.
  • H Offline
    H Offline
    hemant kaushal
    wrote on last edited by
    #1

    Hi, In my application I m using excel file to enter the values in database. It is working fine but it is giving a strange error. If in a column let A If we have value "DMIX00008" and "65400004" Then it is reading values like "65400004" but values like "DMIX00008" are coming blank. I think it is reading that column datatype as integer or numeric. But i want that column to display values as they are entered. How to rectify this problem?

    D 1 Reply Last reply
    0
    • H hemant kaushal

      Hi, In my application I m using excel file to enter the values in database. It is working fine but it is giving a strange error. If in a column let A If we have value "DMIX00008" and "65400004" Then it is reading values like "65400004" but values like "DMIX00008" are coming blank. I think it is reading that column datatype as integer or numeric. But i want that column to display values as they are entered. How to rectify this problem?

      D Offline
      D Offline
      Dilip H Patel
      wrote on last edited by
      #2

      Hi Hemant, I think that you are filling the datatable directly from the excel. and your first value in excel is numeric. that's why this problem is occured. Try this one. first you create columns of datatable, which you want to fill. make sure that column's datatype is string. and then try to fill it. Regards, Dilip Patel

      H 1 Reply Last reply
      0
      • D Dilip H Patel

        Hi Hemant, I think that you are filling the datatable directly from the excel. and your first value in excel is numeric. that's why this problem is occured. Try this one. first you create columns of datatable, which you want to fill. make sure that column's datatype is string. and then try to fill it. Regards, Dilip Patel

        H Offline
        H Offline
        hemant kaushal
        wrote on last edited by
        #3

        Thaks dilip_rollwala, I change the first value to alphanumetic and it works. But I cant create columns of datatable first.

        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