I have an Excel 2007 spreadsheet that I edit with the OpenXML SDK 2. I remove some rows etc. I would like to know how to save that Spreadsheetdocument to another filename.>
You could save that Spreadsheetdocument to another filename then open it to edit.
string sourceFile = "C:\Users\***.xlsx";
string destFile = "C:\Users\*****.xlsx";
System.IO.File.Copy(sourceFile, destFile, true);
using (SpreadsheetDocument spreadsheetDoc = SpreadsheetDocument.Open(destFile, true))
{
//remove some rows etc
//save workbookpart
}
References:How to: Copy, Delete, and Move Files and Folders (C# Programming Guide)