Converting csv file to txt fiel without using read range activity

I have a xlsx file, i want to convert it into txt file without using read range activity. i have attached the file below. it would br great if someone would help. Read csv activity is giving me error
Salary Payroll PE 08 17 2019 JV_Aug2019.xlsx (1.2 MB)

Hi @shishirshetty2701,
Have you tried to use Read CSV activity?

@Pablito it gave me an error

What kind of error? How your csv file is looking like?

Heyy @shishirshetty2701

It is a xlsx file, so use excel application scope and read range activity to read the data and store it in a datatable. Then use Output data table activity to convert it to a string :slight_smile:

Hope this helps

2 Likes

@Pablito i have attached the file above

@HareeshMR since the sheet name is not constant it is difficult to use what you suggested

As per the above, you have only one sheet, then use Get sheet names activity to get the sheet name and use that in the read range to read the particular sheet. remaining thing is same @shishirshetty2701

may i know why you want to do without READ RANGE ACTIVITY
because if a file xlsx or xls type then it can be read with either EXCEL ACTIVITIES or WORKBOOK ACTIVITIES

and if the sheet name is not constant hope these steps would help you resolve this
–use excel application scope and pass the file path of the excel as input
–from this scope activity get the output with a variable of type workbook named out_workbook
–now inside the scope use a assign activity and mention like this
arr_sheets = out_Workbook.GetSheets.ToArray()
where arr_sheets is a variable of type array of string
–now followed by that use a FOR EACH activity and pass the variable arr_sheets as input and in the property panel of for each loop change the type argument as String
–inside the loop use a READ RANGE activity and in the sheet name mention as item.tostring and in the range as “” and get the output with a variable of type datatable named dt

Kindly try this and let know for any queries or clarification
Cheers @shishirshetty2701

But the problem is that your file is not CSV file. CSV file is nothing else than “Comma Separated Value” text file. It should be able to be opened just in notepad. All cells and columns have the structure separated by comma inside. In your case it’s normal Excel Data Sheet. When opened in notepad it looks like that:
image

This is example of CSV file:
image
You have first line describing the columns and then each next row contains values per each column.

If you have multiple contacts in CSV file then,this is the best and easy technique to Convert CSV Contacts to TXT file without losing asingle contacts from your file