CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2006
    Posts
    67

    Smile Using Excel as database

    Hi, May I ask on how to use excel as backend of my system in visual basic 6? Is there a difference with MS Access in terms of coding? How 'bout with defining the datatype? Can you set an example for me? Thank you so much!!!

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: Using Excel as database

    You can surely use Excel as a Backend but I would go with MS-Access. Ms-Access is a pure database when compared to Excel. Is there any special reason why you would use Excel?

  3. #3
    Join Date
    Nov 2006
    Posts
    67

    Unhappy Re: Using Excel as database

    My data will come from other sources which means if i received the data, it is saved as image and can be opened to document imaging, what am i gonna do is to convert it to MS Word then convert it to MS EXCEL since it can't be directly converted to MS ACCESS. It would be easier to use MS ACCESS but the problem is the format of my data is not match to MS ACCESS. I think there are limitations if I'm going to use MS EXCEL.

  4. #4
    Join Date
    Nov 2006
    Posts
    67

    Re: Using Excel as database

    Another thing, I just want to ask if there is any function wherein I can call a data from the database wherein not all complete data will be displayed. Like for example, my data is 5002 10/16 then if i want to use it on my system or to be displayed I want to eliminate 10/16 so that 5002 will be the only thing to display.

  5. #5
    Join Date
    Oct 2006
    Posts
    65

    Re: Using Excel as database

    1- Excel and Access Solution
    If your data is available in automated excel sheet, you can link this excel sheet (permenently) with access. See File>Get Externl Data>Link Table. use the file type in browser to link excel sheet. Whenever you edit data in access, it will also automatically update in Excel. I hope this will solve the Excel backend problem and you can get more efficient DB in the form of Access.

    2- Eliminate Data
    If the data length and format is same then you can use left(data,4) to eliminate the data after 5002.

    Tell me if it helpfull?

    Umar

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Using Excel as database

    You should just use Access, and text files, which import more easily than into Excel.

    As far as the splitting, why not just use two fields?
    Using Access, you could combine BOTH fields into one KEY for the record.
    Last edited by dglienna; November 17th, 2006 at 12:00 AM.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Nov 2006
    Posts
    67

    Re: Using Excel as database

    I ddnt get on how to eliminate some text within the textbox, kindly elaborate... Thanks a lot.

  8. #8
    Join Date
    Nov 2006
    Posts
    67

    Re: Using Excel as database

    i have another question, if i have a variable like this 333.6333, how am i going to eliminate .6333 so that i can get only 333?

  9. #9
    Join Date
    Oct 2006
    Posts
    65

    Re: Using Excel as database

    Code:
    round(333.6333,0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured