Open Excel file as read only

  • Thread starter Thread starter Mel
  • Start date Start date
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)
 
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...
 
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
 
Back
Top