天软金融分析.NET函数大全 > 文档处理函数 > Excel处理函数 > Excel处理函数-txlsreadwrite版

ExcelDeleteSheetOrChartSheet2    

简述

  删除Excel中的Sheet或Chartsheet
  注:此函数无需依赖office/wps,但需要关闭文件。
定义
ExcelDeleteSheetOrChartSheet2(ExcelFileName:String;ExcelSheetName:String):Integer
参数
名称类型说明
ExcelFileNameString字符串,Excel文件名
ExcelSheetNameString字符串,指定的Sheet名或者Chartsheet名
返回Integer 整数。如果成功则返回真,如果指定的文件不存在或者指定的Sheet不存在或者失败则返回假。
  • 范例

    //删除本地文件C:\VBA.xlsx的Sheet1
      dir:="C:\\VBA.xlsx";
      sheet:="Sheet1";
      ret:=rdo2 ExcelDeleteSheetOrChartSheet2(dir,sheet);
      return ret;
相关