Reputation: 1240
I am outputting an Excel worksheet that contains strings of the form hh:mm:ss. However, Excel is seeing fit to delete any leading zeros even though they are text. I tried myRange.NumberFormat = "@" but this results in bizarre decimal representations.
Any advice is appreciated.
Regards.
Upvotes: 0
Views: 357
Reputation: 1240
Asked too soon. Setting range.NumberFormat = "hh:mm:ss" did the trick without affecting the other strings in that column.
Upvotes: 1