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

Opening File Crash #89

Open
MMMUK1 opened this issue Nov 9, 2017 · 0 comments
Open

Opening File Crash #89

MMMUK1 opened this issue Nov 9, 2017 · 0 comments

Comments

@MMMUK1
Copy link

MMMUK1 commented Nov 9, 2017

Hi @renebigot,

This file caused crash when opening

We experienced a crash when opening the following file attached here:
XlsxReader Crash File.xlsx.zip

A recommendation is below to resolve the crash quickly.
But you may have a better solution and look forward to hearing your views:

BRAStyles.m

The crash was located at Row 182 in ...XlsxReaderWriter/XlsxReaderWriter/BRAStyles.m:
} else { return self.indexedColors[[attributes[@"_indexed"] integerValue]];

this seemed to be fixed with:

if([attributes[@"_indexed"] integerValue] < self.indexedColors.count)
return self.indexedColors[[attributes[@"_indexed"] integerValue]];
else
return [UIColor blackColor]; }

Default Colors - an out of bounds fix

I saw your issue #4 fix about colours linked to cell comments. I think this is a similar type of issue but a different crash source when opening a *.xlsx file with certain colour attributes.

With regard to #4 :

renebigot commented on 22 Sep 2015
It seems that Excel has created a color indexed at index 81 (may be different in your case). Default indexed colors indexes should be lower than 65. No color 81 is defined by Excel in the XMLs: I don't understand why.
I'm working on it.
renebigot commented on 28 Sep 2015
this bug is corrected in the current version.

** We agree. And how did you fix it? My guess is that when companies ask branding/marketing companies to provide Excel templates, the branding/marketing Excel teams mess around with default color indexes so that client companies can use their default brand colours (i.e. outside of the typical default colours under 65). Do you think this could be the reason for disruption in default attributes over 65?

Regards,
Michael

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

No branches or pull requests

1 participant