Reading Excel file

  • Hi Guys.,

    We need to read the Excel file data for Invoicedate : 3/2011[A4] column as well as We need to read CostcenterName[B16] to end of the excel file excel file is not fixed format please share the query of reading excel file.

    Find the attachment same in the message

    Thanks for advance

  • ranganathanmca

    Please note that this is code (not mine) posted by someone here on SSC whose name I forgot to record to give credit where credit is due. Also I resist opening attachments so as not to possibly introduce a virus into my system. All that said you may want to test the following (modified for the rows and columns you need to read) to determine if it meets your needs.

    OpenRowset -----Select data from excel note Sheet1$a4:C start at row 4 using columns a thru c

    SELECT *

    FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',

    'Excel 8.0;Database=C:\Temp\OpenRowSetTest2.xls;HDR=No',

    'SELECT * FROM [Sheet1$a4:c]')

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Thanks for reply.,

    we got solution from excel file reading query

    Query :

    SELECT [Sheet1$A4:A4].*, [Sheet1$B16:R100].*

    FROM [Sheet1$A4:A4], [Sheet1$B16:R100]

    But running time i m facing differente issue as well

    [Excel Source [3850]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.

    Please guide me to reslove this error

    Thanks

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply