Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

VS2017 Loop Import Excel (.xlsx) files OLE DB Errors

$
0
0

Hi all,

I'm struggling with importing data from Excel files into an SQL Database.
Hopefully anyone can help me, since I probably tried all possible solution on the internet.

I'm running the following versions:

Microsoft SQL Server Data Tools for Visual Studio 2017  (vs_NIJSEN)
Version 15.9.17
VisualStudio.15.Release/15.9.17+28307.905
Microsoft .NET Framework
Version 4.7.03062

Installed Version: IDE Standard

C# Tools   2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a

Common Azure Tools   1.10
NuGet Package Manager   4.6.0
Project   1.0
ProjectServicesPackage Extension   1.0
ResourcePackage Extension   1.0
ResourcePackage Extension   1.0
SQL Server Analysis Services   15.0.1528.0
SQL Server Data Tools   15.1.61906.03120
SQL Server Integration Services   15.0.1300.371
SQL Server Reporting Services   15.0.1528.0
SsmsVsIntegration   1.0
Visual Basic Tools   2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
Visual Studio Code Debug Adapter Host Package   1.


What I want to achieve:

  1. I've got a folder with multiple .xlsx files.
  2. I want to loop through these files and import the values into a database.
  3. On success the file is renamed and saved in another folder called Success.

This flow isn't new to me and I've done this with .csv files without any problems.
But with Excel files, I cant get it to work for multiple files.

First problem:
First I struggled with the Excel Connection manager to get this to work.
The files are created with Excel 2016.
On my SSIS server, the is no Office installation.

I downloaded and installed the ACE 16.0 (64-bit) AccessDatabaseEngine (Microsoft Access Database Engine2016 Redistributable).
I've also installed the 32-bit Microsoft Access Database Engine 2010 Redistributable.

When I create a new Excel Connection Manager, I select the Microsoft Excel 2007-2010 version (also tried all the newer Excel versions).


I've selected this version, since my installation seems to only run the 32-bit DtsDebugHost.exe and the 2010Redistributable version is installed as 32 bit version.
Selecting Excel 2016 gives the information the OLE DB 16.0 version isn't installed in the above case.


When I add an Excel Source in my Data Flow and select the created Excel Connection Manager, I'm unable to select the Name of the Excel sheet.

Creating an SQL command select * from [Sheet1$]  successfully shows a preview.

When I go to Advanced Editor > Component Properties and select AccesMode = OpenRowset and I fill in the Sheet1$ in OpenRowset, then the Table or View works (but selecting the dropdown again, the "No tables or views could be loaded" error pops-up again and I'm not able to select Sheet1$.



It seems there is still something wrong, perhaps this is the cause of my Loop problem?

I installed all possible combinations for the Access driver (
2010 32bit & 2016 64 bit,
only 2010 32bit or 64 bit,
2010 64bit, 2016 32 bit
only 2016 32bit or 64bit etc.
) but I'm still not able to succesfully select the dropdown.

.. next in reply




Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>