Document Viewer not working for docx or xlsx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I use the Document Viewer for .txt or .pdf files, and it works well. However, there are issues with .docx or .xlsx files. In the sys_document_viewer_status table, the entries show a ConversionStatus of "Conversion failed." I have noticed that ServiceNow attempts to convert these files to PDF in the background. Are there any configurations missing that would allow Word or Excel files to be displayed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
What release are you on? I just enabled this in my system and I'm not running into any issues for .xlsx or .docx files.
Edit: My company instance is currently on Yokohama. My PDI is on Australia. Both I am not seeing any issues with excel or word files. You may want to open an incident with support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hey @wiliam56par,
This isn't a missing setting so much as a different code path failing. PDF and txt display natively in Document Viewer, no conversion needed. Word and Excel files have to go through a background job that renders them to PDF first, and that's the piece throwing "Conversion failed" in sys_document_viewer_status. So the fact that pdf/txt work tells you the viewer itself, the com.snc.documentviewer plugin, and the com.snc.documentviewer.enable_document_viewer property are all fine. The problem is isolated to the office-to-PDF conversion step.
Here's how I'd chase it down:
- Test with a throwaway file first. Create a brand new, blank .docx and .xlsx (no macros, no password, no embedded objects, no external links) and attach those. If those convert fine, your original files have something in them the converter chokes on: think macro-enabled content saved with a .docx/.xlsx extension, password/IRM-protected files, corrupted zips (a common cause when files get re-saved or copied through integrations), or heavy embedded objects/charts.
- Check the file size. Document Viewer's documented max is 50 MB. Anything close to that, especially spreadsheets with a lot of formatting or embedded images, is worth trimming down as a test.
- Pull the actual sys_document_viewer_status record for a failed attachment and check every field on it, not just ConversionStatus. Sometimes there's more detail in an error or message field that doesn't show up in the list view.
- Check the system log around the exact timestamp of the failed conversion, filtering for the attachment's sys_id or "document viewer" as source. The conversion job usually logs something before it gives up, even if it's generic.
- Confirm the Document Viewer plugin is fully activated, not just installed. Some orgs have hit cases where the plugin shows as active but a dependent conversion component wasn't fully provisioned, which support has to fix from their side.
If a clean, simple .docx and .xlsx still fail to convert, that's no longer a content or config problem, it's the conversion service itself misbehaving on your instance. At that point I'd open a case with Now Support and hand them the sys_document_viewer_status record plus the syslog entries, because the actual conversion engine runs server-side and its detailed logs aren't exposed to admins. That's really the only way to get past a generic "Conversion failed" when the simple-file test still fails.
One thing worth telling me: does a brand new blank docx/xlsx also fail, or only your real-world files? That answer changes whether this is a file characteristic issue or a platform-side conversion problem, and it'll point the next step in a very different direction.
Thank you,
Vikram Karety
Octigo Solutions INC