2 Replies - 2209 Views - Last Post: 01 August 2013 - 02:48 AM Rate Topic: -----

#1 tabisaki  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 27-June 13

Open Hyperlinks to excel files without prompts / read only

Posted 27 June 2013 - 01:46 AM

Hello,
not sure if anyone will be able to help me with this.
I'm relatively new to coding ASP.net and am working on simple system to display data from a SQL database.
My pages load up a Gridview based on SQL query created when users click on links; this provides them with a drill down structure as they follow their data until they reach the end of the data and then they have links to detailed external data.
At the end level I have the following code that sets the backcolour and icon for the Hyperlink dependant on the LeafType of the document it links to. Example below is for a std URL hyperlink.
It also builds the navigate URL by querying the SQL table for the LeafURL data item, so no links are hard coded in the pages to give me good flexibility.

If e.Row.DataItem("LeafType") = 0 Then
                        e.Row.Cells(5).BackColor = Drawing.Color.SkyBlue
                        LinkNew1.ImageUrl = ("~/Images/url.png")
                        LinkNew1.NavigateUrl = "~/Leaf.aspx?URL=" + e.Row.DataItem("LeafURL") + "&Name=" + e.Row.DataItem("Sub Branch Name")




Many of these links are to Excel documents that I want to open as read only documents so that they just open and don't prompt everytime you click the link.
At the moment the files open in Excel and you have to click through all the prompts for read only etc..

My question is: Is it possible for me to open the files within the browser window instead of Excel and also force the file to just open without prompting.

Any pointers would be greatly appreciated.

Thanks in advance

Is This A Good Question/Topic? 0
  • +

Replies To: Open Hyperlinks to excel files without prompts / read only

#2 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 221
  • View blog
  • Posts: 1,478
  • Joined: 16-March 11

Re: Open Hyperlinks to excel files without prompts / read only

Posted 27 June 2013 - 07:28 AM

There is already some tools for this.

Check here Open or Read existing Excel File.
Was This Post Helpful? 0
  • +
  • -

#3 tabisaki  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 27-June 13

Re: Open Hyperlinks to excel files without prompts / read only

Posted 01 August 2013 - 02:48 AM

View Posttrevster344, on 27 June 2013 - 07:28 AM, said:

There is already some tools for this.

Check here Open or Read existing Excel File.


Many thanks for the info. Not exactly what I was looking for, but usefull all the same.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1