Well, would it be possible to give 2/3 code snippets where you are using
> the new clone function to copy sheets from one book to another?

Sure, I hope this is enough:


    c1XLBook1.Load(dlg.FileName);
    C1XLBook cloneBook = CloneBook(this.c1XLBook1);
    cloneBook.Save(dlg.FileName + "clone.xls");

    private C1XLBook CloneBook(C1.C1Excel.C1XLBook book)
    {
        C1XLBook clone = new C1XLBook();
        clone.Sheets.Clear();
        foreach (XLSheet sheet in book.Sheets)
        {
            clone.Sheets.Add(sheet.Clone());
        }
        return clone;
    }


评论

该日志第一篇评论

发表评论

评论也有版权!