Click here to Skip to main content
15,914,162 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dialog OnPaint flicker Pin
John M. Drescher8-Sep-03 18:28
John M. Drescher8-Sep-03 18:28 
GeneralRe: Dialog OnPaint flicker Pin
JWood9-Sep-03 3:41
JWood9-Sep-03 3:41 
GeneralRe: Dialog OnPaint flicker Pin
John M. Drescher9-Sep-03 3:56
John M. Drescher9-Sep-03 3:56 
Generaldialog scroll bars Pin
Marissa1828-Sep-03 13:07
Marissa1828-Sep-03 13:07 
GeneralOnEndlabeleditTree () Pin
Binayak8-Sep-03 12:06
Binayak8-Sep-03 12:06 
GeneralRe: OnEndlabeleditTree () Pin
Phil Hamer8-Sep-03 14:59
Phil Hamer8-Sep-03 14:59 
GeneralExcel automation Pin
act_x8-Sep-03 11:34
act_x8-Sep-03 11:34 
GeneralRe: Excel automation Pin
Steve S8-Sep-03 22:15
Steve S8-Sep-03 22:15 
1. The workbooks collection has an 'Open' method, as well as 'Add', which takes a number of arguments, many of which are optional.

Something like

_Workbook book = books.Open(COleVariant("file.xls"),covOptional,COleVariant(0));

should do the trick to open a given file. The second arg is whether to update links, the third is the readonly argument. You need to look at the VB help for the Excel object model.

2. To an extent, you'll need to calculate anyway to make your safearray the right size. You can specify the range as absolute column numbers anyway, but something like this will convert to AZ notation...(make sure result points to a big enough buffer)

<br />
TCHAR* RCtoString(long row, long col, TCHAR* result)<br />
{<br />
	if (!result) return result;<br />
	if (col > 26)<br />
	{<br />
		_tsprintf(result, _T("%c%c%d"),<br />
			_T('A')+(col-1)/26-1,<br />
			_T('A')+(col-1)%26,<br />
			row);<br />
	}<br />
	else<br />
	{<br />
		_tsprintf(result, _T("%c%d"),<br />
			_T('A')+(col-1)%26,<br />
			row);<br />
	}<br />
	return result;<br />
}<br />


Hope this helps...

Steve S
Generaldodgy communication is back Pin
godbert8-Sep-03 11:17
godbert8-Sep-03 11:17 
GeneralDeveloping software for Win2k+ Pin
John M. Drescher8-Sep-03 11:11
John M. Drescher8-Sep-03 11:11 
GeneralRe: Developing software for Win2k+ Pin
valikac8-Sep-03 12:34
valikac8-Sep-03 12:34 
GeneralRe: Developing software for Win2k+ Pin
Dangleberry8-Sep-03 22:50
sussDangleberry8-Sep-03 22:50 
GeneralRe: Developing software for Win2k+ Pin
Dangleberry8-Sep-03 22:51
sussDangleberry8-Sep-03 22:51 
QuestionCRichEditCtrl -- current column? Pin
mcguile2578-Sep-03 10:56
mcguile2578-Sep-03 10:56 
AnswerRe: CRichEditCtrl -- current column? Pin
Phil Hamer8-Sep-03 14:53
Phil Hamer8-Sep-03 14:53 
QuestionHow to restart my application? Pin
julych8-Sep-03 10:31
julych8-Sep-03 10:31 
AnswerRe: How to restart my application? Pin
geo_m9-Sep-03 7:23
geo_m9-Sep-03 7:23 
GeneralRunning a CGI-bin Pin
Juan Carlos Cobas8-Sep-03 10:28
Juan Carlos Cobas8-Sep-03 10:28 
GeneralRe: Running a CGI-bin Pin
Anonymous8-Sep-03 10:57
Anonymous8-Sep-03 10:57 
GeneralRe: Running a CGI-bin Pin
Juan Carlos Cobas8-Sep-03 11:03
Juan Carlos Cobas8-Sep-03 11:03 
GeneralRe: Running a CGI-bin Pin
Anonymous8-Sep-03 11:19
Anonymous8-Sep-03 11:19 
GeneralRe: Running a CGI-bin Pin
Juan Carlos Cobas8-Sep-03 12:06
Juan Carlos Cobas8-Sep-03 12:06 
GeneralRe: Running a CGI-bin Pin
Ian Darling8-Sep-03 23:29
Ian Darling8-Sep-03 23:29 
GeneralRe: Running a CGI-bin Pin
antlers9-Sep-03 9:30
antlers9-Sep-03 9:30 
GeneralRe: Running a CGI-bin Pin
joshfl10-Sep-03 17:02
joshfl10-Sep-03 17:02 

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.