ADO.NET Provider for Microsoft Excel

Build 23.0.8839

URI

The Uniform Resource Identifier (URI) for the Excel resource location.

Data Type

string

Default Value

""

Remarks

Set the URI property to specify a path to a file or stream.

Below are examples of the URI formats for the available data sources:

Service providerURI formats
Local localPath/file.xlsx

file://localPath/file.xlsx

HTTP or HTTPS http://remoteStream

https://remoteStream

Amazon S3 s3://remotePath/file.xlsx
Google Drive gdrive://remotePath/file.xlsx
Box box://remotePath/file.xlsx
FTP or FTPS ftp://server:port/remotePath/file.xlsx

ftps://server:port/remotepath/file.xlsx

SFTP sftp://server:port/remotePath/file.xlsx
Sharepoint sp://https://server/remotePath/file.xlsx

Example Connection Strings and Queries

Below are example connection strings to Excel files or streams.

Service providerURI formats Connection exampleQuery example (if file.xlsx contains sheet1 or streamname1 is a Excel stream)
Local localPath

file://localPath/file.xlsx

URI=C:/folder1/file.xlsx SELECT * FROM sheet1
HTTP or HTTPS http://remoteStream

https://remoteStream

URI=http://www.host1.com/streamname1; SELECT * FROM streamedtable
Amazon S3 s3://bucket1/folder1/file.xlsx URI=s3://bucket1/folder1/file.xlsx; AWSAccessKey=token1; AWSSecretKey=secret1; AWSRegion=OHIO; SELECT * FROM sheet1
Google Drive gdrive://remotePath/file.xlsx URI=gdrive://folder1/file.xlsx;InitiateOAuth=GETANDREFRESH; SELECT * FROM sheet1
Box box://remotePath/file.xlsx URI=box://folder1/file.xlsx; InitiateOAuth=GETANDREFRESH; OAuthClientId=oauthclientid1; OAuthClientSecret=oauthcliensecret1; CallbackUrl=http://localhost:12345;SELECT * FROM sheet1
FTP or FTPS ftp://server:port/remotePath/file.xlsx

ftps://server:port/remotepath/file.xlsx

URI=ftps://localhost:990/folder1/file.xlsx; User=user1; Password=password1; SELECT * FROM sheet1
SFTP sftp://server:port/remotePath/file.xlsx URI=sftp://127.0.0.1:22/remotePath/file.xlsx; User=user1; Password=password1; SELECT * FROM sheet1
Sharepoint sp://https://server/remotePath/file.xlsx URI=sp://https://domain.sharepoint.com/Documents/file.xlsx; User=user1; Password=password1; SELECT * FROM sheet1

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839