由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - delete sheets from Excel workbook in C# (转载)
相关主题
容器里边放指针怎么办?ARRAY BASIC,这种宏写的出来吗?
linux 能查到 deleted file list 吗VBA新手请教简单EXCEL任务
new了指针,delete的时候出错了how to keep data integrity in excel
问个C++中重复删除指针的问题Excel 2010 禁用排序按钮
[合集] 请教一个c++ 中 delete [] 的问题GO game terminal condition
one question about overloading operator deleteHow to do this? Please help!
What is wrong?关于数组动态分配的疑问???
excel macro running slownew and delete in c++
相关话题的讨论汇总
话题: workbook话题: excel话题: c#话题: sheets话题: delete
进入Programming版参与讨论
1 (共1页)
l******9
发帖数: 579
1
【 以下文字转载自 JobHunting 讨论区 】
发信人: light009 (light009), 信区: JobHunting
标 题: delete sheets from Excel workbook in C#
发信站: BBS 未名空间站 (Fri May 22 14:08:38 2015, 美东)
I need to delete some sheets from an Excel workbook in C#.
But, my code does not work.
// **aDeleteList** hold the sheets that need to be deleted from the
workbook wbk
static void delete_sht(ref MsExcel.Workbook wbk, List
aDeleteList)
{
MsExcel.Sheets my_st = wbk.Sheets;
foreach (MsExcel.Worksheet s in my_st)
{
if (aDeleteList.Contains(s.Name))
s.Delete();
int t1 = my_st.Count;
int t = wbk.Sheets.Count;
}
}
The values of t and t1 do not change no matter
s.Delete()
has been executed.
Any help would be appreciated.
1 (共1页)
进入Programming版参与讨论
相关主题
new and delete in c++[合集] 请教一个c++ 中 delete [] 的问题
delete this problemone question about overloading operator delete
delete一问What is wrong?
C++求助: New/Delete in Multidimensioned arrayexcel macro running slow
容器里边放指针怎么办?ARRAY BASIC,这种宏写的出来吗?
linux 能查到 deleted file list 吗VBA新手请教简单EXCEL任务
new了指针,delete的时候出错了how to keep data integrity in excel
问个C++中重复删除指针的问题Excel 2010 禁用排序按钮
相关话题的讨论汇总
话题: workbook话题: excel话题: c#话题: sheets话题: delete