Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
compare excel worksheet and output difference to new worksheet | Excel Discussion (Misc queries) | |||
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 | Excel Worksheet Functions | |||
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet | Excel Worksheet Functions | |||
excel 97: copy and paste values from one worksheet to another worksheet | Excel Programming | |||
Attaching a JET database to an Excel Worksheet OR storing large binary data in a worksheet | Excel Programming |