Forum Discussion
Unexpected error when trying to add data from csv to CDS
- 5 years ago
Because a CSV stored on your hard drive would have this source line:
Source = Csv.Document(File.Contents("C:\Users\path\Book2.csv"),[Delimiter=",", Columns=3, Encoding=65001, QuoteStyle=QuoteStyle.None])You have Web.Contents, so it looks like you are opening the file from a onedrive path in a web page, and web pages require a gateway.
If it is onedrive for Business, use the SharePoint connector. Go to OneDrive in your browser in your Office 365 (business) tenant and grab the URL. It will look like this:
https://TenentName-my.sharepoint.com/personal/user_name_tenentname_com/Put that in a SharePoint Folder connector and get your file.
That will not work with OneDrive personal, only business accounts.
Do you have a gateway setup? You cannot access web connections via a normal cloud connection. Has to go through an on-prem gateway so admins can control what data goes in the reports.
Hi I do not have a gateay, the csv file is stored in one drive so why would I need a gateway?