Hola amigos que codigo me recomiendan para modificar un doc en word a partir de una plantilla con info. de una base de datos. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Hola amigos que codigo me recomiendan para modificar un doc en word a partir de una plantilla con info. de una base de datos.

3rd Jan 2017, 4:34 AM
Gerardo Jaimes
Gerardo Jaimes - avatar
5 Answers
+ 1
oh I found out how to generate .docx there are many methods one simple one is by header php has ability to write doc <?php // codes to connect and pass queries to database and get data. header('Content-type:application/Vnd.ms-word'); header('Content-Disposition: attachment:Filename=file.docx'),; echo "<html>"; echo "<head>"; echo '<meta http-equivalent=\"Content-Type\" content=\"text/html; charset=Windows-1252\">'; echo "</head>"; echo "<body>first name:"; echo $namefromdatabase; ech "</body>"; echo "</html>" ?>
4th Jan 2017, 6:47 PM
Sandeep Chatterjee
+ 7
Great u know his language
4th Jan 2017, 3:43 PM
‎‏‎‏‎Kueen
‎‏‎‏‎Kueen - avatar
+ 3
Hola amigo 😀 you can make a program that writes file by fwrite() function of php there you can use variables like $file="the file is".$namefromdatabase."is the first name" you can use information from database but it will be in .txt in a simple method .docx is difficult
3rd Jan 2017, 6:48 AM
Sandeep Chatterjee
+ 1
Nice its cool Keshvi.
4th Jan 2017, 5:01 PM
Gerardo Jaimes
Gerardo Jaimes - avatar
0
thanks, so i need a library?
4th Jan 2017, 6:11 PM
Gerardo Jaimes
Gerardo Jaimes - avatar