Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SSIS package to import from Excel
Message
From
14/07/2022 11:06:03
 
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Miscellaneous
Thread ID:
01684637
Message ID:
01684655
Views:
57
This message has been marked as the solution to the initial question of the thread.
>>>Hi everybody,
>>>
>>>I'm wondering what are my options of using an SSIS package to read data from Excel without having Excel installed on the server? The package is executed as part of the job. Is there an easy way to convert Excel to csv (say, using Powershell script (but without Excel installed, so no COM automation)) or as a .NET script task?
>>>
>>>Do you have ideas?
>>>
>>>Thanks in advance.
>>
>>>>NET script task?
>>I haven't done much with it, but C# using OpenXml can read a spreadsheet without Excel being present.
>
>OpenXML needs to be installed, right? Can you clarify how exactly this should be installed?
>
>Thanks in advance.

First I downloaded the SDK - I forget where I got it - and then I used the Nuget Package Manager to add it to the project.

Then I added these lines to the Usings:
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
As I said I haven't done much with it. I just got it to read the spreadsheet and display some of the columns.
What I saw looked promising.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform