Solved

import xlsx file with dates with phpmyadmin

Posted on 2013-02-07
6
2,025 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 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

617 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