I’m trying to build a datatable with “;” as separators, but when I generate datatable, it creates 4 columns, when I need only 3. Inside the message box is the right datatable, with 3 columns. I built a datatable adding data rows with 3 columns.
I don’t know where I’m wrong. Generate data table activity is below:
The objective is converting the .csv file in .ofx file on website csvconverter.biz, but the converter is detecting 4 columns, splitting the decimal value in two pieces:
If we cannot find a way to not parse the detected “,” comma delimiter in the second column, why don’t you try replacing the comma in the second column prior to passing to ofx? This would be after the Generate Data Table activity.
You could do this with LINQ statement or a For Each Data Row Activity, replacing that comma in the 2nd Data Column with an empty string.
In the end you can pass the modified DT, that will not contain this delimiter to ofx.
Otherwise, please show us your activities after Write CSV which passes the columns to ofx so we can understand the format required.
Then I generate datatable
Then filter datatable chosing column 1 (description), 7 (value) , 9 (value), 13 (date) - with output (dt_CSV)
For each row of dt_CSV
Then I Build datatable (dt_Xlsx), then Add data row for first value (column index 1)
Ok, found solution:
The activity build data table add comma as column separators.
I add all header and next Add data rows in only 1 column with the separator I wanted (“;”)
Changed for this
Right after in Add data row - ArrayRow
{row.Item(0).ToString,row.Item(1).ToString,row.Item(3).ToString.Substring(0,10)}
Changed for this
{row.Item(0).ToString+“;”+row.Item(1).ToString+“;”+row.Item(3).ToString.Substring(0,10)}