Quantcast
Channel: PHPExcel Forum Rss Feed
Viewing all articles
Browse latest Browse all 2707

New Post: From Excel (xls/xlsx) to MySql Database

$
0
0
LWol wrote:
Hum... A small example easy, directly from the documentation (4.5.5):
``` It shows the course of all cells in a worksheet, without the use of iterators. The contents of cells are displayed, but you can easily store it in a table instead.
The type of input file can be changed as needed (type known by a test or determined by the method PHPExcel_IOFactory identify() upstream).
Only data is read (setReadDataOnly), this reduces the resources needed but in return, certain data (date, time) are less easy to interpreted.
There are other ways to do, difficulties can appear, but rather than rewrite documentation - that is freely available for everyone - we will see those you'll be faced.
Hello LWol,

With minor changes made in your script, I made it thru' to display my excel data on a webpage.

Output from a test xls file:

Username Email Gender Country sbp sbp@hotmail.com M India naga naga@hotmail.com F France suda suda@gmail.com F Germany rama rama@yahoo.com F Spain

I would be much obliged if you can just give me some clues on where to place mysqli prepared insert statements in the script.
To quote Mr. Mark's reply to a query from another thread, " Within the for row loop, instead of echoing each cell value, build it into an SQL insert statement, and then at the end of the col loop, where you currently echo '</tr>', execute the insert"; I am unable to interpret it, although its a simple and straight forward one.
Thanks again in advance.

Viewing all articles
Browse latest Browse all 2707

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>