Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for previewing Office file formats #1097

Closed
kartik-v opened this issue Oct 3, 2017 · 7 comments
Closed

Add support for previewing Office file formats #1097

kartik-v opened this issue Oct 3, 2017 · 7 comments

Comments

@kartik-v
Copy link
Owner

kartik-v commented Oct 3, 2017

Uses google docs viewer. Supported only for initial preview content and for office doc content available as a public web accessible URL link.

New preview templates available as office.

@kartik-v kartik-v changed the title Add support for previewing Office files (docx, xlsx, pptx) Add support for previewing Office file formats Oct 3, 2017
@kartik-v
Copy link
Owner Author

kartik-v commented Oct 3, 2017

Demo example available here showing preview of various office file formats.

@mohannetha
Copy link

Hi Karthik,
Preview is not working for excel and word files after browsing file
can you share the configuration for both.

@kartik-v
Copy link
Owner Author

Excel, word and Ms office doc preview is available and supported only for files uploaded to server and which you set via initialPreview.. You need to program and code your app accordingly. Read docs and examples to understand what is supported when.

@camilocalderont
Copy link

Hi Kartik-v,

Preview is not working for excel and word files after browsing file, even in your demo http://plugins.krajee.com/file-preview-management-demo#preview-data. I have used 5.0.4 versión.

Have you another method for show office files as Google Docs ?

@kartik-v
Copy link
Owner Author

Preview of office files is supported only for files accessible on internet which means they must have been uploaded and set via initialPreview. To achieve your use case you therefore need to trigger upload immediately after file browse...
And return the uploaded data as iniitialPreview... Check ajax demos for one use case like this

@camilocalderont
Copy link

Thanks for your response, I meant that the plugin did not show the preview of office files when they were already stored on the server.

For solve I use type parameter in initialPreviewConfig to show this files with Google Docs:

initialPreviewConfig: [ { caption: "CHECK MIGRACION.ods", downloadUrl: "public/storage/proyectos/adjuntos/5/1/CHECK MIGRACION.ods", filename: "CHECK MIGRACION.ods", key: 1, size: 6052, type: "gdocs", url: "public/proyectos/formulacion/eliminarAdjuntosPasoProyecto", width: "120px" } ]

@kartik-v
Copy link
Owner Author

kartik-v commented Aug 13, 2019

preview of office files is done in the plugin via Microsoft Office Online View Library...

Check the demo where it does work fine - if it is not working for you, then you may need to check if your network is blocking OFFICE viewers...

Google Docs can also be used... but you need to configure the plugin accordingly... you need to set initialPreviewConfig properly and if needed override the office and gdocs settings in fileTypeSettings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants