Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 477
  • Last Modified:

Read Excel in php

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
Richard Korts
Asked:
Richard Korts
  • 2
1 Solution
 
Loganathan NatarajanLAMP DeveloperCommented:
May be  this helps, http://phpexcel.codeplex.com/

You can read excel directly using this library
0
 
Kim WalkerWeb Programmer/TechnicianCommented:
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
 
Kim WalkerWeb Programmer/TechnicianCommented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now