示例#1
0
        public static Excel.Workbook ShowForm(Excel.Workbook book)
        {
            AttachForm f = new AttachForm(book);

            if (!isOpen)
            {
                f.Dispose();
                return(null);
            }
            f.ShowDialog();
            f.Dispose();
            return(AttachForm.book);
        }
示例#2
0
        private void AttachProcess_Click(object sender, EventArgs e)
        {
            book = AttachForm.ShowForm(book);
            if (book != null)
            {
                AttachProcess.Enabled      = false;
                DettachProcess.Enabled     = true;
                toolStripStatusLabel1.Text = "Attached.  " + book.Name;
                tabControl1.Enabled        = true;

                sheets   = book.Worksheets;
                namelist = getNamelist();
            }
        }