Skip to content
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.

Fix issue #152 Posibility to ignore Microsoft Excel cells warning errors, like "Number Stored as Text" or "Two Digit Text Year" #540

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

romcode
Copy link

@romcode romcode commented Sep 4, 2019

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.

…arning errors, like "Number Stored as Text" or "Two Digit Text Year"
@romcode
Copy link
Author

romcode commented Nov 4, 2019

HI @EPPlus, any chance to merge this fix/pull request ? Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant