Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Commented Unassigned: How to update/formatting existing excel (like template) file? [9491]

$
0
0
Please guide me for How to update/formatting existing excel (like template) file?

I have tried below code but it's give error.

// FilePath - c drive temp folder
string tempFile = FilePath + "Test.xlsx";

//Workbook formatting..... Start

XLWorkbook workbook = new XLWorkbook(tempFile);
IXLWorksheet worksheet = workbook.Worksheet(1);

worksheet.Cell(9, 1).Value = "AA";
workbook.SaveAs(tempFile);

//Workbook formatting..... End

Error: An item with the same key has already been added.

Please guide me. Thanks in Advance.

Comments: Please try with the latest version of ClosedXML (v0.80.1) and let me know if the error still occurs.

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>