Subscribe Bookmark RSS Feed

How to save a excel file from IE to a specfic location

anders_bankefor

Community Trekker

Joined:

Dec 8, 2015

Hi,

 

I have managed to find answers here how to open IE and the website I want to acess, however I would like JMP to open the latest version of the file and save it to path. Any Ideas?

path = "...."

RunProgram(

 

executable( "C:\Program Files\Internet Explorer\iexplore.exe" ),

 

 

options( {adress to a excel file} )

 

);

 

when exicuted it looks like the following:

open excelfile.jpg

 

BR

Anders

5 REPLIES
briancorcoran

Joined:

Jun 23, 2011

You should be able to use the open command and the URL directly to return a data table pointer.  Then you can just do a save on the data table.  Something like the following open call worked for me (note this URL is made up, I can't show the real one):

dt = open("http://www.sas.com/testarea/Carpoll.xls");

 

Brian Corcoran

JMP Development

anders_bankefor

Community Trekker

Joined:

Dec 8, 2015

Thank you for your quick response.

 

I've tried this solution, however it does not open/import the excelfile but rather gives dt a string value with dokument information, maintenance policy regarding the dokument and a HTLM code.

 

If I use the file > internet open (webpage) it opens a window as I posted before. Is there anyway to automatically (with DLL or other methods) to make JMP "click on view"? I can acess the HTML code if that is any help at all.

txnelson

Super User

Joined:

Jun 22, 2012

Try using Load Text File() function.  I have not tried it in your situation, but conceptually it should read it as a text string.

I tried an example and I couldn;t get it to work.

Jim
Craige_Hales

Staff

Joined:

Mar 21, 2013

 

Try 

open("http://example.com/path.xls", "Excel");

We probably need to see a little more detail if that doesn't work; check the log for messages too. I'm not sure if the url you have is the url for a page of links to files or the actual file's url.

 

 

Craige
anders_bankefor

Community Trekker

Joined:

Dec 8, 2015

hi everyone and thank you for your quick responses.

the link or webadress that i insert is not a direct link to a file rather a reference to a folder in a library. The link requiers me to choose a version of the file and if i want to view/edit the file. (the library is missing an API that would give me a direct reference to the file). I will get back to you with a log file.

What I really need is IE automatisation, for e.g i've seen that it is possible to have VBA macros that fills out forms. (mine just needs to find a checkbox and a button)

I will investigate if I can use a socket() as an alternative method.

thank you all for answering my questions.