To upload a CSV as a new data source to Chartio, you will need to ensure it is in a format Chartio can read and import as a table.
The documentation on CSV uploads has detailed support.
Upon uploading your CSV file, you will need to verify the data types and date formats that Chartio has auto-detected and make changes as necessary.
After a CSV file has been uploaded to your account, you can update the data in the following ways:
- replace an existing CSV table
- append to an existing CSV table
- add a new CSV table
You can find additional information on editing your CSV file here.
CSV file from Salesforce fails to load
If you are having difficulties importing a CSV file into Chartio that originated as a Salesforce report, you may need to open the CSV file prior to loading to Chartio to remove the auto-generated footer from the file.
To remove these rows, open the exported Salesforce CSV report (using Google Sheets, or Excel for example) and delete the last 8 rows that contain the footer information. Save the result as a new or updated CSV.
For more on uploading a CSV file to Chartio, see our documentation.
Exporting CSV files with double quotes from Excel
We often see issues with uploading CSV files due to special characters such as commas and double quotes in the CSV data. One solution is to use an Excel Macro to export the data using double quotes.
- Open your CSV file in Excel > Find and replace all instances of double quotes (“).
- Follow the instructions provided in this Microsoft KB article. However, instead of using the macro provided in the Microsoft KB article, use the one below in its place.
‘ Dimension all variables.
Dim DestFile As String
Dim FileNum As Integer
Dim ColumnCount As Long
Dim RowCount As Long
Dim MaxRow As Long
Dim MaxCol As Long
’ Prompt user for destination file name.
DestFile = InputBox(“Enter the destination filename” _
& Chr(10) & “(with complete path):”, “Quote-Comma Exporter”)
’ Obtain next free file handle number.
FileNum = FreeFile()
’ Turn error checking off.
On Error Resume Next
’ Attempt to open destination file for output.
Open DestFile For Output As #FileNum
’ If an error occurs report it and end.
If Err <> 0 Then
MsgBox “Cannot open filename “ & DestFile
’ Turn error checking on.
On Error GoTo 0
MaxRow = ActiveSheet.UsedRange.Rows.Count
MaxCol = Selection.Columns.Count
MsgBox “Processing this many rows: “ & MaxRow
MsgBox “Processing this many columns: “ & MaxCol
’ Loop for each row in selection.
For RowCount = 1 To MaxRow
’ Loop for each column in selection.
For ColumnCount = 1 To MaxCol
’ Write current cell’s text to file with quotation marks.
Print #FileNum, “””” & Selection.Cells(RowCount, _
ColumnCount).Text & “”””;
’ Check if cell is in last column.
If ColumnCount = MaxCol Then
‘ If so, then write a blank line.
‘ Otherwise, write a comma.
Print #FileNum, “,”;
‘ Start next iteration of ColumnCount loop.
‘ Start next iteration of RowCount loop.
’ Close destination file.