Is it possible to open an excel file in its current location not download it - html

I am writing a small web site for a company Intranet and have the following question that may be simple. Is it possible to open an Excel file from it's current location on the network instead of downloading it. So that any changes made are made to the actual file and not a downloaded version of it?
Thanks
Matt

Yes, it's possible, but then you would have to specify the address of the file in the local network, not as an HTTP address on the web server.
The user would naturally need to have access to the file on the network share, with write permission.

No. It is not possible to open a remote excel file across HTTP and write changes back to it.
Let's consider some other things you might be trying to do.
If you are running excel, all you can open are files visible to the file system APIs. That means files on your local disk and network file systems accessible via CIFS. Mapped drive letters, \\ pathnames, that sort of thing.
If you set up an Excel file for download from a web server, it will always be downloaded. Excel won't open it 'in place'.
The Microsoft technology solution that addresses what you seem to be asking for is Sharepoint.

Anything you open from a HTTP connection I believe is "downloaded" to the client. Its more how you "uploade" the changes.
But if thats what the customer wants I have some alternatives:
1) Use Dropbox or similar filesharing utils. Once someone saves a document in Dropbox, its automatically uploaded to the Dropbox account. The free version allows up to 2 GB of data. Thats quite a few Excel files.
2) Use Gmail/Google Apps. If you do you get 1 GB space for online documents. You can upload Office files suchs as Excel and they will be converted an online editable from within the Google Docs. You can share the files within the domain or even externally if you make that setting the admin part. Afterwards you can also download/export the Spreadsheet as Excel format. I havent tested how much of the standards you loose but ofcause its not a full Excel.
3) wait for Microsoft to finish their Office online. I bet that Excel version will do exactly what you are currently asking for by using some special plugin or MSIE9 technics. But I dont really know yet.
Hope some of this gave you some ideas?

If the file is in a network share on the same domain (or reachable from the domain your app is running from), it is possible, provided that
The share is readable and writeable by the domain\user the app runs under (via ownership or assigned role.)
The file is shareable (IIRC). This is important if multiple users (or apps) need to access it.
Other than that, a \domain\location path should be treatable just like a local (or disk mounted) path.

In your HTML document, create/place a link:
<a href='file:///H:/docs/foo/bar.xls'>Your Excel File</a>
Substitite your network UNC path for H:/docs/foo/bar.xls. Note the slashes instead of the regular UNC backslashes.

Related

Opening "live copies" of files on shared drives from an intranet

I'm working on a company intranet, the idea is to consolidate important company schedules (which are excel based) in one place.
It's simple, & im using: "file:///Z:\Spreadsheet.xlsx" as an href to open an excel spreadsheet.. this works after some browser security settings modifications.
The problem is that since HTTP is a transfer protocol, the browser downloads the file, then opens the copy that was downloaded.
I'm trying to have the link directly open the original excel file copy. Any ideas for this approach? Since it is an intranet, I have the freedom to deploy software that can help me accomplish this.
Thanks.

Is it possible to access and list files of local system in web browser.

My requirement is to show a panel where I list the local system directory, from where I drag and drop the files inorder to perform operations on it.
In HTML5 the FileSystem API is available , but most of the browsers are not supporting.
Is it possible by using input type as file? Like we browse and select a directory, then we can see the list of files and their details?
As the previous commenters correctly noted, this is not possible because it is considered a security hole. Think about a malicious script that could read out everything on your local file system just by visiting a web page.
You can however implement file drag-and-drop like this: https://github.com/moxiecode/plupload

File name conversion for cloud storages?

Lets say I have a web URL to a file on a cloud storage (like Dropbox, Google Drive, etc). How do I convert that to the corresponding file path on my pc? On Android? On iOS?
Assuming of course I have the utilities/apps installed locally.
EDIT: I interested in file name the reverse direction too. (I.e. when I have the local file path, what is the web path?)
EDIT 2: #Greg just made me realize that the problem with file name is much worse on Google Drive than on Dropbox.
And that is very bad. :-(
The reason? Google has good search capabilities on Drive and therefor I and many, many others have put their documents on Drive. However, once I found it I must locate it on my on computer/device. (If I want to edit a pdf for example.)
EDIT 3: #Dan McGrath kindly asked what parts remain unsolved.
Short answer: All. ;-)
Long answer: My actual use case, see below.
My actual use case is a Zotero web app. Zotero is a reference database where you store references to scientific articles, web pages, etc. The items stored in Zotero may include PDF files or - which I prefer - links to PDF files.
I just want to be able to easy access (read) this PDF files from any computer through the web app. And on my own computer I want to be able to edit the files with my local PDF editor. (Be it Android, Windows or whatever.)
By using a cloud storage I do not have to download/upload the files myself. The cloud storage takes care of that part.
For the "reverse" scenario, that is, you have a file and you want the Dropbox shared link, you can use this API endpoint, assuming you're connected to the account via the API:
https://www.dropbox.com/developers/core/docs#shares

Saving files on local machine by Chrome app

My chrome app needs to save a file with human-readable or standard format such as SQLite (It should be readable outside Chrome).
Is there any API suitable for this purpose?
Some files with .localstorage extension (SQLite format) are in Chrome\User Data\Default\Local Storage folder. Is it possible to create such files by the app?
Edited: The app should not ask user for extra permission.
Thanks for your consideration.
chrome.fileSystem API is what you need.
You will need to ask the user at least once where to save the file, but then you can retain the entry to write again to the same file/folder.
There is no way around asking the user to "escape the sandbox".
You'll want to use the Quota Management API. This is per-origin storage, and you request specific amounts of quota.
It sounds like you also want your users to open the files directly? There's an HTML5 filesystem explorer Chrome app that you can use. It'll show you the files, and you can figure things out from their URLs (e.g. I'm currently using filesystem:http://localhost:8000/temporary/bar for a local experiment).
Or are you looking for something more user friendly? I think you have to use file save in that case, the same way Google Drive does.

Can chrome extension modify a file in our hard drive?

I am making a chrome extension which needs to add/delete/modify file in any location in our hard drive. The location can be temporary folder. How is it possible to make it. Please give comments and helpful links which can lead to me have this work done.
You can not, but adding a local server (nodejs/deno/cs-script/go/python/lua/..) to have a fixed logic (security) to do file stuff and providing a http server to answer back in an ajax/jsonp request would work.
The extension will not be able to install the software part.
edit: if you want to get started using nodejs, this could help
edit2: With File and Directory Entries API (this could help) you can get hold of a FILE OR complete FOLDER (getDirectory(), showDirectoryPicker()).
Thankfully, this is impossible.
Google or any other company wouldn't have many friend if their extension(s') installation caused compromise including complete control over any files(ie. control over machine) on your hard drive. The extension can save information to disk in a location that is available for storing local information as mentioned. You will not have any execute permission on the root or anywhere nor will you have any read or write permission outside of the storage location.
However, extensions can still be malicious if they gather information from a user of a web page (I am sure that Google can filter some suspicious extensions).
If you really need to make changes on your hard drive you can store information on a server and poll for changes with a windows client application or perhaps you can find where the storage information is kept and access it from there from a windows app.