using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Data;
using System.Reflection;
using Microsoft.Office.Interop;
using Microsoft.Office.Interop.Excel;
{
/// <summary>
/// Excel边框处理处理类
/// </summary>
public class ExcelBorders
{
/// <summary>
/// 设置Excel边框
/// </summary>
/// <param name="Range">目标区域对象</param>
public void SetBorders(Range Range)
{
Range.Borders.LineStyle = 1;//设置表格的边框
//Range.Interior.ColorIndex = 15;//设置背景颜色
Range.Borders[XlBordersIndex.xlEdgeTop].LineStyle = XlLineStyle.xlContinuous;
Range.Borders.Weight = XlBorderWeight.xlThin;
//Range.Borders.get_Item(XlBordersIndex.xlEdgeBottom).LineStyle = XlLineStyle.xlDash;//设置线条
//Range.Borders.get_Item(XlBordersIndex.xlEdgeBottom).Weight = XlBorderWeight.xlThick;
}
}
}
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Data;
using System.Reflection;
using Microsoft.Office.Interop;
using Microsoft.Office.Interop.Excel;
{
/// <summary>
/// Excel图表处理类
/// </summary>
public class ExcelChart
{
/// <summary>
/// 图表对象
/// </summary>
private _Chart m_Chart = null;
/// <summary>
/// 图象中各个列的说明对象
/// </summary>
private Series m_Series = null;
/// 图象自动套用格式
/// </summary>
private int Format = 1;
/// 指定系列中的数据是来自于行还是列
/// </summary>
private object PlotBy = XlRowCol.xlColumns;
/// 图表标题
/// </summary>
private string ChartTitle = string.Empty;
/// 横坐标标题
/// </summary>
private string XTitle = string.Empty;
/// 纵坐标标题
/// </summary>
private string YTitle = string.Empty;
/// 左边距
/// </summary>
private float Left = 0.0f;
/// 上边距
/// </summary>
private float Top = 0.0f;
/// 图表标题数组
/// </summary>
private object[] ObjectHeader = null;
/// 获取或设置图表标题数组
/// </summary>
public object[] _ObjectHeader
{
get
{
return ObjectHeader;
}
set
{
ObjectHeader = value;
}
}
/// 获取或设置图象套用格式编号
/// </summary>
public int _Format
{
get
{
return Format;
}
set
{
Format = value;
}
}
/// 获取或设置系列中的数据是来自于行还是列
/// </summary>
public object _PlotBy
{
get
{
return PlotBy;
}
set
{
PlotBy = value;
}
}
/// 设置或获取图表标题
/// </summary>
public string _ChartTitle
{
get
{
return ChartTitle;
}
set
{
ChartTitle = value;
}
}
/// 设置或获取横标题
/// </summary>
public string _XTitle
{
get
{
return XTitle;
}
set
{
XTitle = value;
}
}
/// 设置或获取纵标题
/// </summary>
public string _YTitle
{
get
{
return YTitle;
}
set
{
YTitle = value;
}
}
/// 设置或获取左边距
/// </summary>
public float _Left
{
get
{
return Left;
}
set
{
Left = value;
}
}
/// 设置或获取上边距
/// </summary>
public float _Top
{
get
{
return Top;
}
set
{
Top = value;
}
}
/// 创建图表
/// </summary>
/// <param name="strInfoMsg">出错信息</param>
/// <param name="Range">Excel区域对象</param>
public void CreateChart(out string strInfoMsg,Range Range)
{
try
{
ExcelManager Manager = new ExcelManager();
string MyString = string.Empty;
m_Chart = (_Chart)Manager._objBook.Charts.Add(Missing.Value, Missing.Value,
Missing.Value, Missing.Value);//获得空图表对象
m_Chart.ChartWizard(Range, XlChartType.xlLine,Format,PlotBy, 1, 1, true,ChartTitle,XTitle,YTitle, Missing.Value);//创建图象向导
{
m_Series = (Series)m_Chart.SeriesCollection(i);
MyString = "=\"" + ObjectHeader[i - 1] + "";
MyString = MyString + "\"";
m_Series.Name = MyString;
}
m_Chart.Location(Microsoft.Office.Interop.Excel.XlChartLocation.xlLocationAsObject,Manager._objSheet.Name);
Manager._objSheet.Shapes.Item(0).Left = Left;
Manager._objSheet.Shapes.Item(0).Top = Top;
strInfoMsg = string.Empty;
}
catch (Exception er)
{
strInfoMsg = er.Message.ToString();
return;
}
}
}
}
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Data;
using System.Reflection;
using Microsoft.Office.Interop;
using Microsoft.Office.Interop.Excel;
{
/// <summary>
/// Excel字体处理类
/// </summary>
public class ExcelFont
{
/// <summary>
/// 字体名称
/// </summary>
private string FontName = string.Empty;
/// 字体大小
/// </summary>
private int Size = 0;
/// 是否为粗体
/// </summary>
private bool Bold =false;
/// 重载构造函数
/// </summary>
/// <param name="FontName">字体名称</param>
public ExcelFont(string FontName)
{
this.FontName = FontName;
}
/// 重载构造函数
/// </summary>
/// <param name="FontName">字体名称</param>
/// <param name="Size">字体大小</param>
public ExcelFont(string FontName,int Size)
{
this.FontName = FontName;
this.Size = Size;
}
/// 重载构造函数
/// </summary>
/// <param name="FontName">字体名称</param>
/// <param name="Size">字体大小</param>
/// <param name="Bold">是否为粗体,默认为正常体</param>
public ExcelFont(string FontName, int Size, bool Bold)
{
this.FontName = FontName;
this.Size = Size;
this.Bold = Bold;
}
/// 设置Excel字体
/// </summary>
/// <param name="Range">目标区域对象</param>
public void SetFont(Range Range)
{
Range.WrapText = true;
Range.Font.Bold = Bold;
Range.Font.Size = Size;
Range.Font.Name = FontName;
Range.VerticalAlignment = XlVAlign.xlVAlignCenter;
Range.HorizontalAlignment = XlHAlign.xlHAlignCenter;
}
}
}
{
using Microsoft.Office.Core;
using Microsoft.Office.Interop.Excel;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
{
private static _Workbook m_objBook = null;
private static Workbooks m_objBooks = null;
private static ApplicationClass m_objExcel = null;
private static _Worksheet m_objSheet = null;
private static Range m_Range = null;
{
m_objExcel = new ApplicationClass();
m_objExcel.Visible = false;
m_objBooks = m_objExcel.Workbooks;
m_objBook = m_objBooks.Add(Missing.Value);
m_objSheet = (Worksheet) m_objBook.ActiveSheet;
m_objExcel.Application.DisplayAlerts = false;
}
{
m_objExcel = new ApplicationClass();
m_objExcel.Workbooks.Open(TemplateFilePath, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
m_objExcel.Visible = false;
m_objBooks = m_objExcel.Workbooks;
m_objBook = m_objBooks.Add(Missing.Value);
m_objSheet = (Worksheet) m_objBook.ActiveSheet;
m_objExcel.Application.DisplayAlerts = false;
}
{
m_objSheet = (Worksheet) m_objBook.Sheets.Add(Missing.Value, Missing.Value, Missing.Value, XlSheetType.xlWorksheet);
m_objSheet.Name = CurrentSheetName;
}
{
Worksheet after = (Worksheet) m_objBooks.get_Item(1).Sheets.get_Item(BeforeSheetName);
m_objSheet = (Worksheet) m_objBook.Sheets.Add(Missing.Value, after, Missing.Value, XlSheetType.xlWorksheet);
m_objSheet.Name = CurrentSheetName;
m_objSheet.Activate();
}
{
m_Range = (Range) m_objSheet.Cells[Property._nBeginX, Property._nBeginY];
return m_Range.Text.ToString();
}
{
this.Dispose(true);
GC.SuppressFinalize(true);
}
{
if (disposing)
{
this.Disposing();
}
}
{
m_objBook.Close(false, Missing.Value, Missing.Value);
m_objBooks.Close();
ShutExcel();
Marshal.ReleaseComObject(m_objSheet);
m_objSheet = null;
Marshal.ReleaseComObject(m_objBook);
m_objBook = null;
Marshal.ReleaseComObject(m_objBooks);
m_objBooks = null;
Marshal.ReleaseComObject(m_objExcel);
m_objExcel = null;
GC.Collect();
GC.WaitForPendingFinalizers();
}
{
m_Range = (Range) m_objSheet.Cells[Property._nBeginX, Property._nBeginY];
m_Range.Formula = "=" + Method + "(" + strTotalBegin + ":" + strTotalEnd + ")";
}
{
m_Range = (Range) m_objSheet.Cells[Property._nBeginX, Property._nBeginY];
m_Range.Cells.Value2 = objdata;
m_Range.EntireColumn.AutoFit();
m_Range.EntireRow.AutoFit();
}
{
m_Range = m_objSheet.get_Range(m_objSheet.Cells[Property._nBeginX, Property._nBeginY], m_objSheet.Cells[Property._nBeginY + Property._nColumn, Property._nBeginX + Property._nRow]);
m_Range.Value2 = objdata;
m_Range.EntireColumn.AutoFit();
m_Range.EntireRow.AutoFit();
}
{
m_Range = m_objSheet.get_Range(Cell1, Cell2);
m_Range.Value2 = objdata;
m_Range.EntireColumn.AutoFit();
m_Range.EntireRow.AutoFit();
}
{
m_Range = m_objSheet.get_Range(m_objSheet.Cells[Property._nBeginX, Property._nBeginY], m_objSheet.Cells[Property._nBeginY + Property._nColumn, Property._nBeginX + Property._nRow]);
return m_Range;
}
{
m_Range = m_objSheet.get_Range(Cell1, Cell2);
return m_Range;
}
private static extern int GetWindowThreadProcessId(IntPtr hwnd, out int ID);
public void InsertPicture(string RangeName, string PicturePath)
{
m_Range = m_objSheet.get_Range(RangeName, Missing.Value);
m_Range.Select();
((Pictures) m_objSheet.Pictures(Missing.Value)).Insert(PicturePath, Missing.Value);
}
{
m_Range = m_objSheet.get_Range(RangeName, Missing.Value);
m_Range.Select();
float left = Convert.ToSingle(m_Range.Left);
float top = Convert.ToSingle(m_Range.Top);
m_objSheet.Shapes.AddPicture(PicturePath, MsoTriState.msoFalse, MsoTriState.msoTrue, left, top, PictuteWidth, PictureHeight);
}
{
m_Range = m_objSheet.get_Range(CellIndex1, CellIndex2);
m_Range.Merge(false);
}
{
m_objSheet.PageSetup.PaperSize = XlPaperSize.xlPaperA4;
m_objSheet.PageSetup.Orientation = XlPageOrientation.xlPortrait;
m_objSheet.PageSetup.HeaderMargin = 0.0;
m_objSheet.PageSetup.FooterMargin = 0.0;
m_objSheet.PageSetup.LeftMargin = m_objExcel.InchesToPoints(0.354330708661417);
m_objSheet.PageSetup.RightMargin = m_objExcel.InchesToPoints(0.354330708661417);
m_objSheet.PageSetup.TopMargin = m_objExcel.InchesToPoints(0.393700787401575);
m_objSheet.PageSetup.BottomMargin = m_objExcel.InchesToPoints(0.393700787401575);
m_objSheet.PageSetup.CenterHorizontally = true;
m_objSheet.PrintOut(Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
}
{
try
{
m_objExcel.Visible = IsShow;
m_objBook.SaveAs(strSavePath, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, XlSaveAsAccessMode.xlNoChange, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
strInfoMsg = string.Empty;
}
catch (Exception exception)
{
strInfoMsg = exception.Message.ToString();
}
}
{
try
{
m_objExcel.Visible = IsShow;
m_objBook.SaveAs(Path.Combine(strSavePath, strFileName), Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, XlSaveAsAccessMode.xlNoChange, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
strInfoMsg = string.Empty;
}
catch (Exception exception)
{
strInfoMsg = exception.Message.ToString();
}
}
{
IntPtr hwnd = new IntPtr(m_objExcel.Hwnd);
int iD = 0;
GetWindowThreadProcessId(hwnd, out iD);
Process.GetProcessById(iD).Kill();
}
{
get
{
return m_objBook;
}
}
{
get
{
return m_objBooks;
}
}
{
get
{
return m_objSheet;
}
}
{
set
{
if ((value <= 0) || (value > m_objBook.Worksheets.Count))
{
throw new Exception("索引超出范围");
}
object obj2 = value;
m_objSheet = m_objBook.Worksheets[obj2] as _Worksheet;
}
}
}
}
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Data;
using System.Reflection;
using Microsoft.Office.Interop;
using Microsoft.Office.Interop.Excel;
{
/// <summary>
/// Excel处理类
/// </summary>
public class ExcelObject
{
#region Excel对象
/// Excel程序对象
/// </summary>
private static ApplicationClass m_objExcel=null;
/// <summary>
/// Excel工作簿对象集合
/// </summary>
private static Workbooks m_objBooks = null;
/// <summary>
/// Excel工作簿对象
/// </summary>
private static _Workbook m_objBook = null;
/// <summary>
/// Excel工作空间对象
/// </summary>
private static _Worksheet m_objSheet = null;
/// <summary>
/// Excel获取的空间对象
/// </summary>
private static Range m_Range = null;
/// <summary>
/// 图表对象
/// </summary>
private static _Chart m_Chart = null;
/// <summary>
/// 图象中各个列的说明对象
/// </summary>
private static Series m_Series = null;
/// 构造函数
/// </summary>
public ExcelObject()
{
m_objExcel = new ApplicationClass();
m_objExcel.Visible = false;
m_objBooks = (Microsoft.Office.Interop.Excel.Workbooks)m_objExcel.Workbooks;
m_objBook = (Microsoft.Office.Interop.Excel.Workbook)(m_objBooks.Add(Missing.Value));
m_objSheet = (Microsoft.Office.Interop.Excel.Worksheet)m_objBook.ActiveSheet;
}
/// 创建Excel文件
/// </summary>
/// <param name="objdata">Excel二维表数组</param>
public void CreateExcel(object[,] objdata)
{
m_Range = m_objSheet.get_Range(m_objSheet.Cells[ExcelProperty._nBeginX, ExcelProperty._nBeginY], m_objSheet.Cells[ExcelProperty._nBeginY + ExcelProperty._nColumn, ExcelProperty._nBeginX + ExcelProperty._nRow]);//Excel中目标区域
m_Range.Value2 = objdata;
m_Range.EntireColumn.AutoFit();//完全覆盖单元格
}
/// <summary>
/// 统计和值
/// </summary>
/// <param name="Method">统计方法</param>
/// <param name="strTotalBegin">统计的开始区域</param>
/// <param name="strTotalEnd">统计的结束区域</param>
public Range ExcelTotalSum(string Method,string strTotalBegin,string strTotalEnd)
{
m_Range = m_objSheet.get_Range(strTotalBegin, strTotalEnd);//Excel中目标区域
m_Range.Formula = "="+Method+"(" + strTotalBegin + ":" + strTotalEnd + ")";
return m_Range;
}
/// 统计平均值
/// </summary>
/// <param name="strTotalBegin">统计的开始区域</param>
/// <param name="strTotalEnd">统计的结束区域</param>
public Range ExcelTotalAverage(string strTotalBegin, string strTotalEnd)
{
m_Range = m_objSheet.get_Range(m_objSheet.Cells[ExcelProperty._nBeginX, ExcelProperty._nBeginY], m_objSheet.Cells[ExcelProperty._nBeginY + ExcelProperty._nColumn, ExcelProperty._nBeginX + ExcelProperty._nRow]);//Excel中目标区域
m_Range.Formula = "=AVERAGE(" + strTotalBegin + ":" + strTotalEnd + ")";
m_Range.NumberFormat = "0.00";
return m_Range;
}
/// 创建图表
/// </summary>
/// <param name="strInfoMsg">出错信息</param>
public void CreateChart(out string strInfoMsg,object[] objHeaders)
{
try
{
string MyString = string.Empty;
m_Range = m_objSheet.get_Range(m_objSheet.Cells[ExcelProperty._nBeginX, ExcelProperty._nBeginY], m_objSheet.Cells[ExcelProperty._nBeginY + ExcelProperty._nColumn,ExcelProperty._nBeginX + ExcelProperty._nRow]);//Excel中目标区域
m_Chart = (_Chart)m_objBook.Charts.Add(Missing.Value, Missing.Value,
Missing.Value,Missing.Value);//获得空图表对象
m_Chart.ChartWizard(m_Range, XlChartType.xlLine,
ExcelProperty._Format, ExcelProperty._PlotBy, 1, 1, true,
ExcelProperty._ChartTitle, ExcelProperty._XTitle, ExcelProperty._YTitle, Missing.Value);//创建图象向导
{
m_Series = (Series)m_Chart.SeriesCollection(i);
MyString = "=\"" + objHeaders[i-1] + "";
MyString = MyString + "\"";
m_Series.Name = MyString;
}
//图表定位
m_Chart.Location(Microsoft.Office.Interop.Excel.XlChartLocation.xlLocationAsObject, m_objSheet.Name);
m_objSheet.Shapes.Item(0).Left = ExcelProperty._Left;
m_objSheet.Shapes.Item(0).Top = ExcelProperty._Top;
strInfoMsg = string.Empty;
}
catch (Exception er)
{
strInfoMsg = er.Message.ToString();
return;
}
}
/// 设置Excel样式
public void SetStyle()
{
m_Range = m_objSheet.get_Range(m_objSheet.Cells[ExcelProperty._nBeginX, ExcelProperty._nBeginY], m_objSheet.Cells[ExcelProperty._nBeginY + ExcelProperty._nColumn, ExcelProperty._nBeginX + ExcelProperty._nRow]);//Excel中目标区域
m_Range.WrapText = true;
m_Range.Font.Name = "黑体";
m_Range.Font.Bold = true;
m_Range.Borders.LineStyle = 1;//设置表格的边框
//m_Range.Interior.ColorIndex = 35;//设置背景颜色
m_Range.Borders[XlBordersIndex.xlEdgeTop].LineStyle = XlLineStyle.xlContinuous;
m_Range.VerticalAlignment = XlVAlign.xlVAlignCenter;
m_Range.HorizontalAlignment = XlHAlign.xlHAlignCenter;
m_Range.Borders.Weight = XlBorderWeight.xlThin;
//m_Range.Borders.get_Item(XlBordersIndex.xlEdgeBottom).LineStyle = XlLineStyle.xlDash;//设置线条
//m_Range.Borders.get_Item(XlBordersIndex.xlEdgeBottom).Weight = XlBorderWeight.xlThick;
}
/// 保存Excel文件
/// </summary>
/// <param name="strInfoMsg">出错信息</param>
/// <param name="strSheetName">工作簿名称</param>
/// <param name="strSavePath">工作簿名称</param>
public void SaveExcel(out string strInfoMsg,string strSheetName, string strSavePath)
{
try
{
m_objSheet.Name = strSheetName;//工作簿名称
m_objExcel.Visible = true;//显示Excel程序
m_objBook.SaveAs(strSavePath, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, XlSaveAsAccessMode.xlNoChange, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
strInfoMsg = string.Empty;
}
catch(Exception er)
{
strInfoMsg = er.Message.ToString();
}
finally
{
//关闭Excel应用程序
m_objBook.Close(true, Missing.Value, Missing.Value);
m_objBooks.Close();
Disposing();//释放资源
}
}
/// 释放Excel程序占有的系统资源
/// </summary>
public static void Disposing()
{
//释放COM对象引用
System.Runtime.InteropServices.Marshal.ReleaseComObject(m_Range);
m_Range = null;
System.Runtime.InteropServices.Marshal.ReleaseComObject(m_objSheet);
m_objSheet = null;
System.Runtime.InteropServices.Marshal.ReleaseComObject(m_objBook);
m_objBook = null;
System.Runtime.InteropServices.Marshal.ReleaseComObject(m_objBooks);
m_objBooks = null;
m_objExcel.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject(m_objExcel);
m_objExcel = null;
GC.Collect();
}
}
}
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using Microsoft.Office.Interop;
using Microsoft.Office.Interop.Excel;
{
public class ExcelProperty
{
#region 定义图表
/// 开始单元格横序号
/// </summary>
private static int nBeginX=0;
/// <summary>
/// 开始单元格纵序号
/// </summary>
private static int nBeginY = 0;
/// <summary>
/// 横向移动长度
/// </summary>
private static int nRow = 0;
/// <summary>
/// 纵向移动长度
/// </summary>
private static int nColumn = 0;
/// <summary>
/// 图象自动套用格式
/// </summary>
private static int Format = 1;
/// <summary>
/// 指定系列中的数据是来自于行还是列
/// </summary>
private static object PlotBy = XlRowCol.xlColumns;
/// <summary>
/// 图表标题
/// </summary>
private static string ChartTitle=string.Empty;
/// <summary>
/// 横坐标标题
/// </summary>
private static string XTitle=string.Empty;
/// <summary>
/// 纵坐标标题
/// </summary>
private static string YTitle=string.Empty;
/// <summary>
/// 左边距
/// </summary>
private static float Left = 0.0f;
/// <summary>
/// 上边距
/// </summary>
private static float Top = 0.0f;
/// 获取或设置开始单元格横序号
/// </summary>
public static int _nBeginX
{
get
{
return nBeginX;
}
set
{
nBeginX = value;
}
}
/// 获取或设置开始单元格纵序号
/// </summary>
public static int _nBeginY
{
get
{
return nBeginY;
}
set
{
nBeginY = value;
}
}
/// 获取或设置横向移动长度
/// </summary>
public static int _nRow
{
get
{
return nRow;
}
set
{
nRow = value;
}
}
/// 获取或设置纵向移动长度
/// </summary>
public static int _nColumn
{
get
{
return nColumn;
}
set
{
nColumn = value;
}
}
/// 获取或设置图象套用格式编号
/// </summary>
public static int _Format
{
get
{
return Format;
}
set
{
Format = value;
}
}
/// 获取或设置系列中的数据是来自于行还是列
/// </summary>
public static object _PlotBy
{
get
{
return PlotBy;
}
set
{
PlotBy = value;
}
}
/// 设置或获取图表标题
/// </summary>
public static string _ChartTitle
{
get
{
return ChartTitle;
}
set
{
ChartTitle = value;
}
}
/// 设置或获取横标题
/// </summary>
public static string _XTitle
{
get
{
return XTitle;
}
set
{
XTitle = value;
}
}
/// 设置或获取纵标题
/// </summary>
public static string _YTitle
{
get
{
return YTitle;
}
set
{
YTitle = value;
}
}
/// 设置或获取左边距
/// </summary>
public static float _Left
{
get
{
return Left;
}
set
{
Left = value;
}
}
/// 设置或获取上边距
/// </summary>
public static float _Top
{
get
{
return Top;
}
set
{
Top = value;
}
}
}
}
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using Microsoft.Office.Interop;
using Microsoft.Office.Interop.Excel;
{
/// <summary>
/// EXCEL属性
/// </summary>
public class Property
{
#region 定义图表
/// 开始行索引
/// </summary>
private static int BeginRowIndex = 0;
/// <summary>
/// 开始列索引
/// </summary>
private static int BeginColumnIndex = 0;
/// <summary>
/// 横向移动长度
/// </summary>
private static int RowCount = 0;
/// <summary>
/// 纵向移动长度
/// </summary>
private static int ColumnCount = 0;
/// <summary>
/// 获得或设置开始行索引,必须为大于等于1整数
/// </summary>
public static int _nBeginX
{
get
{
return BeginRowIndex;
}
set
{
BeginRowIndex = value;
}
}
/// 获得或设置开始列索引,必须为大于等于1整数
/// </summary>
public static int _nBeginY
{
get
{
return BeginColumnIndex;
}
set
{
BeginColumnIndex = value;
}
}
/// 获取或设置横向移动长度
/// </summary>
public static int _nRow
{
get
{
return RowCount;
}
set
{
RowCount = value;
}
}
/// 获取或设置纵向移动长度
/// </summary>
public static int _nColumn
{
get
{
return ColumnCount;
}
set
{
ColumnCount = value;
}
}
#endregion
}
}