Problem: Opening a rowset for “Sheet1$” failed
The gist of this job runs every hour and if it sees a file it will convert from a flat file to excel. There are no file for SSIS to process (SSIS job stops at CheckFile Routine) . New to SSIS and being tasked to help troubleshoot a job that failed:
Step ID 1
Server Severname\PROD
Job Name ConvertFlatFileToExcel
Step Name Run SSIS Package
Duration 00:00:48
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
Executed as user: CoName\ssqlservice. …n 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 10:00:00 AM Progress: 2009-03-23 10:00:47.75 Source: DFT_Import Data to Excel Validating: 0% complete End Progress Progress: 2009-03-23 10:00:47.75 Source: DFT_Import Data to Excel Validating: 20% complete End Progress Error: 2009-03-23 10:00:47.84 Code: 0xC0202009 Source: DFT_Import Data to Excel EX_DST_ExcelReport [728] Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E37. End Error Error: 2009-03-23 10:00:47.84 Code: 0xC02020E8 Source: DFT_Import Data to Excel EX_DST_ExcelReport [728] Description: Opening a rowset for “Sheet1$” failed. Check that the object exists in the database. End Error Error: 2009-03-23 10:00:47.89 Code: 0xC004706B Source: DFT_Import Data to Excel DTS.Pipeline Description: “component “EX… The package execution fa… The step failed.
Any ideas?
Thanks in advance!
Code Snippet:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: |
Public Sub Main() checkFileExistance() 'default step Dts.TaskResult = Dts.Results.Success End Sub '----------------------------------------------------------------------------------------- ' Purpose: Checks for the file in the out going folder '----------------------------------------------------------------------------------------- Private Sub checkFileExistance() Dim strFileName As String Dim dirinfo As DirectoryInfo Dim allFiles() As FileInfo Dim strOutgoingFolderPath As String Try strOutgoingFolderPath = CStr(Dts.Variables("gv_IncomingFolderPath").Value) dirinfo = New DirectoryInfo(strOutgoingFolderPath) allFiles = dirinfo.GetFiles("*.*") Array.Sort(allFiles, New clsCompareFileInfo) If allFiles.Length <> 0 Then Dts.Variables("gv_Fileexists").Value = True Dts.Variables("gv_SourceFileName").Value = allFiles(0).Name.ToString() moveFileToStagingFolder(allFiles(0).FullName.ToString(), allFiles(0).Name.ToString()) Else Dts.Variables("gv_Fileexists").Value = False End If Catch ex As Exception WriteToEventLog("Error in checking the file existance - " + ex.Message.ToString(), "EOB - FlatFileToExcel", "Application", EventLogEntryType.Error, 2) End Try End Sub |
Solution: Opening a rowset for “Sheet1$” failed
I’d say you need to set ‘DelayValidation’ for your Excel destination to True.
It validates the connection at the start whether you run it or not.
I definitely get your error ‘opengin a rowset’ error if I rename the destination sheet or the destrination file.