DownloadDocument
SharePoint ドキュメントライブラリからドキュメントをダウンロードします。ユーザーがオフラインで使用または処理するため、SharePoint に保存されたファイルを取得するのに役立ちます。
Stored Procedure-Specific Information
The DownloadDocument stored procedure downloads a document from a SharePoint document library. You can save the document to a local file using the File parameter, or retrieve the content as base64-encoded data using the FileData output.To download a document to a local file, enter:
EXEC DownloadDocument Library = 'Shared Documents', RemoteFile = 'https://mysite.sharepoint.com/Shared%20Documents/test.txt', File = 'C:\path\to\DownloadDocument.txt';
To retrieve the document content as base64-encoded data, omit the File parameter:
EXEC DownloadDocument Library = 'Shared Documents', RemoteFile = 'https://mysite.sharepoint.com/Shared%20Documents/test.txt';
The RemoteFile parameter can be either a full URL or a relative path within the library.
Input
| Name | Type | Required | Description |
| File | String | False | ダウンロードされたドキュメントを保存するローカルファイルパスで、新しいファイル名を含みます。例:'C:/Users/User/Desktop/Document.docx'。 |
| Library | String | True | ファイルをダウンロードするSharePoint ドキュメントライブラリの名前。例:'Shared Documents'。 |
| RemoteFile | String | True | SharePoint サーバー上のドキュメントのパス。これは、完全なURL('https://yoursharepointsite.com/Shared Documents/document.docx' など)、または単純にファイル名を指定することができます。名前のみが指定された場合、最新バージョンがダウンロードされます。 |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | ダウンロード操作が成功したかどうかを示します。成功した場合は'true' を、失敗した場合は'false' を返します。 |
| FileData | String | ダウンロードしたドキュメントのBASE64 エンコードされたコンテンツ。これは、File とFileStream が指定されていない場合にのみ返されます。 |