Welcome Guest, Not a member yet? Register   Sign In
Import certain cells of MS Excell into mysql table
#1

Hello, this is situation i have:

In our office, we have about 1000 ms excell files. And we need to input certain cells only  database, for example we need to input data in cell A22, A23 , B34,B35   into our mysql tables. Is it possible to do that?   I googling but its result are about importing csv etc into mysql,,no, not about that. what we need is import certain cells only into tables.

Any ideas how doing that? Thanks
Reply
#2

(09-21-2018, 09:14 AM)kelapamuda Wrote: Hello, this is situation i have:

In our office, we have about 1000 ms excell files. And we need to input certain cells only  database, for example we need to input data in cell A22, A23 , B34,B35   into our mysql tables. Is it possible to do that?   I googling but its result are about importing csv etc into mysql,,no, not about that. what we need is import certain cells only into tables.

Any ideas how doing that? Thanks

is it the same cells all the time or does their position change?

If it is the same cells then you can use https://phpspreadsheet.readthedocs.io/en/develop/ to process the excel file and pick up the cells you need.
Reply
#3

Have a look at PHPSpreadsheet:
https://github.com/PHPOffice/PhpSpreadsheet

It has functions for reading Excel files. Read the cells into an array, and use the insert_batch() method in CI's query builder class.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB