using System;
using System.IO;
using System.Text;
using System.Data;
using System.Reflection;
using System.Diagnostics;
using System.Collections;
//using cfg = System.Configuration;
namespace GDBI.Common
{
/// <summary>
/// 说 明:Excel输出打印模块
/// 暂时不提供操作Excel对象样式方法,样式可以在Excel模板中设置好
/// 作 者:lingyun_k
/// 创建日期:2005-7-12
/// </summary>
public class ExcelHelper
{
#region 成员变量
private string templetFile = null;
private string outputFile = null;
private object missing = Missing.Value;
private DateTime beforeTime; //Excel启动之前时间
private DateTime afterTime; //Excel启动之后时间
Excel.Application app;
Excel.Workbook workBook;
Excel.Worksheet workSheet;
Excel.Range range;
Excel.Range range1;
Excel.Range range2;
Excel.TextBox textBox;
private int sheetCount = 1; //WorkSheet数量
private string sheetPrefixName = "页";
#endregion
#region 公共属性
/// <summary>
/// WorkSheet前缀名,比如:前缀名为“页”,那么WorkSheet名称依次为“页-1,页-2...”
/// </summary>
public string SheetPrefixName
{
set { this.sheetPrefixName = value; }
}
/// <summary>
/// WorkSheet数量
/// </summary>
public int WorkSheetCount
{
get { return workBook.Sheets.Count; }
}
/// <summary>
/// Excel模板文件路径
/// </summary>
public string TempletFilePath
{
set { this.templetFile = value; }
}
/// <summary>
/// 输出Excel文件路径
/// </summary>
public string OutputFilePath
{
set { this.outputFile = value; }
}
#endregion