Manipulating Excel data with ASP.NET

G

Guest

I have a Web application that needs to update a Microsoft Excel spreadsheet
for complex calculations, whereby I read the results into a dataset for
display. I am accessing my spreadsheet using OLE DB and ADO. I'm trying to
use and SQL update statement to update a cell in my spreadsheet, but I keep
receiving the error: No value given for one or more required parameters.

From this SQL statement: UPDATE BallisticInfo SET [Info] =3200 WHERE [Index]
= 1

BallisticInfo is the name of the spreadsheet and Info and Index or column
names. Any ideas?
 
P

Paul Clement

¤ I have a Web application that needs to update a Microsoft Excel spreadsheet
¤ for complex calculations, whereby I read the results into a dataset for
¤ display. I am accessing my spreadsheet using OLE DB and ADO. I'm trying to
¤ use and SQL update statement to update a cell in my spreadsheet, but I keep
¤ receiving the error: No value given for one or more required parameters.
¤
¤ From this SQL statement: UPDATE BallisticInfo SET [Info] =3200 WHERE [Index]
¤ = 1
¤
¤ BallisticInfo is the name of the spreadsheet and Info and Index or column
¤ names. Any ideas?

So "Info" and "Index" are values in respective cells of the first row in the BallisticInfo
Worksheet?

In addition, have you specified HDR=Yes in your connection string?


Paul
~~~~
Microsoft MVP (Visual Basic)
 
G

Guest

I tried that parameter, and OLE DB throws this exception: Could not find
installable ISAM.
 
G

Guest

I just tried that, and I received this exception: 'BallisticInfo$' is not a
valid name. Make sure that it does not include invalid characters or
punctuation and that it is not too long.

Elton W said:
Try

UPDATE [BallisticInfo$] SET [Info] =3200 WHERE [Index] = 1


HTH

Elton Wang



Jim said:
I have a Web application that needs to update a Microsoft Excel spreadsheet
for complex calculations, whereby I read the results into a dataset for
display. I am accessing my spreadsheet using OLE DB and ADO. I'm trying to
use and SQL update statement to update a cell in my spreadsheet, but I keep
receiving the error: No value given for one or more required parameters.

From this SQL statement: UPDATE BallisticInfo SET [Info] =3200 WHERE [Index]
= 1

BallisticInfo is the name of the spreadsheet and Info and Index or column
names. Any ideas?
 
P

Paul Clement

¤ I tried that parameter, and OLE DB throws this exception: Could not find
¤ installable ISAM.
¤

The syntax is a little tricky once additional arguments are added.

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=e:\My Documents\Book20.xls;" & _
"Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top