Solved

Read Excel in php

Posted on 2013-11-08
3
461 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
Comment Utility
May be  this helps, http://phpexcel.codeplex.com/

You can read excel directly using this library
0
 
LVL 21

Expert Comment

by:Kim Walker
Comment Utility
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 21

Expert Comment

by:Kim Walker
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 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

9 Experts available now in Live!

Get 1:1 Help Now