Example #1
0
        public virtual void LoadXlsx(string file)
        {
            Format = DocFormat.Xlsx;
            if (!File.Exists(file))
            {
                throw new ArgumentException("File " + file + " error");
            }

            Book = new SpreadBook();
            Book.Open(file);
        }
Example #2
0
        /* public XslxSheet(SpreadBook owner, ISheet sheet)
         * {
         *  selected = sheet.Workbook.IndexOf(sheet);
         *  this.owner = owner;
         * }
         */

        public static IList <ISheetBase> SheetList(SpreadBook owner)
        {
            var list  = new List <XlsxSheet>();
            int index = -1;

            while (index < owner.WorkSheets.Count)
            {
                list.Add(new XlsxSheet(owner, (index++))
                         );
            }
            return(list as IList <ISheetBase>);
        }
Example #3
0
 public XlsxSheet(SpreadBook owner, int index = 0)
 {
     selected   = index;
     this.owner = owner;
 }