Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hello all,
I am copying a template worksheet in code for a number of base currencies returned from my datatable. I would like to copy the template just but have to iterate so i end up copying the previous sheet. can anyone help me on this. heres the code thanks Cyril int _workSheetIdx = 1; Excel.Sheets sheets = this.Worksheets; Excel.Worksheet _wsTemplate = (Excel.Worksheet)Sheets.get_Item(_workSheetIdx); _wsTemplate.Name = "Template"; foreach (System.Data.DataTable dtBc in ds.Tables) { _wsTemplate.Copy(Type.Missing, _wsTemplate); _workSheetIdx++; _wsTemplate = (Excel.Worksheet)this.Sheets[_workSheetIdx]; _wsTemplate.Name = dtBc.Rows[0]["BaseCurrencyCode"].ToString(); PopulateCurrentWorkSheet(dtBc, _wsTemplate); } |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy & paste cells fr open worksheet then close the worksheet | Excel Programming | |||
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 | Excel Worksheet Functions | |||
copy range on every worksheet (diff names) to a master worksheet (to be created) | Excel Programming | |||
copy range on every worksheet (diff names) to a master worksheet (to be created) | Excel Programming | |||
Code to copy range vs Copy Entire Worksheet - can't figure it out | Excel Programming |