public string FileUpdate_WriteAndUpdatingWithOneRow_Updated() { var worksheet = new Worksheet(); var cells = new List <CellRow>(); cells.Add(TestCellRow); worksheet.PopulateRows(cells, usePropertiesAsHeadings: true); var templateFile = new FileInfo(TemplateFilePath); var inputFile = new FileInfo(Path.Combine(ResourcesPath, "temp.xlsx")); if (inputFile.Exists) { inputFile.Delete(); inputFile.Refresh(); } //Writing Data One Row using (var fastExcel = new FastExcel(templateFile, inputFile)) { fastExcel.Write(worksheet, "Sheet1"); } inputFile.Refresh(); using (var fastExcel = new FastExcel(inputFile)) { fastExcel.Update(worksheet, "Sheet1"); } return(FileRead_ReadingSpecialCharactersCore_Read(inputFile)); }
public string FileWrite_WritingOneRow_Wrote() { var inputFilePath = new FileInfo(Path.Combine(ResourcesPath, "temp.xlsx")); if (inputFilePath.Exists) { inputFilePath.Delete(); } inputFilePath.Refresh(); var templateFilePath = new FileInfo(TemplateFilePath); using (var fastExcel = new FastExcel(templateFilePath, inputFilePath)) { List <CellRow> objectList = new List <CellRow>(); objectList.Add(TestCellRow); fastExcel.Write(objectList, "sheet1", true); } return(FileRead_ReadingSpecialCharactersCore_Read(inputFilePath)); }