CreateCopy
Create a copy of an existing worksheet
BOOL CreateCopy( Worksheet & wksSource, int nOption = CREATE_VISIBLE_SAME, DWORD dwCtrl = DCTRL_COPY_DEFAULT )
TRUE for success; otherwise FALSE.
EX1
//Create a copy of an existing worksheet. void Worksheet_CreateCopy_Ex1() { Worksheet wks; WorksheetPage wp = Project.WorksheetPages(0); if(!wp) return; Worksheet wksSource(wp.GetName()); int nOption = CREATE_VISIBLE_SAME; BOOL bRet = wks.CreateCopy(wksSource, nOption); printf("Original : %s; Copy : %s; Call returned %u\n", wks.GetName(), wksSource.GetName(), bRet); }
Create a copy of the worksheet wksSource and attaches it to the object.
Datasheet::Create, Worksheet::CopyTo
origin.h