Read word file in Laravel 5.3

Asked

Viewed 612 times

0

Guys I’m having a difficulty reading a Word file in the Windows, the situation is as follows:

I have a form where a person adds a word file in an input type file field. I want to take the text of this word, separate it into a variable to later write to the database. This is possible ?

  • This may help: http://stackoverflow.com/questions/31627389/phpword-in-laravel-5

  • So, I searched on this library, but it is only written (generation of a new word) .. in case I already have a word ready, I just wanted to take the text and save one in a variable.

  • And this solution? http://stackoverflow.com/questions/19503653/how-to-extract-text-from-word-file-doc-docx-xlsx-pptx-php

  • This solution is also just writing and not reading ...

  • A question, this upload really needs to be in docx?

1 answer

1

  • Man I thought about it here : https://github.com/PHPOffice/PHPWord/blob/develop/samples/Sample_11_ReadWord2007.php. but it doesn’t really help either . is one of the library’s examples

  • But what do you need after all? You just want to turn the uploaded file into text?

  • Let’s assume that I just created a text inside a word file, I will take this word and upload it in a form on my site, after that the system receives that file, enters the file, takes the text that was typed and stores it in a variable... You could do that ?

  • @Danilotiagothaisantos I think I’ve done something like this, I’m trying to remember. I’ll pass you as soon as I’m more relaxed.

  • Oh cool ! I’m on hold.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.