M
Macca
Hi,
I am using Automation with VC++ 6 to create and write to a spreadsheet.
I use the following to create it :-
COleVariant
covTrue((short)TRUE),
covFalse((short)FALSE),
covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
// Start Excel and get Application object.
if(!m_objApp.CreateDispatch("Excel.Application"))
{
AfxMessageBox("Couldn't start Excel and get Application object.");
//return;
}
m_objBooks = m_objApp.GetWorkbooks();
m_objBook = m_objBooks.Add (covOptional);
This code creates a workbook with 3 work sheets. Is it possible to define
how many worksheets are created when i first create my workbook? e.g 2
worksheets?
Thanks In Advance
Macca
I am using Automation with VC++ 6 to create and write to a spreadsheet.
I use the following to create it :-
COleVariant
covTrue((short)TRUE),
covFalse((short)FALSE),
covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
// Start Excel and get Application object.
if(!m_objApp.CreateDispatch("Excel.Application"))
{
AfxMessageBox("Couldn't start Excel and get Application object.");
//return;
}
m_objBooks = m_objApp.GetWorkbooks();
m_objBook = m_objBooks.Add (covOptional);
This code creates a workbook with 3 work sheets. Is it possible to define
how many worksheets are created when i first create my workbook? e.g 2
worksheets?
Thanks In Advance
Macca