Skip to content
This repository was 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"#539

Closed
romcode wants to merge 1 commit intoJanKallman:masterfrom
romcode:manage-cells-warning-errors
Closed

Fix issue #152 Posibility to ignore Microsoft Excel cells warning errors, like "Number Stored as Text" or "Two Digit Text Year"#539
romcode wants to merge 1 commit intoJanKallman:masterfrom
romcode:manage-cells-warning-errors

Conversation

@romcode
Copy link
Copy Markdown

@romcode romcode commented Sep 3, 2019

(The code of this pull request was incomplete, therefore I closed it and create a new pull request #540 )
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
Copy Markdown
Author

romcode commented Sep 4, 2019

I've just discovered the credits link to briddums solution is wrong. I'll close this pull request and create a new one with the correct credits.

@romcode romcode closed this Sep 4, 2019
@romcode romcode deleted the manage-cells-warning-errors branch September 4, 2019 07:50
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