Exporting single value to excel

  • Hi

    declare @dFrom varchar(12)

    set @dFrom = convert(varchar,getdate(),112)

    INSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=D:\test.xls','SELECT * FROM October$B2:B2]')

    @dFrom

    I want to write the date on the october sheet in b2 cell,

    I tried the above method but failed to do,

    Please help .

    Jayasri

  • vsjayashri (10/21/2008)


    Hi

    declare @dFrom varchar(12)

    set @dFrom = convert(varchar,getdate(),112)

    INSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=D:\test.xls','SELECT * FROM October$B2:B2]')

    @dFrom

    I want to write the date on the october sheet in b2 cell,

    I tried the above method but failed to do,

    Please help .

    Jayasri

    INSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=D:\test.xls','SELECT * FROM October$B2:B2]')

    SELECT @dFrom


    Madhivanan

    Failing to plan is Planning to fail

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

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