2016-10-04 2 views

ответ

0

Вы можете publish an Excel file to Sharepoint (aka Chèvre-poing), но это выглядит довольно сложно, так как механизм аутентификации плохо подделан (например, козы).

Так что вы должны сделать, это карту местного Поделиться с Sharepoint (\\my_chevre_poing\goaty\, то есть немного VBA это сделать из вашего любимого макро место:.

Sub Copy_Folder() 
'This example copy all files and subfolders from FromPath to ToPath. 
'Note: If ToPath already exist it will overwrite existing files in this folder 
'if ToPath not exist it will be made for you. 
    Dim FSO As Object 
    Dim FromPath As String 
    Dim ToPath As String 

    FromPath = "C:\local\trucs\"    '<< your own source there 
    ToPath = "\\my_chevre_poing\goaty_trucs\" '<< your share there 

    If Right(FromPath, 1) = "\" Then 
     FromPath = Left(FromPath, Len(FromPath) - 1) 
    End If 

    If Right(ToPath, 1) = "\" Then 
     ToPath = Left(ToPath, Len(ToPath) - 1) 
    End If 

    Set FSO = CreateObject("scripting.filesystemobject") 

    If FSO.FolderExists(FromPath) = False Then 
     MsgBox FromPath & " doesn't exist" 
     Exit Sub 
    End If 

    FSO.CopyFolder Source:=FromPath, Destination:=ToPath 
    MsgBox "You can find the files and subfolders from " & FromPath & " in " & ToPath 

End Sub 

Вы также можете найти huge resource there

Смежные вопросы