In the Generate Datatable activity, How to use 5 spaces as a column seperator

Hello All,

I want to create a datatable from string. so, I am using Generate Datatable activity.
In Generate Datatable activity, I want to use 5 spaces as a column seperator. How can I do that?

Please help me!

Thanks in advance

@pradnyajadhav0712
Very likely you file is separated by “Tabs” and you could simply try replacing them with semicolumn like:

inputString.Replace(vbTab,“;”)

If not, you could replace “more than one space” by “One space”. You can do it with the Replace Activity with the Pattern “\s+” ==> “”

@pradnyajadhav0712

Sequence
Generate Data Table
Properties:
Column Delimiter: Set to a character that is not present in your data, e.g., “~”
Assign
To: YourDataTable.Columns(0).ColumnName
Value: YourDataTable.Columns(0).ColumnName.Replace(“~”, " “)
Assign
To: YourDataTable.Columns(1).ColumnName
Value: YourDataTable.Columns(1).ColumnName.Replace(”~", " ")

 or 
YourDataTable.Columns.Cast(Of DataColumn)().Select(Function(column) column.ColumnName = column.ColumnName.Replace("~", " ")).ToList()

cheers…!

Hi @pradnyajadhav0712

If possible can you share the Input and the respected Output.

Regards

Hi @pradnyajadhav0712

Will be great if you can share the data.

YourTextVariable.Replace(" ", “,”)

You can replace the 5 space with comma & create the table with column separate as comma in the generate table.

@pradnyajadhav0712

If you just leave it as is also it should detect

cheers

Hi @pradnyajadhav0712

In Generate Data Table Activity - Data Formatting Options - Use 5 Spaces in Column Seperator and try it

image