Free Support Forum -

Error viewing TXT- XLS- and MSG files


Using the 2.0 .Net viewer, if I attempt to view TXT, XLS, or MSG files the viewer renders but it displays an error stating “Unable to create an instance of the document. The format of the document is unsupported or the document is corrupted.”. I didn’t have this problem with the previous version.

My code for setting up the viewer looks like this:

ClientHelper ch = Viewer.ClientCode();

ch.Stream(stream, fileExtension);

ch.BackgroundColor(GetStringFromRequest(“BackgroundColor”, “#526593”));

ch.OpenThumbnails(GetBooleanFromRequest(“OpenThumbnails”, false));



return ch.ToString();

Can you please confirm that these file types view successfully for you and let me know if there are other changes I should make to my code?




Hello Don,

We are sorry to hear that you have such issue. We can confirm that GroupDocs.Viewer for .NET Library supports all of mentioned file type formats.

About the issue, Sorry but we can’t reproduce the issue, maybe some additional details will help us reproduce it. Could you please share the documents that cannot be displayed in Viewer with us that we will be able to check how these files are rendered. Could be that something wrong with these specific files, if it’s true, our developers will be able to check what should be fixed.

Also please specify an exact version of GroupDocs.Viewer, which consists of a 4 numbers, to identificate which version of the Viewer should be checked.

Please come back to us with this additional information and we will reply to you with solution soon.


I don’t believe the documents themselves are the problem because the same documents work properly with Groupdocs The problem only occurs if I use

I’ve documented the exact changes made to my project in the other issue. If you prefer we can combine to two issues. I entered them separately only because the symptom is different. I suspect the solution will be the same.




This topic is merged with "Error viewing PPTX, XLSX, and DOCX".