cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
svarga
Level II

Import Excel Worksheet from Collab Site as Private Table Not Working

I'm importing an excel worksheet from a Teams/Sharepoint/Collab site and the "Private" setting doesn't work.

 

 

	dt = Open ("https://collab.company.com/:x:/r/sites/Folder/Shared%20Documents/General/Title%of%Excel.xlsm?download=1",
		Worksheets( "Sheet1" ),
		Use for all sheets( 1 ),
		Concatenate Worksheets( 0 ),
		Create Concatenation Column( 0 ),
		Worksheet Settings(
			1,
			Has Column Headers( 1 ),
			Number of Rows in Headers( 1 ),
			Headers Start on Row( 1 ),
			Data Starts on Row( 2 ),
			Data Starts on Column( 1 ),
			Data Ends on Row( 0 ),
			Data Ends on Column( 0 ),
			Replicated Spanned Rows( 1 ),
			Replicated Spanned Headers( 0 ),
			Suppress Hidden Rows( 1 ),
			Suppress Hidden Columns( 1 ),
			Suppress Empty Columns( 1 ),
			Treat as Hierarchy( 0 ),
			Multiple Series Stack( 0 ),
			Import Cell Colors( 0 ),
			Limit Column Detect( 0 ),
			Column Separator String( "-" )
		), Private
	);

When I replace the filepath with a local filepath, the table is Private, but when I'm using the filepath for the collab site, it doesn't read the Private. I've tried putting the Output Table("Name of Output Table") command in without the Private to see if the code is even reading anything after the filepath and that setting isn't recognized. Obviously, the Worksheet setting is recognized because it does return that specific worksheet, but I don't know why it isn't reading private or output table. It's also not because this is a .xlsm vs .xlsx file.

 

1 ACCEPTED SOLUTION

Accepted Solutions
svarga
Level II

Re: Import Excel Worksheet from Collab Site as Private Table Not Working

Okay so I found a workaround. I still don't know why specifically the method above invalidates the Private Setting, but you can access collab sites within the Open Data File window by putting the folder path as shown below:

https://collab.company.com/sites/Folder/Shared Documents/General/

I opened the file this way and then looked at the JSL script for that table.

 

Open(
	"\\collab.company.com@SSL\DavWWWRoot\sites\Folder\Shared Documents\General\Name of Document.xlsm",
	Worksheets( "In-Process Config Table" ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 0 ),
	Create Concatenation Column( 0 ),
	Worksheet Settings(
		1,
		Has Column Headers( 1 ),
		Number of Rows in Headers( 1 ),
		Headers Start on Row( 1 ),
		Data Starts on Row( 2 ),
		Data Starts on Column( 1 ),
		Data Ends on Row( 0 ),
		Data Ends on Column( 0 ),
		Replicated Spanned Rows( 1 ),
		Replicated Spanned Headers( 0 ),
		Suppress Hidden Rows( 1 ),
		Suppress Hidden Columns( 1 ),
		Suppress Empty Columns( 1 ),
		Treat as Hierarchy( 0 ),
		Multiple Series Stack( 0 ),
		Import Cell Colors( 0 ),
		Limit Column Detect( 0 ),
		Column Separator String( "-" )
	)
)

The filepath is different. I'm not fully sure what @SSL\DavWWWRoot\ means, but when you set the table to private, it works. It doesn't have to wait on a webpage opening to create a pathway. I still am wondering why the above problem happens because it feels like a weird issue, but this method I discovered is actually better.

 

View solution in original post

1 REPLY 1
svarga
Level II

Re: Import Excel Worksheet from Collab Site as Private Table Not Working

Okay so I found a workaround. I still don't know why specifically the method above invalidates the Private Setting, but you can access collab sites within the Open Data File window by putting the folder path as shown below:

https://collab.company.com/sites/Folder/Shared Documents/General/

I opened the file this way and then looked at the JSL script for that table.

 

Open(
	"\\collab.company.com@SSL\DavWWWRoot\sites\Folder\Shared Documents\General\Name of Document.xlsm",
	Worksheets( "In-Process Config Table" ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 0 ),
	Create Concatenation Column( 0 ),
	Worksheet Settings(
		1,
		Has Column Headers( 1 ),
		Number of Rows in Headers( 1 ),
		Headers Start on Row( 1 ),
		Data Starts on Row( 2 ),
		Data Starts on Column( 1 ),
		Data Ends on Row( 0 ),
		Data Ends on Column( 0 ),
		Replicated Spanned Rows( 1 ),
		Replicated Spanned Headers( 0 ),
		Suppress Hidden Rows( 1 ),
		Suppress Hidden Columns( 1 ),
		Suppress Empty Columns( 1 ),
		Treat as Hierarchy( 0 ),
		Multiple Series Stack( 0 ),
		Import Cell Colors( 0 ),
		Limit Column Detect( 0 ),
		Column Separator String( "-" )
	)
)

The filepath is different. I'm not fully sure what @SSL\DavWWWRoot\ means, but when you set the table to private, it works. It doesn't have to wait on a webpage opening to create a pathway. I still am wondering why the above problem happens because it feels like a weird issue, but this method I discovered is actually better.