Last post Mar 16, 2015 12:07 PM by bbcompent1
Feb 19, 2015 02:28 PM|bbcompent1|LINK
Forgive me if this is in the wrong place but I figure I would ask here anyway. I am using OleDB to read records from Excel. The crazy thing is it was working properly for the longest. Now all of a sudden, it takes my records and duplicates them. To rule
out code related issues, I tried a test on an excel with only one record. That one was fine. So I figured after my reboot the problem was resolved. It is not. I simply do not get what the problem is because it does not always do this. It is at random.
Feb 19, 2015 03:32 PM|bbcompent1|LINK
alright, I think I may have figured out what is causing the duplication. If an excel file is the newer format of XLSX (2007/2010), OleDB will duplicate the records. If you run it through the older 2003 xls format, the duplication is not occurring according
to my testing. I am running really large files through the process just to see if that is the case or not. Stay tuned!
Feb 19, 2015 07:32 PM|Lannie|LINK
Wow.. I load XLSX often with OLEDB and not found this to be problem... but maybe I am not looking hard enough. Anxious to hear more details.
Feb 20, 2015 07:02 AM|bbcompent1|LINK
What I noticed is when I have more than 10 records, I end up with 20. And the crazy thing is it does not happen every single time. However with the 2003 format it does not do that. I suspect it may have something to do with the Open XML format of the
newer files. If you want to see something really interesting with XLSX format, rename the file to .zip and open it. It has an actual zip file structure which is really neat.
Feb 24, 2015 09:32 AM|bbcompent1|LINK
I have confirmed the behavior is reproducible as a bug, so I have submitted a bug report to Microsoft's Office team. This bug seems to occur when using Microsoft Access Database Engine 2010. Stay tuned.
Mar 16, 2015 12:07 PM|bbcompent1|LINK
This issue is resolved. By using OleDB dumping into a Data table, then bulk sql copy into SQL Server.