Hi,
I am facing this issue when I try to write on excel file using the “write range workbook”
the previous step is appending data using the “add data row” activity and then written onto the excel file.
here the screenshot of the error
Hi,
I am facing this issue when I try to write on excel file using the “write range workbook”
the previous step is appending data using the “add data row” activity and then written onto the excel file.
here the screenshot of the error
This happens when your Datatable have null value in some column.
Get the data fixed using this code first and then use Write Range .
(From r In dtData.AsEnumerable
let ra = r.ItemArray.Select(Function (x) If(isNothing(x) OrElse String.IsNullOrEmpty(x.ToString.Trim), DBNull.Value, x)).toArray
Select dtCorrected.Rows.Add(ra)).CopyToDataTable()
Taken from this thread.
is there any other possible solution?
I’m unable to fix the above solution in my workflow! Also the above solution should be added after the build data table activity and above add data row right?
Thanks in Advance
Sample input is having all the columns and one default row with zeroes filled in columns
sample output contains the actual data after the add data row activity is done.
And also, after adding the above code before the write range activity I get this error
Add this in Assign activity before the LINQ code
dtCorrected = OriginDataTableVar.Clone()
I did that after the build data table activity.
thanks in advance
LINQ query should be on your output
datatable
Here it should from r in output
The table name here is DtCorrect
Change the table name as suggested in previous reply