コード例 #1
0
ファイル: frmShowExample.cs プロジェクト: tangaoxiang/ERM
        private void frmShowExample_Load(object sender, EventArgs e)
        {
            int ret = Cell1.OpenFile(this._filePath, "");

            if (ret != 1)
            {
                this.Close();
            }
        }
コード例 #2
0
        /// <summary>
        /// 获得文件页数
        /// </summary>
        /// <returns></returns>
        private int GetPages()
        {
            int res   = Cell1.OpenFile(txtLocalPath.Text, "");
            int pages = 0;

            if (res == 1)
            {
                for (int i = 0; i < Cell1.GetTotalSheets(); i++)
                {
                    if (Cell1.GetSheetLabel(i).Contains(Globals.Descriptive) == false)
                    {
                        pages += Cell1.PrintGetPages(i);
                    }
                }
            }
            Cell1.closefile();
            return(pages);
        }