Can't open powerpoint file using mlreportgen.ppt.Presentation Class
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Everytime I try to open a .pptx file using mlreportgen.ppt.Presentation I get an error.
import mlreportgen.ppt.*
pptObj = Presentation('test.pptx','template.pptx')
pptObj =
Presentation with properties:
TemplatePath: 'template.pptx'
OutputPath: '\\ad\empiredfs\data\aero1\Users\nemecect\Tools\matlab\src\file\exportToPowerPoint\test.pptx'
Children: []
Parent: []
Tag: 'ppt.Presentation:27'
Id: '27'
open(pptObj)
Error using mlreportgen.ppt.Presentation/open
Cannot open file. //ad/empiredfs/data/aero1/Users/nemecect/Tools/matlab/src/file/exportToPowerPoint/test.pptx
I get the error if test.pptx has already been created and I'm trying to add to the file. After the error, test.pptx goes from its original file size to 0 KB, so it effectively deletes/erases the file.
Also, I get the error if test.pptx has not been created and I'm trying to create a new file from the template. After the error, test.pptx is created with a file size of 0 KB.
How can I debug this or make this work? The error is very unhelpful. The file definitely exists. It is not open in Powerpoint and is not locked.
0 comentarios
Respuestas (1)
Kanishk
el 25 de Sept. de 2024
Hi Chris,
I understand you are facing an error while generating a PowerPoint presentation using MATLAB report generator.
I tried the workflow you mentioned and created a “template.pptx” file. I was not able to reproduce the error. I faced a similar error after removing the “template.pptx” file. Make sure the path to template file is correct.
Also, make sure you have permission to write in your current folder. I was able to reproduce the exact error after removing write permissions for the current directory.
To learn more about MATLAB report generator, please go through this official MATLAB documentation.
Thanks
Ver también
Categorías
Más información sobre MATLAB Report Generator en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!