Solved

import xlsx file with dates with phpmyadmin

Posted on 2013-02-07
6
1,901 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mySql Syntax 7 44
MySQL Select latest stock count records 11 57
How to connect to a remote mysql server using C#? 9 57
configure dependency in POM for new database 3 17
Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

15 Experts available now in Live!

Get 1:1 Help Now