Help! Locked in Excel Jail!
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Help! Locked in Excel Jail!

  1. #1
    Join Date
    Mar 2012
    Posts
    7

    Help! Locked in Excel Jail!

    I have been going at this for 2 days roaming all over the web trying to help myself. I have never tried to get data from an Excel sheet and this is my first time.

    My problem is I want to get data from an excel sheet to an access database, but do not want the column headers, since this is a database that already exists. I have tried countless ways of writing it but keep either erroring out in debug or within the code. I would love to provide a sample of the code that I had, but I have deleted to try a new method which was to display the excel data in a gridview and import it from thgere to access. The gridview idea seems a bit drawn out so if someone can help me get back on track.

    I have added so many using directives that I have no more room in my project j/k. Anyway I have been writing this different ways trying to get it accomplished from interop to OLEDB. I am sure I am doing something wrong but I am not sure what. I have the database created, and a dataset and the database is in my project. The database has a connection in server explorer and I can preview it to confirm.

    The database is called Survey. The dataset is called SurveyDataSet. I am using the variables fleName to hold the file name, flePath to hold the file path, and SLASH to hold a backslash for proper formatting of the excel path (this is done because the user will pick the path so it will always vary).

  2. #2
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: Help! Locked in Excel Jail!

    I dont think this is enough data on your problem. If I have understood correctly, you just want to import the data from XL to Access without the headers in XL, right? So using your code ignore the header (the whole row at known location).
    Regards,
    Ramkrishna Pawar

  3. #3
    Join Date
    Mar 2012
    Posts
    7

    Re: Help! Locked in Excel Jail!

    Going another route on this.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center