Opening an Excel .xlsx file in IE and following its embedded hyperlinks back to file server - asp.net

I have an intranet site that lets users open files in the browser (by prompting for download). One of these files is an .xlsx workbook that contains hyperlinks which point to different locations of files (.pdfs, .docs) on the file server in which the .xlsx workbook is located.
It seems the file server path to the workbook is replaced by a "Temporary Internet Files/Content.IE5/" path, leading to the warning "cannot open the specified file" in Excel.
I tried downloading the Excel document first and then following the links, but they're still opening in the temp internet location
EDIT:
For instance, when hovering over the hyperlinks in excel they read: "file:///C:\Documents And Settings\%username%\Local Settings\Temporary Internet files\Content.IE5\40WSS3CB\" + filename
when they should read: "file:///\servername\Departments\Read\" + filename
How can I still open the excel file in the browser and retain the hyperlinks inside and have them not be replaced by the temporary internet files path?
can someone point me in the right direction ? Thanks!

I did some testing, and it almost comes from the way you store links. If you browse through the dialog of Insert hyperlink, then you will end with relative urls. That is, the common base is stored as a reference to the current xlsx file path, and the remainder is stored and displayed as link.
You are totally in the issue Richard Hare mentions, so following the procedure from the microsoft support site should help. It did the trick on my test at least.
UPDATE to sum up down.with.the.bass comments :
One option to solve this, if doable, is to open xlsx file from its network share location and not through the website. If it is forbidden for whatever reason, you may be able to update the links using a macro.

Do you have an option like "Update links on save" enabled?
In an earlier version of Excel it was set in Tools, Options, General-tab, Web Options-button, Files-tab.
Try unchecking it and resaving the document.

I just did in my server the same task (the one I understood):
Uploaded the hyperlink to some asp.net webpage.
<p>
test<br />
</p>
The "book1.xlsx" file has inside a cell which refers (hyperlinks) to some share directory (i.e \\NHSTXX1\TEST\MS OFFICE EXCEL - \\SERVERNAME\FOLDER\OTHER FOLDER )
And when clicked the hyperlinked cell, it opened the share directory I was looking for.
I tried with Firefox.
hope this help

Hyperlinks shouldn't just mysteriously change. I saved an excel file with a hyperlink in it - opened it with html - saved it - open it in excel again - and the link stays the same. So I'm not sure how this could be happening to you(if I understand your situation correctly).

Related

How to read a table from a Box shared link (url) in R?

I need to read in a text file shared via Box.com - I'll use mtcars.txt as an example.
WES.ped.exp <-
read.table("https://ucsf.box.com/s/tht30egddqjqlq3koucqy7rhtzkh3ydi")
Problem is the shared link takes me to a viewer interface, from where one is supposed to click Download, and not directly to the plain .txt file.
When reading the table, it just reads HTML lines, like so:
I've tried curl, scan and just read.table , any ideas?
Go to the share setting of the file in question. Click on "Share", go to the settings, and make sure the file's shared link is set to "Anyone with the link can view and download this file", in order to generate a direct link.
Go to the little settings icon, copy the "Direct Link", and paste it into the following:
read.table("https://ucsf.box.com/shared/static/whateverthelinksays.txt")

Show .txt file on a Hyperlink using WordPress

I want to show a text file online as a description when users click on a link, and I want it to be a text file, not the html page. I want it just like this link https://wordpress.org/plugins/about/readme.txt.
I have uploaded the .txt file and it opens when the user clicks hyperlink, but contents of that .txt file are not shown....
Any idea what I did wrong?
Its about File-Permissions, you have to set them to Public & Read
This solution is provided to "Online Sites" only. (Not for XAMPP)
Go to Your Admin Panel
Go to Media
Upload your Textfile to your Webserver
Browse your Textfile (via FTP-Client) and make a RightClick
Set CHMOD to 744. (read)(This are File-Permissions)
Open the File in your Browser and it should appear normally.
I've tested it 5 Minutes ago, it should work for you.
If you check the link using Developer Tools (on Chrome) or using Firebug (on Firefox), you'll know that the file is missing. You have not uploaded the file to that location.

how to insert a link to a local file into a markdown cell?

Dear ipython notebook users,
I want to insert a link to a local file located in the notebook directory, and no, it is not an image (the only example I've found). I want to insert this link within a markdown cell.
When clicked on the link, the file is to be opened with a local application (in this case, a molecule viewer)
I've tried to come up with the correct syntax, but no luck. Please, any help is greatly appreciated.
I want to insert a link to a local file located in the notebook directory
I want to insert this link within a markdown cell.
The path need to be relative to where the server has been started, and prefixed with files/.
e.g: [my molecule](files/molecules/ethanol.mol)
the file is to be opened with a local application (in this case, a molecule viewer)
Not possible unless your application support custom links protocol like the itunes:// or apt-get:// one. the best that can append is that on link click you will be prompted to download the file. (keep in mind that the server can be on a different machine thant your browser)
completenting the answer of Matt, it will work only in you import FileLink
from IPython.display import FileLink, FileLinks
FileLink('path_to_file/filename.extension')
Then in a markdown cell insert your links waterBox30.pdb

Why is my <a href="test.xls"> is working and .txt is not?

I have a folder named Test. I have some .xls files and .txt , .doc files in it.
In the html I have
<p> Download excel file </p>
- when I click on this link it is opening a download window (Working fine)
<p> Download Text file </p>
<p> Download excel file </p>
But these 2 are not working. Instead of opening a download window they are going to that .doc file link and saying that the page cannot be found.
why the download window is coming for .xls and not for .do or .doc? How can I fix this??
You need to configure your server's MIME types, otherwise either the file will not be served up (and you'll get a 404) or the browser will not know how to handle the type of file.
See this article for more information.
Sounds silly, but I'm guessing that you need to check the file names and references to them and make sure they are exactly the same. Unless you are on a Windows box, case sensitivity is something to take into account too.
You would want to check this http://www.west-wind.com/weblog/posts/2007/May/21/Downloading-a-File-with-a-Save-As-Dialog-in-ASPNET

How to stop server-generated Word .DOCs from saving with "_files" folders?

I have a Word .DOCument that's being generated by a (classic ASP) server. It's an HTML file that's being output as a .DOC using the application/msword content type. The document is generated fine, saves fine, opens up fine in Word, and is fully editable...
The problem occurs on the next document save in Word. A folder is created in the document's directory with the name "<filename>_files" -- just as if you were saving a web page in IE. Inside this folder are three files: colorschememapping.xml, filelist.xml and themedata.thmx. This happens when originally generating the document using IE or Firefox.
-> How can I prevent these _files folders from being created when saving in Microsoft Word?
(flow: users clicks link in browser, Save (.doc) As..., open .doc in MS Word, edit, save -> "_files" folder)
It doesn't only happen generating file from Firefox/IE.
Microsoft Word 2007 does it when editing any HTML file and saving.
The issue is that if you delete the directory, the HTML file get deleted too.
My workaround:
Edit the file in Word usual
Save the file
Close the file (exit Word, or just
close it)
Right click on file in Explorer
Select "Open With"->Notepad.
Delete the file in Explorer
Go back to Notepad and Save
You now only have a HTML file an no _files directory.
If your output isn't too complicated try using RTF. I've had a decent amount of success by outputting RTF files with a .doc extension.
Word 2007 and 2010 default to multi file HTML documents, linking the document to the content files. This is the default behavior for HTML based documents.
The only way around it, that I've found, is to create a real Word Doc without basing it on HTML, or the user has the select "Single File Web Page" when they do a Save As.
Delete to recycle bin. This deletes both the word doc and the unwanted folder. Restore the word doc and then empty the bin.

Resources