Format Excel Cell From VC6++

M

Macca

I am using automation to write data from Visual C++ 6 to an excel
spreadsheet.

I am having problem writing the string "12/10/2004" to a cell as it swaps
the 10 and 12 around!!!. I assume this has something to do with american
dates.

I use the code below to write the string to the cell i want :-

m_objRange = m_objSheet2.GetRange(COleVariant("A3"),COleVariant("A3"));
m_objRange.SetValue2(COleVariant("12/10/2004"));


It write the string to the correct cell but the day and month have been
swapped. Can anyone tell me how i can stop this happening?

Is there anyway to format the cell form VC6++?

Thanks In Advance
Macca
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top