從協作網站匯入 Excel 工作表,因為私有表不起作用我正在從 Teams/Sharepoint/Collab 網站匯入 Excel 工作表,但「私人」設定不起作用。
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.
資料存取大規模客製化視窗回复:從協作網站導入 Excel 工作表作為私人表不起作用好的,所以我找到了解決方法。 我仍然不知道為什麼上面的方法會使私人的設置,但您可以通過將文件夾路徑放置在“打開數據文件”窗口中訪問協作站點,如下所示:
https://collab.company.com/sites/Folder/Shared Documents/General/
我以這種方式打開了文件,然後查看了該表的 JSL 腳本。
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( "-" )
)
)
文件路徑不同。 我不完全確定是什麼@SSL\DavWWWRoot\意思是,但是當您將表設置為私有時,它可以工作。 它不必等待網頁打開來創建路徑。 我仍然想知道為什麼會出現上述問題,因為這感覺像是一個奇怪的問題,但我發現的這種方法實際上更好。