123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- using Aspose.Cells;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Bowin.Common.Office
- {
- public enum HeaderAndFooterSection
- {
- Left = 0,
- Center = 1,
- Right = 2
- }
- public class HeaderAndFooterFormater
- {
- public HeaderAndFooterSection Section { get; set; }
- public Func<string, string> Formater { get; set; }
- }
- public class InsertColumnItem
- {
- public int ColumnIndex { get; set; }
- public int InsertCount { get; set; }
- }
- public class AsposeCellItem : CellItem
- {
- public Func<Workbook, Style> Style { get; set; }
- }
- public class AsposeListItem : ListItem
- {
- public AsposeListItem()
- {
- StyleList = new List<AsposeExcelCellStyle>();
- MergeList = new List<CellArea>();
- IsInsertRow = true;
- }
- public Dictionary<int?, int?> AutoHeightRowAndPx { get; set; }
- public bool IsInsertRow { get; set; }
- public List<AsposeExcelCellStyle> StyleList { get; set; }
- public List<CellArea> MergeList { get; set; }
- }
- public class AsposePageItem : PageItem
- {
- public AsposePageItem() : base()
- {
- MergeList = new List<CellArea>();
- InsertColumnItemList = new List<InsertColumnItem>();
- HeaderFormaterList = new List<HeaderAndFooterFormater>();
- FooterFormaterList = new List<HeaderAndFooterFormater>();
- ColumnSequenceList = new List<AsposePageColumnSequence>();
- FormularList = new List<AsposeCellItem>();
- }
- public List<InsertColumnItem> InsertColumnItemList { get; set; }
- public List<CellArea> MergeList { get; set; }
- public List<HeaderAndFooterFormater> HeaderFormaterList { get; set; }
- public List<HeaderAndFooterFormater> FooterFormaterList { get; set; }
- public List<AsposePageColumnSequence> ColumnSequenceList { get; set; }
- public List<AsposeCellItem> FormularList { get; set; }
- }
- public class AsposePageColumnSequence
- {
- public string ColumnName { get; set; }
- public List<string> SequenceList { get; set; }
- }
- public class AsposeCellStyle
- {
- public int? RowIndex;
- public int? ColIndex;
- public Style cellStyle;
- public AsposeCellStyle(int aColIndex, int aRowIndex, Style aCellStyle)
- {
- this.RowIndex = aRowIndex;
- this.ColIndex = aColIndex;
- this.cellStyle = aCellStyle;
- }
- }
- public class AsposeExcelCellPosition
- {
- /// <summary>
- /// 列序号,从0开始
- /// </summary>
- public int ColumnIndex { get; set; }
- /// <summary>
- /// 行序号,从0开始
- /// </summary>
- public int RowIndex { get; set; }
- }
- public class AsposeExcelCellStyle : AsposeExcelCellPosition
- {
- public Func<Workbook, Style> StyleFunc { get; set; }
- }
- }
|