OLEDB, Writing Excel cell without leading apostrophe

后端 未结 8 1531
长情又很酷
长情又很酷 2020-12-19 07:51

I\'m writing to Excel file using OLEDB (C#). What I need is just RAW data format.

I\'ve noticed all cells (headers and values) are prefixed by apostrophe (\')

<
8条回答
  •  时光说笑
    2020-12-19 08:29

    Insert some dummy values for the columns which has apostrophe attached in the template file. Say for example for Name column put something like this dummyname, and age column put 99. Instead of inserting a new row in the template just update the row (Update..... where Name = 'dummyname' and age =99).

    This has worked for me..

    Hope it works for you also!

提交回复
热议问题