We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Exception thrown: Cell shading sprm is too long

I am dynamically building a Word document using the DocumentBuilder based on content from our CMS. This tool has been running well for many months now, but today I’m getting the following exception when I go to save the document. Can you shed any light on what this error means so that I can analyze our content to find what’s different about this particular piece of content that would cause it to crash?


Cell shading sprm is too long. For free technical support, please post this error and the file in the Aspose.Words Forums <https://forum.aspose.com/c/words/8>.
Stack trace: at ഁ.ᖄ.ᖏ(Boolean ൷, Boolean ᖎ, Int32 ᖐ)
at ഁ.ᖄ.WriteCore()
at ഁ.ᔡ.֑(༗ ᔣ)
at ᣵ.ᣴ.ᤑ(Row ᗒ)
at ᣵ.ᣴ.VisitRowEnd(Row row)
at Aspose.Words.Row.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.ฐ(DocumentVisitor ୸)
at Aspose.Words.Table.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.ฐ(DocumentVisitor ୸)
at Aspose.Words.Body.Accept(DocumentVisitor visitor)
at ᣵ.ᣴ.ᤌ(Section ᙣ)
at ᣵ.ᣴ.ᤊ()
at ᣵ.ᣴ.ڼ(Document ၽ, Stream ղ, String ࣥ)
at Aspose.Words.Document.Save(String fileName, SaveFormat fileFormat)

Can you please attach the template document and a code snippet so that we could reproduce the error.

No, I cannot. The content is extremely large and pulled from so many areas. I don’t have time to try to isolate which particular area is causing the save to not work. Can you describe some scenarios where this exception is generated? It might give me insight as to something in our content that could cause it, since that exception message doesn’t give me any clue as to what went wrong.

The explanation might be a bit technical.
Microsoft Word binary document format originated long time ago and has a lot of qirks. In this particular case all formatting attributes of cells in a row are written into a data structure that has limited length (220 bytes if I’m correct) and that’s limitation of the DOC format.
Your table probably has quite a lot of cells, so many that it does not fit into this length and we have a check in our code to detect this situation and report it.
In general, it is possible for us to provide a resolution for this case because of the extensions that were added to the DOC format in never Microsoft Word versions. We did not support this until today because it must take quite a lot of cells and a lot of formatting specified for them to trigger this condition and we considered such documents unlikely.

I have logged this problem to our defect base as issue #1260. We will try to fix it in one of our next releases.
Best regards,

Hi Team,

Is this issue fixed. I’ve hit the same issue using AsposeWordsForJava 13.5. I feel, it’s still the same with the latest version.


Hi Kumar,

Thanks for your inquiry.

Unfortunately, the issue WORDSNET-862 is not resolved yet. This issue had been postponed till a later date due to some other important issues and new features. We will inform you as soon as there are any further developments. We apologize for your inconvenience.

Moreover, It would be great if you please share following detail for investigation purposes.

Please attach your input Word document.
create a standalone/runnable simple application that demonstrates the issue which you are facing

it is difficult to say what the problem is without the Document(s) and
simplified application. We need your Document(s) and simple project to
reproduce the problem. As soon as you get these pieces of information to
us we’ll start our investigation into your issue.

The issues you have found earlier (filed as WORDSNET-862) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.