如何通过ASP.NET将数据保存到excel中? [英] How to save data into excel by ASP.NET?

查看:89
本文介绍了如何通过ASP.NET将数据保存到excel中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个找不到解决方案的问题.

用户在文本框中输入一些值,然后这些数据将发送到excel文件.

我的INSERT语句是这样的:

(注意:我使用OLEDB Provider)

Hello Guys,

I have a problem that I couldn''t find the solution.

The user enter some values into the textboxes and then those data is going to send to an excel file.

My INSERT statement is like this:

(Note : I use OLEDB Provider)

string data = "INSERT INTO [Sheet1$](A1) VALUES ('value')"



错误是找不到A1.

等待答案.

谢谢

Haluk



The error is A1 couldn''t be found.

Awaiting answers.

Thanks

Haluk

推荐答案

(A1)VALUES('value')"
(A1) VALUES ('value')"



错误是找不到A1.

等待答案.

谢谢

Haluk



The error is A1 couldn''t be found.

Awaiting answers.

Thanks

Haluk


请勿使用工作表名称.创建标题并使用标题名称
.
http://csharp.net-informations.com/excel/csharp-excel-oledb- insert.htm [ ^ ]
Dont use sheet name. create header and use headers name
.
http://csharp.net-informations.com/excel/csharp-excel-oledb-insert.htm[^]


这篇关于如何通过ASP.NET将数据保存到excel中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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