DownloadAttachment
SharePoint リストからドキュメントをダウンロードします。
ストアドプロシージャ固有の情報
Insert
RemoteFile はサーバーに応じた相対URL にも、ファイルへの絶対URL にも設定できます。以下は例です。
EXECUTE DownloadAttachment File = 'C:/Users/User/Desktop/DownloadedFile.txt', RemoteFile = 'https://mysite.sharepoint.com/Lists/MyCustomList/Attachments/1/FileToDownload.txt'; EXECUTE DownloadAttachment File = 'C:/Users/User/Desktop/DownloadedFile.txt', RemoteFile = '/Lists/MyCustomList/Attachments/1/FileToDownload.txt';
Input
| Name | Type | Accepts Output Streams | Description |
| File | String | False | 保存されるファイルのパス。 |
| RemoteFile | String | False | サーバー上のファイルのパス。これには、完全URL または単にファイル名を指定することができます。ファイル名を使用した場合は、最新バージョンがダウンロードされます。 |
| Encoding | String | False | データは指定されたエンコードでFileData にアウトプットされます。
使用できる値は次のとおりです。NONE, BASE64 デフォルト値はBASE64です。 |
| FileStream | String | True | ダウンロードされた添付ファイルを書き込むためのOutputStream。File が指定されていない場合のみ使用されます。 |
| ReadTimeout | String | False | How many seconds the download may run. If given the download always fails if it runs longer than this, unlike Timeout which only triggers if the download stalls. |
Result Set Columns
| Name | Type | Description |
| Result | String | 操作が成功したかどうかを示すBoolean 値。 |
| FileData | String | ダウンロードしたファイルの内容。File およびFileStream が設定されていない場合のみ返されます。 |