Unable to read excel file using ssis Script Source -
i have case need read excel file filtered rows using ssis.
i've started testing process when in table "system.__comobject"
i'm sure doing stupid.
thanks
public overrides sub createnewoutputrows() dim xlapp = new excel.application dim wb microsoft.office.interop.excel.workbook dim rw excel.range xlapp.displayalerts = false wb = xlapp.workbooks.open("c:\posdata\test.xlsx") dim visible excel.range = wb.sheets("data").usedrange.specialcells(excel.xlcelltype.xlcelltypevisible, type.missing) each rw in visible.rows output0buffer.addrow() output0buffer.column = rw.cells(1, 1).tostring next output0buffer.setendofrowset() end sub
that happens when using interop. objects excel, in case, indeed com objects.
use cells(1,1).value
or cells(1,1).value2
or cells(1,1).text
. wich fits best you. (maybe need cast or convert cells range first)
Comments
Post a Comment