Solved

import xlsx file with dates with phpmyadmin

Posted on 2013-02-07
6
1,972 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

752 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