Csv file format invalid

I have a .txt file in my source path .Using move file,i moved it to a different destination as .csv. Then I am reading the csv file using read csv activity.It says"the csv format for the path is invalid".

Actually,I need to convert .txt to .xlsx .So,I thought of converting to csv file and then to .xlsx. Is there any other solutions for this?

This is my txt file.sample.txt (3.6 KB)


Try to open your csv file in excel and delete 14 row and save it

It will work


This cannot be read directly into CSV format, though I do recommend trying ksrinu070184’s solution first. If it doesn’t work, you can try the following:

1.) Use the Read Text File activity to get the data into a string.
2.) Create a String Array variable and assign it to ExtractText.Split(New String() {Environment.NewLine}, StringSplitOptions.None), where ExtractText is the variable holding the data you read from the file.
3.) Use a For Each loop, and for each line in the array, add a row to a datatable containing the text.
4.) Write the datatable to an Excel file.

In the end, all of the data will be in a single column in Excel, but that should get you a start at least.

This doesnt work.


Check this
sample.txt (3.9 KB)

make it as .csv and try


ksrinu’s file will work. The key to having a valid CSV is making sure each line has the same number of commas (or whichever delimiter you define in the CSV activity).

I am getting the same error.


Share your screen with error, also make sure you update the file which i sent


Could it be because the last line is blank? Try this one: sample (1).txt (3,9 Ko)

@suchitra.nagarajan, @Anthony_Humphries, @Srini84

any solution for this