N
N
netrox2018-05-22 10:57:19
PHP
netrox, 2018-05-22 10:57:19

How to export data from database to excel?

The page displays data in table tags received from the database. How to use PhpSpreadsheet to export received data to Excel and then download. Currently using Laravel.

public function index()
    {
        $users=DB::table('bf_busers')->limit(30)->get();
        return view('posts.index')->with('users',$users);
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yan-s, 2018-05-22
@Yan-s

Read the documentation?
phpspreadsheet.readthedocs.io/en/develop/#hello-world

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question