开发者

OLEDB Inserting a row in excel before the header columns of create table

I am using oledb to create excel sheets.

I use create table to create a excel sheet. This creates a new sheet, as well as add the column names in first row of the sheet.

I want to add a title before this first row how can I do that ?开发者_开发技巧


  1. Once the sheet is created - with create table.
  2. Insert the data.
  3. Close connection.
  4. now open connection with HDR=no in extended properties.
  5. now execute an update query

    Update F1='new value' where F1='old value'

  6. in above because of the HDR=no, the column names are available as data row, executing update allowed changing row. Here F1 equals first column and so on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜