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

Commented Unassigned: Cell formating - missing [8876]

$
0
0
I'm using Closed XML (0.68.1) to read Template document and then to generate new documents from template, but problem is that formatting of cells (Border, colors, ...) is lost after first cycle.
Below my test code

for (int i = 0; i < 4; i++) {
byte[] tTemplate = File.ReadAllBytes("MyTemplate.xlsx");
var workbook = new XLWorkbook(new MemoryStream(tTemplate));

MemoryStream tOut = new MemoryStream();
workbook.SaveAs(tOut);
byte[] tOutData = tOut.ToArray();

string tOutDoc = string.Format("Ret_{0}.xlsx", DateTime.Now.ToString("yyyy-MM-dd HH_mm_ss_fff"));
FileStream tFile = File.Create(tOutDoc);
tFile.Write(tActual, 0, tActual.Length);
tFile.Close();
}

Thanks
Comments: Having the same problem here, on a smaller scale. Blank rows with nothing but the fill set are losing their fill.

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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