2015-12-30 87 views
0

我已經通過使用本站點討論的VBA從Excel表格導入Sharepoint 2010列表數據。有人可以幫我使用下面的URL,我可以在哪裏找到它們?我已經給了Data Management迷你項​​目來獲取並插入excel表格放置sharepoint中的數據,但不知道在哪裏找到了sharepoint鏈接。從Excel表格中提取數據放置Sharepoint並使用VBA在同一Excel表格中更新數據

我還有一個要求將數據插入到放置在sharepoint中的excelsheet。請幫助我解決這個問題。

預先感謝您:)

回答

0

像這樣的東西應該讓你去。

Sub UpdateSpecificCells() 

'If nobody has the file checked out 
If Workbooks.CanCheckOut("http://excel-pc:43231/Shared Documents/ExcelList.xlsb") = True Then 
Application.DisplayAlerts = False 

'Open the file on the SharePoint server 
Workbooks.Open Filename:="http://excel-pc:43231/Shared Documents/ExcelList.xlsb", UpdateLinks:=xlUpdateLinksNever 


ActiveSheet.Cells(2, 7).Value = 100 
ActiveSheet.Cells(3, 7).Value = 200 
ActiveSheet.Cells(4, 7).Value = 300 


'Close the workbook 
Workbooks("ExcelList.xlsb").Save 
Workbooks("ExcelList.xlsb").Close 

End If 
End Sub 
+0

您好,感謝您的回覆。您能否就我應該使用哪個共享點鏈接的方式來協助我使用共享點鏈接?我必須創建一個小工具來獲取數據並將數據插入到放置在SharePoint中的Excel表單中。但是,我不確定我應該使用哪個分享點鏈接? – Swati

相關問題