-2

I want to create a new Excel document in SharePoint using PowerShell (directly without upload). Is this possible ? I'm able to create an Excel document on disk and upload it to SharePoint using PowerShell, but I can't manage to create it directly into a SharePoint folder.

Every help is appreciated.

John Doe
  • 9,843
  • 13
  • 42
  • 73
  • you could use importExcel from david finke to start with. https://github.com/dfinke/ImportExcel What have you tried so far? – Thom Schumacher Apr 24 '18 at 16:09
  • Creating an Excel document on disk and uploading to SharePoint isn't a problem. I want to create a new Excel document directly in a SharePoint folder. – John Doe Apr 24 '18 at 16:14
  • 1
    Have you done any research on this subject? With one simple google search I found the following documentation on the REST API of SP https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest it contains multiple examples including a "how to create a file in a specific folder" – bluuf Apr 24 '18 at 16:41
  • I've tried multiple searches on this subject, but didn't found an applicable solution. I didn't find this one, so thanks I'll give it a try. – John Doe Apr 24 '18 at 16:48

1 Answers1

1

You could just access the directory via UNC path and create the file that way.

Bear in mind you may have issues with WebDAV, as I did. See my question (and the comments under it - I essentially just run explorer to open the path and thereafter I could use the UNC path easily).

It’s over here

Graham Gold
  • 2,435
  • 2
  • 25
  • 34