Fix issue #152 Posibility to ignore Microsoft Excel cells warning errors, like "Number Stored as Text" or "Two Digit Text Year"
This pull request fix the issue #152 , adding to EPPlus the posibility to ignore Microsoft Excel cells warning errors, like "Number Stored as Text" or "Two Digit Text Year"
Following briddums advise ( https://stackoverflow.com/users/260473/briddums ), as himself explained in https://stackoverflow.com/questions/11858109/using-epplus-excel-how-to-ignore-excel-error-checking-or-remove-green-tag-on-t/14483234#14483234 , the best way to address this issue is adding a whorksheet property that allows to ignore the warnings in a specified range.
ExcelWorksheet worksheet = package.Workbook.Worksheets.Add("WhorksheetSample");
// Set the cell range to ignore errors on to the entire worksheet
worksheet.IgnoredError.Range = worksheet2.Dimension.Address;
// Do not display the warning 'number stored as text'
worksheet.IgnoredError.NumberStoredAsText = true;
I added a sample use case to this commit.
I would like it, but I coudn't added a test case to the commit, as I didn't find a way to check if the cell contains a warning.
Would you mind to merge this pull request?
Best regards.
HI @EPPlus, any chance to merge this fix/pull request ? Thank you!