public string CreateEmptyExcelPRA(string praid, string vendorname, string pratitle, string pratype, string revsion) { string PRAExcelFileName = null; string webRootPath = _hostEnvironment.WebRootPath; PRAExcelFileName = praid + " - " + vendorname + " - " + pratitle + " - " + pratype + " - " + revsion + "." + SD.TempExcelExt; var excelTempPath = Path.Combine(webRootPath, SD.TempExcelLocation.TrimStart('\\')); var excelNewPath = Path.Combine(webRootPath, SD.PRAExcelRoot.TrimStart('\\'), PRAExcelFileName); /* * // Start testing create excel file from excel using excel element * string excelpathTrimed = Path.Combine(webRootPath, excelTempPath.TrimStart('\\')); * using (ExcelPackage package = new ExcelPackage(new FileInfo(excelpathTrimed))) * * { * * ExcelWorksheet worksheet = package.Workbook.Worksheets["Sheet1"]; * ExcelWorksheet worksheetcover = package.Workbook.Worksheets["Cover Page"]; * FileInfo fi = new FileInfo(excelNewPath); * package.SaveAs(fi); * * * } * // End testing of create excel file */ SD.CopyBinaryFile(excelTempPath, excelNewPath); //System.IO.File.Copy(excelTempPath, excelNewPath,true ); // quoteVM.Quote.PdfUrl = @"\files\quotes\" + fileName + extenstion; return(SD.PRAExcelRoot + PRAExcelFileName); }