Problem in reading cell of Excel sheet using OPENROWSET RRS feed

  • Question

  • Hi All,
      I am reading cells from Excel sheet using following query.

    SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\MOR_TQA_JAN.xls;hdr=no','SELECT * FROM [MOR$L23:L23]')

    But the problem is the cell L23 contains formula to generate value and the cell is displaying value ($47), when I exceute query it shows -47.0 i want to read that excat value from the query. Please help me. Thanks in Advance.

    Friday, May 1, 2009 9:59 AM


  • Hello,

    The values in the L23 column are formatted in the way that way that negative values will be in Brackets and the curreny format is dollars,  so in excel sheet you can see them in that format i.e., ($47). But the actual value in the database will be as -47.00 itself.

    Hope its clear...

    Friday, May 1, 2009 10:07 AM