Click here to Skip to main content
11,790,021 members (39,432 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET C#4.0
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')"

The error is A1 couldn't be found.

Awaiting answers.


Posted 5-Oct-12 1:30am
Edited 5-Oct-12 1:36am
Wes Aday at 5-Oct-12 7:33am
Try [Sheet1$]

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Dont use sheet name. create header and use headers name
haluk_78 at 5-Oct-12 7:53am
I know this way...

I can update the values according to headers name.
What if the headers are not as column?. This is because some of my values are as row so how I am gonna update values.
Dain Ucak at 5-Oct-12 8:54am
and this is about update

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 1,029
1 Maciej Los 790
2 KrunalRohit 686
3 CPallini 606
4 Richard MacCutchan 460

Advertise | Privacy | Mobile
Web01 | 2.8.1509028.1 | Last Updated 5 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100