/// <summary> /// Creates a new file with the style copied from this one /// </summary> /// <param name="fileName"></param> /// <returns></returns> public ExcelFile CopyWithStyle(string fileName) { var file = new ExcelFile(); file.Create(fileName); file.WorkbookPart.WorkbookStylesPart.Stylesheet = (Stylesheet)Stylesheet.CloneNode(true); file.Stylesheet = file.WorkbookPart.WorkbookStylesPart.Stylesheet; return(file); }