Free Support Forum - aspose.com

Invalid palette colour numbers: 3

I’m trying to open up my first Excel file and it’s blowing up on the first call. That is,

Workbook workbook = new Workbook();
workbook.open(file.getAbsolutePath());

com.aspose.cells.CellsException: Invalid palette colour numbers: 3
at com.aspose.cells.cP.b(Unknown Source)
at com.aspose.cells.cP.d(Unknown Source)
at com.aspose.cells.cP.a(Unknown Source)
at com.aspose.cells.Workbook.o(Unknown Source)
at com.aspose.cells.Workbook.open(Unknown Source)


I’ve tried this on a number of files. All with the same result.

Hi,

Would you please post the template file here? That will help us to figure the issue out.

Upon further review it appears that the input is causing this problem. I have been able to generate text output from several other files with no significant issues.

The problematic files I have are confidential and I cannot send them. However, I am trying to obtain others from the same source which are suitable for submission. I’ll post them here as soon as I can.

I think that these files may have been created by MS Office for Macintosh.

So I created a spreadsheet with appleworks and saved it as an excel doc. I then ran the text conversion on it and it didn’t blow up, but it also failed to extract any of the text - only the numbers.

I’ll include the file here. The other one was something similar, create with Mac Numbers or something like that. I’m still trying to get a file and when I do I’ll send it up.

Hi,

Thanks for the template file.

We will check your case and figure out your case. We appreciate if you could post other file which has the issue.

Thank you.

Hi,

Please try this fix.

Does the attached file created by Ms Excel? Which Ms Excel version do you use?

That worked much better for my AppleWorks file. The other file I have was also not created by Excel, but some other Mac program and saved as an Excel doc. It still fails with the same stack trace:
com.aspose.cells.CellsException: Invalid palette colour numbers: 3
at com.aspose.cells.ct.b(Unknown Source)
at com.aspose.cells.ct.d(Unknown Source)
at com.aspose.cells.ct.a(Unknown Source)
at com.aspose.cells.Workbook.o(Unknown Source)
at com.aspose.cells.Workbook.open(Unknown Source)
at AMSCells.extractText(AMSCells.java:58)
at AMSCells.main(AMSCells.java:91)

I’ve asked for some test data in this format and still haven’t received any. I will try again and post the result.

Hi,

Please try this attached fix, thanks

This appears to work.

Thanks,

Kurt