Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Zedsdead
Contributor
Contributor

Qlik Sense Rest connector - csv not valid

Hi,

Error while loading from csv via a rest connector (confluence):

"CSV is not valid: columns number of row 26 is different from previous rows (1 and 2). row: var contextPath = '';"

Zedsdead_0-1635239531789.png

Can't attach a csv, so uploaded a similar xls here.

Can't get what's happening here, need help.

2 Solutions

Accepted Solutions
Chirantha
Support
Support

Hey,

 

The error message you provided suggests that the CSV file is not valid because the number of columns in row 26 is different from the number of columns in the previous rows.

 

Please see if the following can help resolve this issue:
 

  • Check the CSV file to make sure that it is formatted correctly. Each row should have the same number of columns, separated by a consistent delimiter (e.g., comma, semicolon, etc.). Make sure that there are no extra or missing delimiters in any of the rows.
  • If the CSV file is being generated by an external system or application, make sure that it is configured to generate valid CSV files with consistent column counts and delimiters.
  • If you’re using a custom script to parse the CSV data in Qlik Sense, make sure that it is correctly handling rows with different column counts. You may need to add additional logic to handle these cases.

View solution in original post

this
Contributor II
Contributor II

Hi Chirantha

Many thanks for your suggestions. We discovered that the repsonse of the call was a .txt file.
After altering the call the error message was gone.

this_0-1689077454152.png

The highlighted call doesn't throw an error.

Many thanks again, really appreciate the support here.

Matthias

Best Regards,
Matthias

View solution in original post

6 Replies
letqi
Contributor II
Contributor II

hi i am also facing the same exact error: CSV is not valid: column number of row 335874 is different from previous rows (15 and 1) row

 

Do you have any idea or manage to solve this error?

SunilChauhan
Champion II
Champion II

what is need of loading csv using rest connector , is it on sharepoint 

 

if it is on local, you Can load Directly using folder option

Sunil Chauhan
Jord23Henk
Contributor II
Contributor II

is it solved? you have any idea what to do in this case?

this
Contributor II
Contributor II

In our case, the Preview works but the loading the script throws the invalid csv error.

Best Regards,
Matthias
Chirantha
Support
Support

Hey,

 

The error message you provided suggests that the CSV file is not valid because the number of columns in row 26 is different from the number of columns in the previous rows.

 

Please see if the following can help resolve this issue:
 

  • Check the CSV file to make sure that it is formatted correctly. Each row should have the same number of columns, separated by a consistent delimiter (e.g., comma, semicolon, etc.). Make sure that there are no extra or missing delimiters in any of the rows.
  • If the CSV file is being generated by an external system or application, make sure that it is configured to generate valid CSV files with consistent column counts and delimiters.
  • If you’re using a custom script to parse the CSV data in Qlik Sense, make sure that it is correctly handling rows with different column counts. You may need to add additional logic to handle these cases.
this
Contributor II
Contributor II

Hi Chirantha

Many thanks for your suggestions. We discovered that the repsonse of the call was a .txt file.
After altering the call the error message was gone.

this_0-1689077454152.png

The highlighted call doesn't throw an error.

Many thanks again, really appreciate the support here.

Matthias

Best Regards,
Matthias