I’ve got a problem using write range to an Excel. I built a DataTable with some columns formatted as Double and Others string. When I use this DataTable as input variable for Write Range, the resultant Excel columns are formatted as general.
How can I copy a DataTable to an Excel workbook maintaining the format I set?
Use String.Format(yourInputString, “0.00”)
Should I set all datatable columns format as string then?
Convert column with double data type to string and keep the datatable to string format.
Later on, if required you can change particular value into your desired data type.
1 Like