I have a data table that all columns have string type even date and time columns.
I need to save specific date format as dd-mm-yyyy which is in one the columns in atatable as TEXT format to excel cell but when i use WriteRange in Excel Application Scope and save the excel file, Excel automatically saves it as DATE format in mm/dd/yyyy. How to set cell formal to General or Text when i export data?
Hi,
In excel you can escape from discover format cells by adding '
before string.
For eg.:
"'" + row("Your_Date").ToString
Thank you Adrian. Adding “'” before the field makes the format to custom (m/d/yyyy) and also there is still a quote before the field when i click on the cell. This excel file will be input for other system so we can’t add any character. I already wrote a VB program and call it using “Invoke Code” which is making the same effort as excel scope and sabe to file but i’m looking for a proper way. in VB code, i use ExcelworkSheet.Range(cell).number format = “@” so there should be a similar way in UiPath