Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: ExcelToHtmlConverter throw exception when cell has background… #805

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

chen1tian
Copy link

fix bug #621 ExcelToHtmlConverter.ProcessWorkbook throws Illegal IndexedColor index: 0 error on .NET Core 3.1

when Excel cell only set background color , the CellStyle.FillForegroundColor value = 0, IndexedColors.ValueOf() mehtod throw exception " Illegal IndexedColor index: 0 error".

Add IndexedColors. TryValueOf () method, which is used in ExcelToHtmlConverter class, to check ForegroundColor, when the CellStyle. FillForegroundColor value = 0, It returns NULL instead of throwing an exception.

@tonyqus tonyqus added this to the NPOI 2.6.0 milestone Apr 24, 2022
@tonyqus
Copy link
Member

tonyqus commented Jun 29, 2022

Can you change the code based on my review comment?

@tonyqus tonyqus modified the milestones: NPOI 2.6.0, NPOI 2.6.1 Aug 21, 2022
@tonyqus
Copy link
Member

tonyqus commented Aug 22, 2022

Since I did not get any reply from committer, I have to close this PR.

@tonyqus tonyqus closed this Aug 22, 2022
@animitta
Copy link

animitta commented Sep 7, 2022

@tonyqus This problem has not been fixed, is there any fix plan?

@tonyqus tonyqus reopened this Sep 22, 2024
@tonyqus tonyqus modified the milestones: NPOI 2.6.1, NPOI 2.7.2 Sep 22, 2024
@tonyqus tonyqus merged commit ae979de into nissl-lab:master Sep 22, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants