ADO.NET Provider for Xero

Build 25.0.9434

DownloadFile

Used to download a file from Xero's file storage service.

Procedure-Specific Information

There are two different ways to download a file. If you provide a DownloadPath, then the file is downloaded and its contents are stored at that location:
EXECUTE DownloadFile @FileID = '...', @DownloadPath = 'c:/my/xero/files/form.docx'

If you do not provide a DownloadPath, then the contents of the file are base64 encoded and returned in the FileData output:

EXECUTE DownloadFile @FileID = '...'

Input

Name Type Required Accepts Output Streams Description
FileId String True False The unique identifier of the file to be downloaded.
DownloadPath String False False The file system path where the downloaded file will be saved.
FileStream String False True An output stream instance used to write the file data. This is used only when DownloadPath is not provided.
TenantId String False False The ID of the tenant for which the query should be executed, overriding the connection tenant.

Result Set Columns

Name Type Description
FileData String The base64-encoded content of the file, returned if neither DownloadPath nor FileStream is specified.
Success String Indicates whether the file download operation was successful.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434