I would like to know if someone triend exporting data from MySQL to an ODF format ?
Any information / documentation would be very much appreciated.
I am going to try to export a MySQL result set to ODF spreadsheet if possible.
You could try looking at this: http://www.phpclasses.org/browse/package/4398.html
However looking at the source code it doesn't look great and has lots of hard coded xml strings
Another option to create OOo files with PHP is tbsOOo; however, it is mainly a templating engine.
This class allows to create OpenOffice
documents dynamically by separating
display formatting from logic and
data. In practice, you create a
template using OpenOffice with the
TinyButStrong tags. Then you create a
PHP script that merges the template
with a data source to get a new
OpenOffice document.
There is also: OpenDocument PHP which is more complex and can create the files dynamically.
Related
I need to generate Word document using PHP. I have html, save it as doc-file, but now I need to insert in this file excel table. How can I do it with html content, or I need some classes to do it?
There is an excellent PHP class for creating Excel documents. It is called php-export-data by Eli Dickinson, http://github.com/elidickinson/php-export-data.
Also you can check this stackoverflow question: Alternative for PHP_excel
However, this is some sort of advanced task, you better be prepared.
I want to get data from mysql and display in .epub format using php, since am very new php (Codeigniter) & don't know about ePub (one of eBook format), please can some one help me to achieve this. What is the logic or the process need to follow.
Thanks in Advance.
You should output the data of the SQL database into XHTML files, and also keep record of which XHTML files you've written. With such output, you could use an EPUB creator tool manually or call it automatically. Since PHP is able to create zip files, all of this can be done within PHP. In case your question is still unsolved and you want such a PHP based EPUB creation software (or a workflow with a separate EPUB creator tool to call), just let me know, I would probably develop such a solution (licensed under GNU AGPL).
Hi everybody
I'm using CKeditor to edit and generate some reports for my php project. But I need to export the edited texts from CkEditor to Open office and Microsoft word format. So what I need is a class or component which has a function like these :converttoodf($htmlcode) converttodoc($htmlcodes) which return odf and doc format.
However, The doc and Odf file should be without problem , and the pictures and tables should be shown nicely.
In addition, No matter if yr solution be commercial, I may buy it cause I really need it urgently
Tnx in advance and hope can get the right answer asap , here
XLS:
http://docraptor.com/ (automatic conversion from HTML)
or
http://phpexcel.codeplex.com/ (manual building of file, just like phpword from another answer)
DOC
You can get away with just saving the HTML with inline css styles applied and saving it as a .doc. Not sure about how to display images there though.
ODT
http://incubator.apache.org/zetacomponents/documentation/trunk/Document/tutorial.html
more info: http://www.slideshare.net/tobyS/presentation-5028656
You might want to take a look at phpword... i know it supports html documents but im not sure if you can jsut load some source and save it out - you may have to build the document programatically.
If you need ODT anyway, then I'd recommend using OpenOffice via commandline. There is http://www.artofsolving.com/opensource/pyodconverter which can convert between pretty much all Office formats.
HTML import shouldn't be a problem. Don't be foiled by the PDF example. Input and output formats can vary. http://www.oooninja.com/2008/02/batch-command-line-file-conversion-with.html
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.
I try to edit ODT-documents programmaticly in PHP. In fact I just want to do some text replacement and adding new rows in a table.
I know that a normal ODF document is an archive containing XML-files. But before I reinvent the wheel: is there any library which does most of the tasks? Or should I just parse the XML-file in a DOM-parser and modify it?
http://en.wikipedia.org/wiki/OpenDocument_software lists several PHP tools for working with ODT.
Docvert
OpenDocumentPHP
odf-xslt
OpenDocument
ods-php
odtPHP
I haven't used any of these, I'm just giving you the list. You'll have to evaluate them to see if they have the specific features you need.
I also suggest that you also try with OpenTBS.
It is able to edit an OpenDocument file using the technical of templates, but it can also retrieve XML in an OpenDocument.