View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sasha Sasha is offline
external usenet poster
 
Posts: 4
Default Setting Excel cell format

I need to export data to an excel file programmatically. Date includes time
in form of min:sec and full date with time. IRange::PutValue2 accepts variant
and if I pass COleVaraint created from COleDateTime I have excel show value
as a double "39726.47661". I need to manually right click and select "Format
Cells..." menu, then select Date or time Category and then the value is shown
as I want. How can I do all this programmatically so that value is shown as
date and time initially?