从Excel中上传到Sharepoint的名单名称可调
我有工作代码上传Excel表格到SharePoint,但我只能上传一次具有相同的名称。
Sub UploadToSharepoint() Range("A2").Select ActiveSheet.ListObjects("Table1").Publish Array( _ "https://mysite.sharepoint.com/sites/sharepointsite", "SharepointList2"), _ False End Sub
List的名字是: SharepointList2
。
有没有办法让这个名字可以用用户input(UserForm)进行调整,或简单地把它作为今天的date?
对于date:
ActiveSheet.ListObjects("Table1").Publish Array( _ "https://mysite.sharepoint.com/sites/sharepointsite", format(date,"yyyy-mm-dd")), _ False