Skip to content

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

Merged
tonyqus merged 1 commit into
nissl-lab:masterfrom
chen1tian:master
Sep 22, 2024
Merged

bugfix: ExcelToHtmlConverter throw exception when cell has background…#805
tonyqus merged 1 commit into
nissl-lab:masterfrom
chen1tian:master

Conversation

@chen1tian
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

animitta commented Sep 7, 2022

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

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