This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Alternative for PHP_excel
A friend would like to use a Php Excel library to read/write files on formats xls and xlsx, he knows about the one called "PhpExcel" but apparently is way too big of a library for him.
I would like you to suggest if there is any other phplib you could recommend him.
Update
Please people vote this question up if you think this post is useful even when some have considered it not good enough to give it negative points (very strange since it has a lot of views and seems it has actually helped to some users). Thank you very much.
Reading only: http://sourceforge.net/projects/phpexcelreader/ 21.5kb
Create your own very simply: http://www.ibm.com/developerworks/opensource/library/os-phpexcel/
You won't find a lightweight library that can both read and write both xls and xlsx files other than PHPExcel. However, if you want a list of the available options for working with Excel files in PHP, you can find it here.
OpenTBS can generate XLSX files using the technic of templates.
It can also read any sub XML file in the XLSX.
OpenTBS can do the same with any Ms Office (docx, xlsx, pptx) and OpenOffice documents.
Related
This question already has answers here:
Convert Word doc, docx and Excel xls, xlsx to PDF with PHP
(12 answers)
Closed 4 years ago.
I want to know how to convert document file to pdf using php or codeigniter.
If anyone have any idea about the same please let me know.
To complete this, I would recommend two libraries. The first (I have not used), as Word documents are not plaintext, you will need to be able to read the Word doc. For this, try PHPWord. This appears to have been used in other projects for the purpose of reading Word docs (and creating them).
Secondly, converting to PDF use FPDF, this library I have a lot of experience. It's been around a long time so there is some great examples and documentation. It doesn't take long to figure out but does require a bit of playing around to get the PDF doc looking exactly as you like. If you need any additional info using this library, give me a shout. But both of these should help you. FPDF can also be very easily converted to a Codeigniter library. I used it in a CiBonfire application before.
This question already has answers here:
Reading an Excel file in PHP [closed]
(8 answers)
Closed 6 years ago.
I am wondering if I can get some advice on folks that might have come across this before.
Basically I have a folder with files a user can add / remove which has an iframe beside it so they can view their PDF's etc.
I cannot get excel (probably ppt either) to open up in chrome or a browser.
I know I can go through google docs, or send files and get it back different format through their api but for security it is not a solution I want to work with.
example I saw in excel:
If I have a fairly loaded excel file, graph, formulas etc., in that file I 'Save As' and convert to htm I can publish option which provides a beautiful htm page with all relative pics, links in a folder. If I can get php to do something similar this would really make my day.
I played with PHPExcel but it usually spits out a mess, sometimes just crashes because of formulas. Unless I just haven't sent the time with PHPExcel to figure this out I don't know what else to do.
You already know the best way use read excel file to php using any library then print the data.
if PHPExcel not working for you please have a look at following
"Reading an Excel file in PHP"
ps. if you are facing problem with PHPExcel kindly post you code in new question, definitely this great developer community will help you resolve that.
Let's say I've some data in cells A1-Ax from which I should get this data, process and write the result to the B1-Bx, C1-Cx and D1-Dx cells. Preferably using PHP.
You may want to look at PHPExcel.
(PHPExcel) provides a set of classes
for the PHP programming language,
which allow you to write to and read
from different file formats, like
Excel 2007, PDF, HTML, ... This
project is built around Microsoft's
OpenXML standard and PHP.
I think this is best when you have a large application written in PHP which handles excel files. I think this is not the best for very small changes.
Hope that helps.
PHPExcel is really good for reading/writing excel documents (and csv files).
Used it in a lot of projects, works really well.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Convert HTML + CSS to PDF with PHP?
I was searching for a way to convert HTML to PDF, but all I found was very limited.
There are plenty of issues you need to address, which you have failed to do so. Does it need to support advanced table structures, css support etc. As a start you can look into html2pdf or a paid solution PrinceXML
If you can use printing, you may try using the FreePDF XP printer driver.
It uses GhostScript, so a library for it, if you want to do it programatically, may also do the trick.
I'm creating Excel files in a PHP project. Those files aren't just CSV data... They are multiple tabs spreadsheets with functions and formatting.
So far I'm using the Spreadsheet_Excel_Writer class that is provided with Pear.
Everything is fine but our users don't like 2 things:
When they open those files generated by PHP, modify them with Excel and save those changes, Excel ask to upgrade the file format because it was saved to version 5.0/95.
Files are way too large because of the embedded images. As far as I know the only way to add images with Spreadsheet_Excel_Writer is with insertBitmap which add 24 bit bitmaps to the document.
I would like to address those issues. I'm pretty sure #1 can't be done as you can see there. But is there a way to add compressed images (jpeg) to the document?
If it's not possible to modify Spreadsheet_Excel_Writer to meet my needs, what are your class recommendations for this? Searching questions here leaded me to PHPExcel. Are there any other good alternatives out there?
If possible I would like to stick with Spreadsheet_Excel_Writer because changing to another class would be much more work (those generated spreadsheets are quite complex).
I'm using PHP 5.2.9.
I ended up using PHPExcel. With this class I can avoid point #1 since I can save in may formats (including Excel 2003/2007). For point #2 it's possible and PHPExcel do this already. When you chose the old Excel format, PHPExcel extends Spreadsheet_Excel_Writer in order to save the file.
It was a pain to rewrite my the code to use the new class but it was worth it since PHPExcel is really nice.
I've done this with PHP using XML for the spreadsheets. Check out this link for the XML spreadsheet: http://msdn.microsoft.com/en-us/library/aa140066(office.10).aspx and http://blogs.msdn.com/dmahugh/archive/2006/12/10/images-in-open-xml-documents.aspx for inserting images.