Click here to Skip to main content
16,016,477 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
Richard MacCutchan30-Sep-09 1:12
mveRichard MacCutchan30-Sep-09 1:12 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 1:34
MsmVc30-Sep-09 1:34 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 2:07
MsmVc30-Sep-09 2:07 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
Richard MacCutchan30-Sep-09 3:34
mveRichard MacCutchan30-Sep-09 3:34 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 18:43
MsmVc30-Sep-09 18:43 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
Franck Paquier30-Sep-09 19:10
Franck Paquier30-Sep-09 19:10 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 19:33
MsmVc30-Sep-09 19:33 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
Franck Paquier30-Sep-09 20:00
Franck Paquier30-Sep-09 20:00 
Hi
If your switch detect nothing i guess it is because the date time is really stored as a double inside excel.

Your call:

pRange->Item [1][iColumn]


always return the value as a double at least for date and time.

To by-pass that i would try to retreive the Text of the cell which is what the cell show.
Text if from VBA doc but it should exist the same entry point in automation.

In that case i am pretty sure you will recieved the 10:23:00 value.
In the web site above there is an explanation about how to translate an excel date time:
http://www.cpearson.com/excel/datetime

The last soulution:
If your date time cell is at a fixed place then just retrieve the value and translate as explain in the above link.

Regards
Franck
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 20:08
MsmVc30-Sep-09 20:08 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
Franck Paquier30-Sep-09 20:37
Franck Paquier30-Sep-09 20:37 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 20:42
MsmVc30-Sep-09 20:42 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
Franck Paquier30-Sep-09 21:43
Franck Paquier30-Sep-09 21:43 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
Franck Paquier30-Sep-09 21:45
Franck Paquier30-Sep-09 21:45 
GeneralRe: _variant_t vItem = pRange->Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 23:03
MsmVc30-Sep-09 23:03 
Questionhtml help and ms front-page Pin
includeh1029-Sep-09 19:24
includeh1029-Sep-09 19:24 
AnswerRe: html help and ms front-page Pin
Hans Dietrich29-Sep-09 20:19
mentorHans Dietrich29-Sep-09 20:19 
QuestionWhere is regedit.exe located in Pocket PC? Pin
Le@rner29-Sep-09 19:03
Le@rner29-Sep-09 19:03 
AnswerRe: Where is regedit.exe located in Pocket PC? Pin
Game-point29-Sep-09 19:14
Game-point29-Sep-09 19:14 
QuestionDirectX - Direct Show programming? Pin
$uresh $hanmugam29-Sep-09 18:35
$uresh $hanmugam29-Sep-09 18:35 
QuestionHow to disable non-visible dialog items Pin
FloatingMarc29-Sep-09 16:19
FloatingMarc29-Sep-09 16:19 
AnswerRe: How to disable non-visible dialog items Pin
includeh1029-Sep-09 19:30
includeh1029-Sep-09 19:30 
GeneralRe: How to disable non-visible dialog items Pin
FloatingMarc29-Sep-09 21:56
FloatingMarc29-Sep-09 21:56 
QuestionRun Time error Pin
monkeywrench1029-Sep-09 16:14
monkeywrench1029-Sep-09 16:14 
AnswerRe: Run Time error Pin
Cedric Moonen29-Sep-09 20:25
Cedric Moonen29-Sep-09 20:25 
GeneralRe: Run Time error Pin
monkeywrench1030-Sep-09 3:31
monkeywrench1030-Sep-09 3:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.