SSIS package completed successfully but data is not getting loaded into Excel Destination - sql

Inside a DATA Flow task, I have OLEDB source, data conversion task and excel destination.
I could see data moving from OLEDB source to EXCEL through DATA CONVERSION task.
I switched on data viewer and I could see data moving.
I replaced the Excel with a Flat File. The flat file is getting loaded with the data.
But if my destination is EXCEL, then I am not able to see data in that excel file. Total count of rows is around 600,000 and my destination excel is 2007(.xlsx)
I am running it in 32bit.
Can anyone please help me out? Please I need it.
Thank you so much in advance.

Excel 2007 row limit is 65,536. I know the source here is Wikipedia, but it is accurate. Source: Wikipedia Excel 2010 is a million something MS Excel Specs. Might be time for an upgrade.

In case you haven't already checked, page/scroll down to the end of the spreadsheet to confirm the data hasn't just been appended below rows that previously held data.
Carl's answer is probably the right fit, but thought I'd share this just in case. I had a similar outcome while developing an SSIS package today.
I tried to transfer data to an Excel sheet that previously had data in the first 1400 rows. I deleted the data in the Excel sheet prior to running the package. The package ran to completion (all green) and said it wrote 1400 rows.
Went back to check the file but there was nothing. Made some tweaks to the package and ran it a few more times with the same result.
Upon closer inspection of the destination Excel sheet, I found that the data actually did get over to the Excel sheet but it didn't start until row 1401...even though there was nothing in rows 1-1400. Did some research but found no solutions that would be worth the time. I ended up just exporting the data to a new file.

goto;
Redistributable components version Registry key
Excel 2016
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\16.0\Access Connectivity Engine\Engines\Excel
Excel 2010
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\14.0\Access Connectivity Engine\Engines\Excel
change TypeGuessRows 8 -> 0

Related

"No column information was returned" error when selecting from empty Excel sheet

I have an Excel workbook that contains a series of sheets for import into a database. For most of the sheets I'm using a query to get at the data along the lines of:
SELECT [F1], [F2] FROM [Sheet Name$A2:B10000]
In my development I had a workbook with some test data for each sheet. Now someone else is using the package to import a copy of the workbook, but one of the sheets is blank because they don't want any data loaded for that particular table. Unfortunately, when the package tries to run that portion of the import it errors out with a VS_NEEDSNEWMETADATA error.
This can't be a unique problem, but I haven't been able to find any solutions online. Any suggestions on how to get around it?
In a similar case, I would use a Script Task to check if the Excel sheet contains data, if so, the Data Flow Task is executed (using precedence constraints).
Also, make sure to set the Data Flow Task Delay Validation property to True.
Useful links:
Check if Excel file is empty in C#
How to check if Excel-workbook is empty?
Working with Precedence Constraints in SQL Server Integration Services

Initialization of the data source failed - Excel 2016

I'm trying to refresh a query in Excel 2016 (new install) and I get the above error. I've looked around, the problem seems quite common, but none of the answers seem to fit my issue.
In Excel, I have a couple of tabs of data in Excel tables. I use Get & Transform to import these tables into Power Query from where I generate 4 further tables of data, which are uploaded to the Data Model. I then create 3 relationships and generate 3 pivot tables with a single slicer to operate the tables.
When I come out of Excel and go back in and select "Refresh All", this is when I get the error:
Initial of the data source failed.
Check the database server or contract your db admin. Make sure the
external db is available and then try the operation again. If you see
this message again, create a new data source to connect to the DB
The data source is the excel workbook. I tried re-creating the Power Query queries etc, but to no avail.
Repair on Power Pivot also didn't work.
Given it's a new install of 2016, which comes with Power Query and Pivot as standard, I'm not sure where to try next.
Any help much appreciated.
I ran a repair on my installed version of Excel 2010, and that seems to solve the issue for me, I've seen sometimes when the user has multiple versions of excel installed library references can get broken, resulting in this error.

UNION ALL with Excel file as data source

I have got the following Problem.
I have several Excel files containing each the data of a country in one folder.
However I want to pull that all into one Excel report.
As the content of the source files change dayly, I guess the best way to do that is to do a import via an SQL Statement using Union All.
However the problem is that MSQuery only allows me to Access one file at a time. Is there a Workaround for that problem?
Maybe create a data model and use DAX?
This sounds like a job for Power Query, a free add-in from Microsoft for Excel 2010 and Excel 2013, and built into Excel 2016 as "Get and Transform" in the Data ribbon.
You can create individual queries to the different Excel files in the different folder, then create a query that appends all previous queries into one table, which can be loaded to the Excel data model or a worksheet table for further processing.
The queries can be refreshed with a click when the data has changed.

Importing 2007 files in SQL SERVER 2008 R2

Good Day,
Today i am facing this error upon importing an excel file to a databe in sql server 2008
i do not know what causes this error, i do not know if it is because the excel file is 48MB in size, or because there is a sheet where in there are 113956 rows? if so can you help me find a work around to this? i really need to import the data inside my excel file to the database. i tried selecting the 2007 version of my excel file in the dropdown box like below but it still outputs the same problem. so any help?
Thank You.
There are a couple of things you can try:
Resave the Excel file as a delimited text file - that way you can get around the MS Office driver.
Try cutting the Excel file in half by saving it in two different files.
Out of curiosity, how many columns does this Excel file have? I believe there is a 255 column limit.
I tried Re saving the file but not in a CSV format, i have found out that the excel file is read only although its properties are not set to read-only, upon resaving the excel file to another file the import now works for me.

Export data to Excel file using SSIS

I have SSIS Package which Exports Data from table to Excel file
Control Flow :-
Data Flow :-
This is My Step :-
Drop Excel Table
Create Excel Table with format as of my Select Query which i used to retrieve data from database
Insert Data from Database to Excel file
I Used Query Like Select * From Table Where --Some Condition
I retrieve 3000 rows out of 10000 rows and put that 3000 rows in my excel sheet.
But when open my excel sheet i saw scrollbar which goes till 10000th row and ends hence my excel sheet size also increses . how can i reduce my excel sheet size ? my excel sheet contains only 3000 rows then why blank cells which goes till 10000th row ?
SQL Server 2008 &
Visual Studio 2008 with BIDS
I believe your issue is around the method in which you are using to create the file. You have two alternatives and both should fix your issue:
Solution #1:
You can create an Excel file with those predefined columns, essentially your empty output file - this would act as your 'Template File'. Your flow would then be this:
File System Task - Copy template file to output or working directory (rename if necessary)
OLEDB Source Task - Query your source for the data (3000)
Data Conversion Task
Excel Destination Task - Put data into new Excel file
Note: You already have steps 2 thru 3 complete, you just need to make sure you are connecting to the new Excel file. Also, to clarify, step 1 is outside the Control Flow Task.
This way is helpful because you always have a blank and consistently formatted Excel file to copy and work with.
Solution #2:
The other option is to use a Script Task and create the Excel file - you could also load the data into the file in this task. This requires some basic understanding of VB.NET or C#. Basically you would need to get a XLS library (like NPOI). This is more complicated, but gives you the best functionality.
I recommend you try solution #1 and see how that works for you.
Drop table SheetName doesn't delete the sheet instead it just deletes the row . If for the 1st time you have loaded 10K rows and then again executed the package by restricting the number of rows to 3K ,the excel file will still contain those 10K empty rows as it retains the sheet along with the empty spaces .
You can use script task to delete the sheet using COM obects .But for that you need to place the Excel PIA(Primary Interop Assemply) to make it visible for VSA or else create a new excel file every time the package runs
Else as suggested by Nicarus use File System Task to delete the existing file and create a new Excel file on every execution .
Diagram :
File System Task :
Use the same components and the query for Create Table using Execute SQL task and your DFT