Solved

import xlsx file with dates with phpmyadmin

Posted on 2013-02-07
6
1,889 Views
Last Modified: 2013-02-26
Hi all,

I want to import data from an xlsx file containing dates (see the file attached log.xlsx) in a MySQL db.

I join a snapshot of my webserver configuration (server-config.png) .

Thanks in advance.
log.xlsx
server-config.png
0
Comment
Question by:Richard Coffre
  • 3
  • 2
6 Comments
 
LVL 15

Accepted Solution

by:
gplana earned 450 total points
ID: 38864173
I would use phpMyAdmin. There is an import option in there. If xlsx files are not supported, try to open file on Excel an save it as xls or as csv.

Here is a good explanation in how to import a csv file using phpMyAdmin: http://blog.rickyc.org/2011/01/04/phpmyadmin-import-excel-csv-into-table/

Hope it helps.
0
 
LVL 1

Assisted Solution

by:TWHARRIS
TWHARRIS earned 50 total points
ID: 38864336
This may help:
PHPExcel (PHP Library) - Read, Write and Create Excel documents in PHP
http://phpexcel.codeplex.com

Partial Example:
http://stackoverflow.com/questions/8221096/import-an-excel-file-into-a-mysql-table-with-phpexcel
0
 
LVL 1

Author Comment

by:Richard Coffre
ID: 38864420
The problem is to import properly the date to have date fields in MySQL.

Any ideas ?
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 15

Expert Comment

by:gplana
ID: 38864472
I think it should work if MySQL fields are date data type, and also your local configuration (on the server where MySQL database is) fits the configuration on your Excel File.

I also think this link may help: http://stackoverflow.com/questions/6671877/how-to-keep-the-datetime-format-from-csv-to-mysql-database-when-importing-data
0
 
LVL 1

Author Comment

by:Richard Coffre
ID: 38877395
I will test all the solutions tomorrow.
Then I will rank them.
0
 
LVL 15

Expert Comment

by:gplana
ID: 38877582
No problem. Let us know if it works.

Regards.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Creating and Managing Databases with phpMyAdmin in cPanel.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now