Results 1 to 6 of 6

Thread: importing from excel

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2011
    Posts
    255

    importing from excel

    hi

    i have been as to automate some excel gfiles that we get.

    what i want to happen is read in the info from the excel files put it into tables in a database

    and the create a form to view the info.

    has anyone do anything like this or no a good tutorial on this

    any help would be great

  2. #2
    Junior Member
    Join Date
    Oct 2011
    Location
    Chicago, IL
    Posts
    28

    Re: importing from excel

    I'm actually working through a similar scenario right now.

    However, you cannot automize importing an excel file. Import specs(automizing your imports) only work for txt or csv files.

    So what you're going to have to do is control excel through vba. (this is how i am working around it, im sure there are plenty of other routes you could take) use vba to grab the excel file location. save that file as a txt or csv format, and then close excel through vba. then you will be able to do your usual import specs using a txt file.

    I'm about to post a new thread on a similar topic. I have gotten to this point, but when the resulting txt file is imported, it is not carrying the same information that it was when it was an excel file. it is just a bunch of jibberish.

    dont mean to barge in on your thread, but im thinking you could possibly have the same problem in a bit.

  3. #3
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: importing from excel

    You didn't specify a database but with SQL Server you can import Excel files to the database a number of ways. Reference:

    http://support.microsoft.com/kb/321686

    Also Google "importing excel to sql server" for more links.

    I'd take that approach if possible and then just create your form standalone.

  4. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: importing from excel

    The Jet OLEDB Provider has an Excel IISAM that can select Ranges within Worksheets and treat them as tables as well. No need for exporting or any VBA, however the Excel files have to be formatted in a predictable way.

    Excel is terrible for data entry. People will add extra blank or junk columns and rows, name Worksheets at random, etc. Expect to write a ton of error handling logic.

    This is really what InfoPath is for. But that's been with us since Office 2003 and basically nobody ever uses it.

  5. #5
    Frenzied Member
    Join Date
    Nov 2010
    Posts
    1,470

    Re: importing from excel

    what database are you importing into?

    are the gfiles always the same?

    here to help (importer of such for a long time)

  6. #6
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: importing from excel

    If you are working with Jet ("MS Access") databases, then this might have everything you need:

    http://www.vbforums.com/showthread.php?t=672137

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