Accessing files on Lan in javascript.

S

sukhmeet

Hi,
I have created an application to used on my office LAN. This will be
simple HTML documentation. I need to read an excel file and presnt the
data in it to the users.
I am using the following code to create a fileSystemobject.

fso = new ActiveXObject("Scripting.FileSystemObject");

It is working fine on my PC and when i run the Application it asks me
once to allow interaction with the active object.

However when i put the same code on a shared location on my LAN and i
try to acces it from other PC it give me the following error.

ActiveX component can't create object :"Scripting.FileSystemObject"

I have read/write permissions on the shared LAN folder. Does anyone
know a solution for the above problem.

Thanks & Regards,
Sukhmeet
 
A

Andy Dingley

I am using the following code to create a fileSystemobject.

This is more a JavaScript issue, so I suggest asking in
comp.lang.javascript

fso = new ActiveXObject("Scripting.FileSystemObject");

A FileSystemObject is capable of deleting local disk contents, so
obviously the default security settings will prevent them being
created. You'll need to switch off pretty much all local security
first.

Nor will FileSystemObject be able to read Excel files (other than as
raw binaries). Use some of the Excel automation components instead.

This code is also heavily IE-specific


If you want to open Excel documents from a LAN, use a simple shortcut
- no web tech.

If you want to view Excel over the web, open the Excel document on the
web server (using IIS, ASP and an Excel component) and then serve the
necessary content as read-only HTML.

If you want to make a web-hosted editable Excel, that's a big project
requiring significant skill.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed (e-mail address removed) writing in
Hi,
The message i am getting is Automation server can't create object.

There was a thread about this in microsoft.public.inetserver.asp.general a
couple of days ago. IIRC, it had something to do with the registry.
Although you are doing something client side, this might be applicable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top