当列名包含#符号时,无法将值插入Excel [英] unable to insert values into Excel when column name contains # sign

查看:86
本文介绍了当列名包含#符号时,无法将值插入Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我遇到一个问题我能够使用c#成功地将值插入我的excel文件。但是当我的列名包含#ex Target_Group#时,iam得到错误未知的列名但在我的excel中,列名是Target_Group#,请找我的插入查询



Hi All,
iam facing an issue iam able to insert values into my excel file using c# successfully .but when my column name contains "#" ex Target_Group#, iam getting error unknown column name but in my excel the column name is there "Target_Group# ", pls find my insert Query

string query = "INSERT INTO [Sheet2$] ([Target_Group#]) VALUES('OHMCRWP0')"

iam使用oledb连接请帮我解决这个问题。

iam using oledb connections pls help me out on this.

推荐答案

([Target_Group#])VALUES('OHMCRWP0')
([Target_Group#]) VALUES('OHMCRWP0')"

iam使用oledb connections请帮我解决这个问题。

iam using oledb connections pls help me out on this.


这篇关于当列名包含#符号时,无法将值插入Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆