Open Excel file as read only

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mel

    Open Excel file as read only

    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)
  • sloan

    #2
    Re: Open Excel file as read only

    Shooting from the hip here.

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



    I have a downloadable example here
    http://sholliday.space s.live.com/Blog/cns!A68482B9628 A842A!176.entry
    for getting an IDataReader reading an Excel file if the google search
    doesn't fit the bill.



    "Mel" <MLightsOut@gma il.comwrote in message
    news:2d4d954a-c712-444d-b454-036b1c68fb77@k3 6g2000pri.googl egroups.com...
    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)

    Comment

    • Mel

      #3
      Re: Open Excel file as read only

      On Nov 15, 10:07 pm, "sloan" <sl...@ipass.ne twrote:
      Shooting from the hip here.
      >
      The best thign would be to grab in IDataReader on it, and bind it to a
      GridView or similar.
      >

      >
      I have a downloadable example herehttp://sholliday.space s.live.com/Blog/cns!A68482B9628 A842A!176.entry
      for getting an IDataReader reading an Excel file if the google search
      doesn't fit the bill.
      >
      "Mel" <MLights...@gma il.comwrote in message
      >
      news:2d4d954a-c712-444d-b454-036b1c68fb77@k3 6g2000pri.googl egroups.com...
      >
      >
      >
      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)- Hide quoted text -
      >
      - 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...

      Comment

      • Mel

        #4
        Re: Open Excel file as read only

        On Nov 15, 10:07 pm, "sloan" <sl...@ipass.ne twrote:
        Shooting from the hip here.
        >
        The best thign would be to grab in IDataReader on it, and bind it to a
        GridView or similar.
        >

        >
        I have a downloadable example herehttp://sholliday.space s.live.com/Blog/cns!A68482B9628 A842A!176.entry
        for getting an IDataReader reading an Excel file if the google search
        doesn't fit the bill.
        >
        "Mel" <MLights...@gma il.comwrote in message
        >
        news:2d4d954a-c712-444d-b454-036b1c68fb77@k3 6g2000pri.googl egroups.com...
        >
        >
        >
        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)- Hide quoted text -
        >
        - 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_Cli ck(ByVal sender As Object, ByVal e As
        System.EventArg s)
        Response.Redire ct("~/schedules/StockedItemGuid eByLoc.xls")
        'open Excel document in a new browser window
        End Sub

        Comment

        Working...