Writing to Excel using ADO always writes to row 1 RRS feed

  • Question

  • I have an application that uses ADO to write to named ranges in an Excel 2007 spreadsheet.  I can't use Excel automation at this time, so I'm stuck using ADO.  Does anyone
    know why when I do a PutValue on a field from a recordset connected to an Excel 2007 named range the values are always written to the first row in the spreadsheet?

    Reading from the spreadsheet using GetValue returns the correct value.  I'm just having trouble with writing to spreadsheet.  My code works fine with earlier versions of Excel  Of
    course I do have to use a different connection string.

    I've discovered that if the Excel 2007 spreadsheet is open, my PutValue calls put data into the correct locations in the spreadsheet.  Anyone know why?


    Monday, June 22, 2009 3:31 PM

All replies