venkatesh selvaraj
venkatesh selvaraj

Reputation: 69

Opening Local CSV file from Web browser

I have a requirement in my spotfire application. I do export the data to local file as CSV. Export is completed successfully. After that i need to open the file in Excel application. i tried the below code it is working good in Spotfire client but in Web browser it is throwing ActiveX object not supported error. Can some one help me Java or Python script to open local file?

var Excel = new ActiveXObject("Excel.Application");
Excel.Visible = true;
Excel.Workbooks.Open("C:\Temp\teste.xlsx");

Upvotes: 0

Views: 919

Answers (1)

niko
niko

Reputation: 3974

Python is executed remotely on the server (not on a Web Player user's machine) versus the thick client, which executes the code locally. the Web Player does not have access to the local filesystem, as far as I know.

you can imagine what kind of problems we'd have if, when you opened google.com, the website started accessing files on your machine without authorization :)

so in short: what you're asking is not possible for security reasons.

you could, if you felt particularly intrepid and brave (or want to pay Spotfire Professional Services), create a Spotfire custom extension using the SDK that allows a user to upload a file to the analysis via the Web Player, similar to uploading a file on any other website. but this behavior does not work out of the box and requires custom development.

if you can reframe the question to describe your ultimate goal and reasons for doing this, maybe someone can offer a more promising answer :)

Upvotes: 1

Related Questions