Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

import xlsx file with dates with phpmyadmin

Posted on 2013-02-07
6
Medium Priority
?
2,092 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 15

Accepted Solution

by:
gplana earned 1350 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 150 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

671 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