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

Created Unassigned: Page break crashes workbook in saving. [9414]

$
0
0
Hi! Thank you for good library.

I'm troubled by a simple problem.
Sometimes, workbook is crashed in saving.
In order to ascertain reproducibility conditions, I prepared simple program.
it only repeat 'open' and 'save' to same file.

```
class Program
{
static void Main(string[] args)
{
var book = new XLWorkbook(@"..\..\data\original.xlsx");
book.SaveAs(fileName(0));

for (int i = 0; i < 100; i++)
{
book = new XLWorkbook(fileName(i));
book.SaveAs(fileName(i + 1));
}
}

private static string fileName(int i)
{
return string.Format(@"..\..\data\{0}.xlsx", i);
}
}
```

When not include page break, it's no problem.
When include page break, however, workbook is crashed at about 10th roop.
Finally, memory overflow occurs.

Avoiding this problem, I add some cords deleting all of page break.
Do you have any other good ideas?

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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