469,903 Members | 2,018 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

Access excel file in HttpPostedFile directly?

Hi,

we upload an Excel-file via a FileUpload-Control into an HttpPostedFile
object.
Now we want to access the contained data directly without saving it to a
temp file. Is this possible?

So far we have to to a HttpPostedFile.SaveAs(strFileName) and use a
connection string to access the data via an OleDbDataAdapter:
strConn = _

"Provider=Microsoft.Jet.OLEDB.4.0;" & _

"Data Source= " & strFileName & ";" & _

"Extended Properties=""Excel 8.0;"""

But we don't really want the ASP.NET program to have write access to any
directory on the Server.

Kind regards,

Ralph


Mar 13 '07 #1
1 2368
"Ralph Watermann" <We*****@NoSpam.dewrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Now we want to access the contained data directly without saving it to a
temp file. Is this possible?
I don't believe so... every connection string for Excel I've ever seen needs
a physical file to open - I don't believe it can use one of the MemoryStream
/ FileStream objects in the System.IO namespace...

http://www.connectionstrings.com/?carrier=excel
http://www.connectionstrings.com/?carrier=excel2007
Mar 13 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

70 posts views Thread by lgbjr | last post: by
52 posts views Thread by Neil | last post: by
9 posts views Thread by Wayne Smith | last post: by
1 post views Thread by Santosh | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.