Format problem in excel sheet data retrieval

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • likhin M
    New Member
    • Aug 2007
    • 5

    Format problem in excel sheet data retrieval

    Hi all,

    I am developing a vb application to retrive data from excel file using excel object.

    But the probelm is, the extracted data is not in the correct format.
    I am retriving time values such as 22:29 ie in HH:MM format.But my retrived data will be like this:0.96597222 2 . How can I retrive data in the correct format?
    Please help me..
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Try this :

    Text1.Text = Format(0.965972 222 ,"HH:MM")

    Regards
    Veena

    Comment

    • likhin M
      New Member
      • Aug 2007
      • 5

      #3
      Originally posted by QVeen72
      Hi,

      Try this :

      Text1.Text = Format(0.965972 222 ,"HH:MM")

      Regards
      Veena
      Hi Veena,

      Its working fine now. I had tried this function before, but at that time it is working erronously ie. for some values it is showing correct format , but for others not.
      I have find out the problem. It is with worksheets. My excel sheet contain several worksheets, and I was using the wrong one.After using the correct worksheet it is solved.Anyway, thank you for your help.

      Comment

      Working...