Open Excel file as read only

M

Mel

How do I open an Excel file as a read only document? It would be okay
if it opened in the browser window but I don't want the user to save
any changes and stomp over my original file on the network. Can I
somehow save it to the client machine and then open it? What is the
best method?

(using Asp.net 2.0, vb.net)
 
M

Mel

Shooting from the hip here.

The best thign would be to grab in IDataReader on it, and bind it to a
GridView or similar.

http://www.google.com/search?hl=en&q=oledbdatareader+excel+&aq=3&oq=

I have a downloadable example herehttp://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!176.entry
for getting an IDataReader reading an Excel file if the google search
doesn't fit the bill.







- Show quoted text -

Yeah, I linked it to a GridView but the formatting stinks. It's just
not as pretty as the Excel view. I will need to play with the
GridView Column/Row formatting I guess...
 
M

Mel

Shooting from the hip here.

The best thign would be to grab in IDataReader on it, and bind it to a
GridView or similar.

http://www.google.com/search?hl=en&q=oledbdatareader+excel+&aq=3&oq=

I have a downloadable example herehttp://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!176.entry
for getting an IDataReader reading an Excel file if the google search
doesn't fit the bill.







- Show quoted text -

I am looking for something similar to this but when I close the new
browser window it asks if I want to save the changes. I don't want
this option available. Is there any way to work around this?
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
Response.Redirect("~/schedules/StockedItemGuideByLoc.xls")
'open Excel document in a new browser window
End Sub
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top