Importing Excel (xls) into SQL Server 2012 Using SSIS

advertisements

I have an issue in importing data from Excel to SQL Server using SSIS

Issue is that everything works well but when i run the package again (supposingly to append more records in the table it shows error)

Could you let me know what I need to do? Do I need to configure my package again or set something on database ?

Here you see on the first run of the package

http://i.stack.imgur.com/ylNbX.jpg

Data have been imported correctly in the SQL

http://i.stack.imgur.com/LwDGi.jpg

But when run again it show this error, until I truncate the table.

http://i.stack.imgur.com/BX4T7.jpg


basically Sqlite is a database which is used to save data.Android provides several ways to store user and app data. SQLite is one way of storing user data. SQLite is a very light weight database which comes with Android OS.

you can see this link here.which contains a code for import Exel sheet into sqlite dataBase.

and another code for that:

FileInputStream is = new FileInputStream("Excel File Path in SDCard");
HSSFWorkbook  wb = new HSSFWorkbook(is);
HSSFSheet sheet = wb.getSheet("Test");

Iterator<?> rowIterator = sheet.rowIterator();
int index = 0;
while (rowIterator.hasNext()){

     HSSFRow hssfRow = (HSSFRow) rowIterator.next();
      if(index++ != 0){

         //In this stage i have storing each cell into database
          util.inserrDataToSqliteDb(dbManager, hssfRow.getCell(1).getStringCellValue(),

hssfRow.getCell(2).getStringCellValue()
    }
 }

which is serioslly helps me when i need that one and see this link