Solved

Read Excel in php

Posted on 2013-11-08
3
469 Views
Last Modified: 2013-11-08
Does the facility exist to directly read Excel spreadsheet files uploaded to a web server using php?

I know how to read a csv saved excel sheet, but not how to read excel directly.

Thanks
0
Comment
Question by:Richard Korts
  • 2
3 Comments
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 500 total points
ID: 39634186
May be  this helps, http://phpexcel.codeplex.com/

You can read excel directly using this library
0
 
LVL 22

Expert Comment

by:Kim Walker
ID: 39634204
First of all, csv (comma-separated-values) is a comma-delimited ASCII TEXT file. You can save an Excel spreadsheet as a csv file, but it is no longer an Excel file. Because Microsoft Excel maps all .csv files to open in Excel, many people come to believe the .csv is a native Excel file format. But it is not.

PHP has built-in functions for reading .cvs files. For example, fgetcsv() will read a line from a csv file and parse it into an indexed array. The php.net document is good for explaining how to use it.

On the other hand, if you want to read a native Excel file, I have used PHPExcel as an extension to PHP in the past. That was a few years ago. I do remember it worked quite well but I did struggle to understand how to use it.
0
 
LVL 22

Expert Comment

by:Kim Walker
ID: 39634222
Sorry rkorts. Ignore my previous comment. I misinterpreted your question and provided information that you obviously already knew. The rest of my comment duplicates what logudotcom provided.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how can i gnupg encrypt a PDF document? 12 64
how to use Initialization Vector for openssl_encrypt() 5 63
PHP and MSSQL Arrays and Variables 3 25
issue with DB import 1 19
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

828 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