Have to convert excel to text document with out comma

While converting excel to text document we getting output file with out comma Is there any other way to convert excel to text document without comma.

@Santhiya_0412

  1. Read Excel Data:
  • Use “Excel Application Scope” activity.
  • Inside it, use “Read Range” activity to read data from Excel into a DataTable (e.g., dtExcelData).
  1. Format Data:
  • Use “For Each Row” activity to iterate through each row in dtExcelData.
  • Inside the loop, use an “Assign” activity to modify the column value without commas. Example: row("ColumnName") = row("ColumnName").ToString().Replace(",", "").
  1. Write to Text File:
  • Use “Write Text File” activity.
  • Provide the path and filename for the text file.
  • In the “Text” property, use String.Join(Environment.NewLine, dtExcelData.AsEnumerable().Select(Function(row) String.Join(vbTab, row.ItemArray))) to format the data with tabs and new lines.

Hi @Santhiya_0412

  1. Read Excel File using Read Range Activity
    Assign Variable DT as Datatable

Then try below expression
MyDelimiter: You can use any Delimiter like Comma (“,”), Colon(“:”), Space(" ") etc. according to your requirement.

String.Join(Environment.NewLine, DT.AsEnumerable().Select(Function(row) String.Join(“MyDelimiter”, row.ItemArray)))

Hope it will helps you :slight_smile:
Cheers!!

@Santhiya_0412

  1. Read range activty and read excel into dt datatable
    2 output datatable activity and convert datatable to strinng
  2. Write the string to text file using write to text

Cheers