Importing an Excel file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tlholo
    New Member
    • May 2007
    • 8

    Importing an Excel file

    I have a problem comparing the fields in the excel file with the once in the database because i cannot specify the Primary Keys in the excel file.
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by Tlholo
    I have a problem comparing the fields in the excel file with the once in the database because i cannot specify the Primary Keys in the excel file.

    then nothing can be done...you must have an Primary key column both in table and in Excel file for comparison....i nsert a Primary key column in the excel file...

    Comment

    • kenobewan
      Recognized Expert Specialist
      • Dec 2006
      • 4871

      #3
      I believe this may work if you have designed an autogenerated primary key in your database table.

      Comment

      • Tlholo
        New Member
        • May 2007
        • 8

        #4
        Done that

        I have specified the primary key in the database. 2 problems that i have are that i don't know how to import the excel file into my application and how i am going to compare the fields in the database with the ones in the file. i am using the empID as the primary key.

        Comment

        • Tlholo
          New Member
          • May 2007
          • 8

          #5
          Done that already

          i have specified the primary key in the database. 2 problems that i have are that i don't know how to import the excel file into my application and how i am going to compare the fields in the database with the ones in the file. i am using the empID as the primary key.

          Comment

          • Tlholo
            New Member
            • May 2007
            • 8

            #6
            Success

            I have successfully managed to display the excel file in a datagrid. The problem that i have now is to create a table programmaticall y and add it to a database, set the primary key, then compare the data in the this new table with the data in the table that already exists in that database.

            Im glad i joined this forum.

            Thank you for your help

            Comment

            Working...