LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-17-2013, 03:15 AM   #1
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Function to open docx or doc or xls or xlsx files in php.


Hi,

i have my little cheatsheet on php-mysql, i use to put some text files and use them to search contents from my notes.

So i am not that good in php can anybody have any idea how to open doc or xls spreadsheets in php.

i tried using file_get_contents() and fopen() but not succeeded however successfully processed text files.

Any help or logic(*so i can give it a try on my own) how to achieve that.
 
Old 12-17-2013, 04:50 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Hi

Do you mean Microsoft Word documents or Microsoft Excel?

Excel files are complicated. And there are many versions. But fortunatly there are libraries for this.

http://code.google.com/p/php-excel-reader/

Some documentation:

http://code.google.com/p/php-excel-r.../Documentation
 
Old 12-17-2013, 07:07 AM   #3
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Original Poster
Rep: Reputation: Disabled
@Guttorm you can say its MS word document, i use openoffice with ".doc" extensions.

So any idea what code could read .doc files ? The links provided are too in depth i need the code for just my cheatsheet so a small code that can read .doc would be great or i will use text files only..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Opening doc docx files in fedora 17 fabe856 Linux - Newbie 9 12-08-2016 01:11 AM
how to open .doc/.docx files decodedthought Fedora 4 01-10-2010 02:57 PM
How to open doc and docx files neerajrawat1 Red Hat 4 07-20-2009 08:56 AM
How to open doc and docx files in RHEL 5 neerajrawat1 Linux - Newbie 1 07-20-2009 07:15 AM
[SOLVED] Open Office double saving (odt + doc, or ods + xls) Linux.tar.gz Linux - Software 2 10-11-2007 04:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration