Пример #1
0
        private void btnCopySheet_Click(object sender, EventArgs e)
        {
            ExcelBinder excelbinder = new ExcelBinder();

            excelbinder.NewDocument();

            excelbinder.Visible = true;

            excelbinder.RenameSheet(3, "RenameTest1");
            excelbinder.SetActiveWorkSheet(3);
            excelbinder.SetValue("A1", "Renamed Test Sheet");

            excelbinder.sheetCopy("RenameTest1", "CopyedTest2");
            excelbinder.SetActiveWorkSheet("CopyedTest2");
            excelbinder.SetValue("A1", "Copyed Test Sheet");

            excelbinder.SaveAsDocument(Path.Combine(Environment.CurrentDirectory, "testcopyheet.xls"));

            excelbinder.CloseDocument();

            excelbinder.QuitDocument();
        }