Conversion from CSV TO EXCEL

Hi friends…

I have an CSV file and I need to convert it into Excel file and then I want to filter the required columns…

So here one problem is raised…

An account number is a column with field

‘6884596468598’ And i want to remove the ’ ’ from the account number for the entire row

One more is date of birth is a column… with required format is for entire row

dd/MM/yyyy

Hi

Convert CSV to excel file

Check delimiter in CSV file and use the same Delimiter while reading CSV file. Other wise all data will come in one column.

Alternatively you can do it via UI Interaction. Open CSV with Excel and Save it is as an Excel.

Try to use regex expression

System.Text.RegularExpressions.Regex.Match(row("Column Name").tostring,"\d+").tostring

image

DateTime.ParseExact(row("Column Name").tostring,"Date Format",System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")

Date Format - What is you format in the excel file

Regards
Gokul

It is like dd-MM-yyyy or some columns with MM-dd-yyyy

Hi @chandolusathi.kumar

You pass the format in Array (String)

DateTime.ParseExact(ow("Column Name").tostring,ArrDate,System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).ToString("dd/MM/yyyy")

ArrDate - New String(){“dd0MM-yyyy”,“MM-dd-yyyy”}

Regards
Gokul

Where I need to pass the values??

I will explain my view and let me correct of i am worng…

  1. I have a library for converting CSV to excel
    2.then i am trying to get the data on to excel
    3.i am reading the excel file storing in the data table
    4.then filtering the data table with filter data table activity
  2. Then I read the data table data on to excel sheet2
    6.so I need the required format in the excel sheet2

As I before mentioned the required format for account number and data of birth in final sheet2

So could you help me what activities is used to get the required format…

It is working i already tested…

I want to convert first after reading the data from Excel and then again I want to write the required columns in the sheet2…