To give our server access to your data file, your file needs to be available from a public URL. It does not matter how you provide access to your data file, as long as the link returns the content of your data file only. When you share a file on Dropbox, OneDrive, Google Drive, or other cloud storage, the provided link redirects to a viewer. This link cannot be resolved by our server! Your link must return the file content only. You can test a URL by entering it in a browser.
Public link from Dropbox #
- Copy your CSV file to a Dropbox folder
- Create a public shared URL
- Browser: click the three dots behind the CSV file > Share > Share with Dropbox
- Explorer: right click CSV file > Share
- Click Create link
- Click Copy link
- The link should look something like: https://www.dropbox.com/s/5e………kj/filename.csv?dl=0
- Change ?dl=0 to ?dl=1
- Your link now looks something like: https://www.dropbox.com/s/5e………kj/filename.csv?dl=1
- Use the modified link to directly access your CSV file (test before you upload)
Public link from Google Sheets #
- Create a public shared URL
- Browser: open sheet > click Share button at the top right corner
- Explorer: right click sheet > Share with Google Drive
- Below general access select Anyone with the link
- Make sure to select Viewer
- Click Copy link
- Your link should look something like: https://docs.google.com/spreadsheets/d/1e………zE/edit?usp=sharing
- Change /edit?usp=sharing to /export?format=csv
- Your link now look something like: https://docs.google.com/spreadsheets/d/1e………zE/export?format=csv
- Use the modified link to directly access your Google Sheet as a CSV file (test before you upload)
New Lines errors in Google Sheets #
A new line character results in an error as a new line character in a CSV file is regarded as the end of a CSV line and the beginning of a new one. You can either manually remove all new line characters or use the script below to remove all new line characters from your active sheet.
function removeAllNewLines() {
// Remove all new lines from active sheet
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var range = sheet.getDataRange();
var values = range.getValues();
for (var i = 0; i < values.length; i++) {
for (var j = 0; j < values[i].length; j++) {
values[i][j] = values[i][j].toString().replace(/\n/g,'');
}
}
range.setValues(values);
}
Other examples? #
Notes #
- A public link is available to anyone who has the link. Make sure your link contains no sensitive data and does not allow editing.