-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Save template to Word2007 #61
Comments
@gmercey, it's a good question. Current version of Template saves only XML came from template file. There is no way to work with Template as with set of objects (tables, paragraphs, etc.) like we can with do with Document. @Progi1984, please assign this to me. I will look what can be done with that. Also I would like you to replan this for some release next to 0.7.2. Possible? |
@RomanSyroeshko Assigned :) |
What do you mean? |
You can save the template to a temp docx and read the temp using the reader. Something like below: $document = $phpWord->loadTemplate('template.docx');
// Process the template ...
$document->saveAs('temp.docx'); // Save to temp file
$phpWord = \PhpOffice\PhpWord\IOFactory::load('temp.docx'); // Read the temp file
// Do something with the phpWord object ...
unlink('temp.docx'); // Delete the temp file |
There is nothing new here. This is how template processor works with XML now. ;) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Is there a way to save a PHPWord Template Object with Word2007 Writer, for the compatibility ?
Thanks
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: