示例#1
0
        public void RemoveSheetTest()
        {
            MemoryStream        stream = SpreadsheetReader.Create();
            SpreadsheetDocument doc    = SpreadsheetDocument.Open(stream, true);

            var result = SpreadsheetWriter.RemoveWorksheet(doc, "Sheet2");

            Assert.IsTrue(result, "A worksheet was not removed from the document.");

            //Save to the memory stream, and then to a file
            SpreadsheetWriter.Save(doc);
            SpreadsheetWriter.StreamToFile(string.Format("{0}\\removesheet.xlsx", GetOutputFolder()), stream);
        }