Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 2262

Created Unassigned: Excel crash with pivot table [15240]

$
0
0
Hi,

when creating a pivot table for a data range where one of the field names contains a line break (\r\n) , Excel crashes on opening the resulting .xlsx file.

This can also be reproduced with one of the EPPlus samples:

Sample12.cs, starting with line 97:

```
wsData.Cells[2, 6, dataRange.End.Row, 6].Style.Numberformat.Format = "mm-dd-yy";
wsData.Cells[2, 7, dataRange.End.Row, 11].Style.Numberformat.Format = "#,##0";

// Add the following line to reproduce the error
wsData.Cells["B1"].Value = "FirstName\r\n(as in Passport)";

dataRange.AutoFitColumns();

```
The weird thing is, even if you do not have the line break in the resulting file, but add it afterwards via Excel and do a "refresh all" for the pivot tables - it crashes as well.

If you save the file after adding the line break without doing a "refresh all" it will not open up afterwards but crash, which effectively destroys the file...

Currently I'm not using the line break to avoid this but it would be very good if this was fixed because you can't know what the users are doing with those files.

If I manually create a pivot with line breaks in Excel , this problem does not occur.

Thomas

Viewing all articles
Browse latest Browse all 2262

Trending Articles



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