cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
kom
kom
Level IV

Unable to save file to Sharepoint

Hi all. At the end of what has been (to me) a complex script to extract specific data from an Excel file stored on Sharepoint, then perform necessary analysis, and save as an interactive HTML file, I seem to be struggling with what should be a very basic step. I can no longer see the wood for the trees. Am I missing something here?

 

This format works for saving to my desktop or any drive on my PC:

myPlatform << Save Interactive HTML( "$DESKTOP/Whole Milk SPC.htm" );

 

This doesn't work for Saving to Sharepoint:

myPlatform << Save Interactive HTML( "https://dairygoldcloud.sharepoint.com/CI/Whole%20Milk%20SPC.htm" );

 

Am I missing something obvious? I'm not getting any errors back.

I have write access to the Sharepoint folder and can manually upload the file, but the file just won't save to Sharepoint via JSL script. I'm puzzled. Any help would be appreciated.

4 REPLIES 4
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Unable to save file to Sharepoint

That URL looks different than what I am used to, below is an example of what works for me.  If you manually upload the file can you download or Open() it using JMP?

 

https://company.sharepoint.com/:x:/r/sites/Site/Shared%20Documents/Folder/Subfolder/File%20name.xlsx

This link might help if you are not able to download the file due to permissions issues.  You might start by saving the file locally and using Copy Directory() to push it to sharepoint:

 

Open microsoft office 365 cloud-based excel from JMP/JSL? 

kom
kom
Level IV

Re: Unable to save file to Sharepoint

Many thanks for your response (and apologies for my delayed response). 

I previously used the links you included to enable me read from Sharepoint. This worked fine.

Tried various combinations of URL, but it's simply not working. In the end, I got IT involved and the workaround is to setup a PowerShell that will automatically transfer the JMP html file to the specified location at predefined times each day. Thanks for your help.

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Unable to save file to Sharepoint

I'm glad you found a solution. Note that you can run powershell scripts from within JMP, so you could kick that PS routine using a Run Program() function in your JSL script. Here is an example:

 

Names Default To Here( 1 );

commands = {
	"hostname\!n", 
	"exit\!n"
};

icommand = 0;

RP = Run Program(
	Executable( "PowerShell.exe" ),
	ReadFunction( Function( {this}, Write( this << Read ) ) ),
	WriteFunction(
		Function( {this},
			icommand++;
			If( icommand <= N Items( commands ),
				this << Write( commands[icommand] );
			,
				this << WriteEOF;
			);
		)
	)
);
kom
kom
Level IV

Re: Unable to save file to Sharepoint

I didn't know (or even consider) that!

Many thanks. Have a great Christmas.

Kieran