S
ssingh
I am working on a QTP script which executes sybase queries and exports the
results to an excel. The recordset sometimes has date values, numbers with
leading zeroes etc.
To ensure that the format of all the values is retained after results are
exported to excel , I used the following code:-
ExcelObj.selection.NumberFormat = "@" to change the format of the excel to
'text'.
Inspite of using the above code the date format is getting changed :-
Sybase query originally returns date in format : 'yyyy-mm-dd hh:mm: ss' .
When this value is pasted on excel it gets changed to 'mm/dd/yyyy'.
Need help to fix this! Any suggestions?
TIA
results to an excel. The recordset sometimes has date values, numbers with
leading zeroes etc.
To ensure that the format of all the values is retained after results are
exported to excel , I used the following code:-
ExcelObj.selection.NumberFormat = "@" to change the format of the excel to
'text'.
Inspite of using the above code the date format is getting changed :-
Sybase query originally returns date in format : 'yyyy-mm-dd hh:mm: ss' .
When this value is pasted on excel it gets changed to 'mm/dd/yyyy'.
Need help to fix this! Any suggestions?
TIA