J
Jona
Hi, I'm trying to create new Worksheets in my code but I really have
no clue how to...
here is part of my code.
the code I'm is really the one from this webpage: http://support.microsoft.com/kb/178781
but the problem is that they say nothing about creating a new
Worksheet.
Thanks for your help in advance.
//Header declarations..
_Application xlApp;
Workbooks wb;
_Workbook _wb;
Worksheets ws;
//Source
//Add Workbook
wb = xlApp.GetWorkbooks();
_wb = wb.Add(covOptional);
ws = _wb.GetSheets();
//Remove the 3 default sheets
_Worksheet selSheet;
selSheet = ws.GetItem(COleVariant((short)1));
selSheet.Delete();
selSheet = ws.GetItem(COleVariant((short)2));
selSheet.Delete();
selSheet = ws.GetItem(COleVariant((short)3));
selSheet.Delete();
If you want to rename any of these sheets is really easy//
selSheet = ws.GetItem(COleVariant((short)2));
selSheet.SetName("NonInteractive Mode Results");
-Jona
no clue how to...
here is part of my code.
the code I'm is really the one from this webpage: http://support.microsoft.com/kb/178781
but the problem is that they say nothing about creating a new
Worksheet.
Thanks for your help in advance.
//Header declarations..
_Application xlApp;
Workbooks wb;
_Workbook _wb;
Worksheets ws;
//Source
//Add Workbook
wb = xlApp.GetWorkbooks();
_wb = wb.Add(covOptional);
ws = _wb.GetSheets();
//Remove the 3 default sheets
_Worksheet selSheet;
selSheet = ws.GetItem(COleVariant((short)1));
selSheet.Delete();
selSheet = ws.GetItem(COleVariant((short)2));
selSheet.Delete();
selSheet = ws.GetItem(COleVariant((short)3));
selSheet.Delete();
If you want to rename any of these sheets is really easy//
selSheet = ws.GetItem(COleVariant((short)2));
selSheet.SetName("NonInteractive Mode Results");
-Jona