AsposeExcelModel.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Aspose.Cells;
  6. namespace EMIS.Utility
  7. {
  8. public enum HeaderAndFooterSection
  9. {
  10. Left = 0,
  11. Center = 1,
  12. Right = 2
  13. }
  14. public class HeaderAndFooterFormater
  15. {
  16. public HeaderAndFooterSection Section { get; set; }
  17. public Func<string, string> Formater { get; set; }
  18. }
  19. public class InsertColumnItem
  20. {
  21. public int ColumnIndex { get; set; }
  22. public int InsertCount { get; set; }
  23. }
  24. public class AsposeCellItem : CellItem
  25. {
  26. public Func<Workbook, Style> Style { get; set; }
  27. }
  28. public class AsposeListItem : ListItem
  29. {
  30. public AsposeListItem()
  31. {
  32. StyleList = new List<AsposeExcelCellStyle>();
  33. MergeList = new List<CellArea>();
  34. IsInsertRow = true;
  35. }
  36. public bool IsInsertRow { get; set; }
  37. public List<AsposeExcelCellStyle> StyleList { get; set; }
  38. public List<CellArea> MergeList { get; set; }
  39. }
  40. public class AsposePageItem : PageItem
  41. {
  42. public AsposePageItem()
  43. : base()
  44. {
  45. MergeList = new List<CellArea>();
  46. InsertColumnItemList = new List<InsertColumnItem>();
  47. HeaderFormaterList = new List<HeaderAndFooterFormater>();
  48. FooterFormaterList = new List<HeaderAndFooterFormater>();
  49. }
  50. public List<InsertColumnItem> InsertColumnItemList { get; set; }
  51. public List<CellArea> MergeList { get; set; }
  52. public List<HeaderAndFooterFormater> HeaderFormaterList { get; set; }
  53. public List<HeaderAndFooterFormater> FooterFormaterList { get; set; }
  54. }
  55. internal class AsposeExcelStyle
  56. {
  57. public int Row { get; set; }
  58. public int Col { get; set; }
  59. public Style Style { get; set; }
  60. }
  61. }