SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Strange Excel File.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sg2255551
Constraint Violating Yak Guru

272 Posts

Posted - 04/26/2013 :  03:36:15  Show Profile  Reply with Quote
hi

I have about 150 excel files in C:\ExcelFiles.

I have created a SSIS package using For Each Loop with Excel as source and DB as destination.

Many of these files are exported to this directory.

The strange part is that there is nothing wrong with the package but only excel files.

What i meant is only those file that i opened physically like file 1 to 10 and just hit CTRL S to save and execute the package, the import would stop at file 10. So, if i want the package to process let say file 11 to 20, i would need to open file 11 to 20 first and save and then execute the package, it would go on to process file 1 to 20 only.

What must i do to resolve this? Thanks a lot

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 04/26/2013 :  04:05:14  Show Profile  Reply with Quote
it seems the issue with logic you included within for each loop. Is there any checking logic written inside your for each loop before the actual data flow task?

Also are the excel files in correct format when it arrives in directory?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

sg2255551
Constraint Violating Yak Guru

272 Posts

Posted - 04/26/2013 :  04:10:29  Show Profile  Reply with Quote
hi

All excel files are in exact format and there isn't any logic checking. Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 04/26/2013 :  04:14:45  Show Profile  Reply with Quote
which provider you're using for excel connection manager and what are formats of excel spredsheets when they arrive at directory?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

sg2255551
Constraint Violating Yak Guru

272 Posts

Posted - 04/26/2013 :  05:09:59  Show Profile  Reply with Quote
hi

I am using this connection string properties.
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @[User::Filename] + ";Extended Properties=\"Excel 8.0;HDR=YES\";"

and this is the Openrowset properties:
SBNB$A3:B

All excel files format is 97-2003 when they arrived, but my server has only office 2010 installed.

Thanks a lot
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 04/26/2013 :  05:15:03  Show Profile  Reply with Quote
thats ok so far as you've correct version selected in excel connection manager.I hope its in native xls format and not in macro enbaled or csv formats

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

sg2255551
Constraint Violating Yak Guru

272 Posts

Posted - 04/26/2013 :  06:20:26  Show Profile  Reply with Quote
I have no macro or CSV format. Anyway, i actually opened all files and save again. Now it works fine. Just do not know why it have to be done in this way. Thanks a lot
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 04/26/2013 :  06:34:17  Show Profile  Reply with Quote
may be issue with format in which it was generated. Any idea on how they're getting generated?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

sg2255551
Constraint Violating Yak Guru

272 Posts

Posted - 04/26/2013 :  10:32:28  Show Profile  Reply with Quote
It was exported from a click of button "Export To Excel" of a web site. User would then prompted To Open, Save or Save As. They choose Save As so that it would be saved to the destinated directory. I guess this maybe the cause of the problem. Thanks a lot
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 04/29/2013 :  00:49:40  Show Profile  Reply with Quote
ok.
worth checking on whether they can make format consistent

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000