How to display base64 encoded excel file or word file in web application

Hello Team

Could you kindly advise us on how to show the base64-encoded excel and word document on a browser? Although we are using the code as follows, we are receiving as, plugin not supported error.

var objbuilder = ('<embed width=\'100%\' height=\'100%\' src="data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,');
objbuilder += (base64String);
objbuilder += ('" type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />');

currentForm.brwPreview.htmlString = (objbuilder);

With the similar code we are able to display image,video and pdf files.

Thanks & Regards

Lakshmi Prasanna

Hi Lakshmi,

“plugin not supported error” indicates the browser cannot display excel or word document.
If excel or word documents are downloaded, the documents will be displayed by the apps.

I hope this helps.

Hi Takeshi

Thank you for your response.
So, could you kindly provide instructions on how to view Word and Excel files on a web application?

Requirement : We get base64 encoded excel and word files and we need to preview the files without downloading.

Thanks & Regards

Lakshmi Prasanna