Dim objExcelFile As Excel.Application Dim objWorkBook As Excel.Workbook Dim objSheet As Excel.Worksheet objExcelFile = New Excel.Application objExcelFile.DisplayAlerts = False objWorkBook = objExcelFile.Workbooks.Open(filePath) objSheet = objWorkBook
using System;using System.Collections.Generic;using System.Data;using System.Data.OleDb;using System.Linq;using System.Text;using Log;namespace Common{ public class ExcelInputHelper { public static ExcelInputHelper Self = new ExcelInputHelper(); publ
using System; using System.Collections.Generic; using System.Linq; using System.Data; using System.IO; using System.Xml; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; using DocumentFormat.OpenXml; namespace ECLink.
using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Windows.Forms; using System.Reflection; namespace DMS { /// <summary> /// C#操作Excel类 /// </summary> class ExcelOperate { //法一 //public bool Data
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; using System.Collections; using System.Data.SqlClient; using Microso
using System; using System.IO; using System.Data; using System.Reflection; using System.Diagnostics; using System.Configuration; using System.Collections; using Excel; namespace thscjy { /// /// 套用模板输出Excel,生成xls文件和html文件 /// Author: Liu Wen ///
开发环境基于VSTO,具体配置:visual studio 2010,VB .Net,excel 2007,文档级别的定制程序. 如题,我在ThisWorkbook.vb中添加了一个public函数来完成查找功能. 入参:待查找的sheet名称 返回:如果存在则返回worksheet对象,如果不存在则返回nothing Public Function WorksheetExist(name As String) As Excel.Worksheet Try