473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Exporting data to MS Excel

How to export data to xls file using PHP? Is it possible to edit a
look of document (like cell size, borders etc.) ? Please help.

Jun 20 '07 #1
5 4334
On 20 Jun, 12:13, Dawid Pustulka <DPustu...@gmail.comwrote:
How to export data to xls file using PHP? Is it possible to edit a
look of document (like cell size, borders etc.) ? Please help.
http://www.koders.com/php/fid2163EF6...A5.aspx?s=mary
has a simple class to create a workbook in Excel97 format.

phpclasses.org has some others.

Alternatively a tab delimited file with a .XLS sufix will load fine
into Excel.

To do cell size and borders you will need to create something in
Excel's xml format:

http://msdn2.microsoft.com/en-us/lib...ffice.10).aspx

Jun 20 '07 #2
On Jun 20, 7:50 am, Captain Paralytic <paul_laut...@yahoo.comwrote:
On 20 Jun, 12:13, Dawid Pustulka <DPustu...@gmail.comwrote:
How to export data to xls file using PHP? Is it possible to edit a
look of document (like cell size, borders etc.) ? Please help.

To do cell size and borders you will need to create something in
Excel's xml format:

http://msdn2.microsoft.com/en-us/lib...ffice.10).aspx
I find the XML method to be the easiest. But you don't have to bother
trying to learn the proper nodes and structure. Just make an excel
worksheet and fill it with fake data to make it look the way you want,
then Save As as XML and open the resulting document in a text editor.
You should be able to figure it out from there and replace the fake
data with the real.

Jun 20 '07 #3
On 20 Jun, 12:57, Moot <use...@mootsoft.comwrote:
On Jun 20, 7:50 am, Captain Paralytic <paul_laut...@yahoo.comwrote:
On 20 Jun, 12:13, Dawid Pustulka <DPustu...@gmail.comwrote:
How to export data to xls file using PHP? Is it possible to edit a
look of document (like cell size, borders etc.) ? Please help.
To do cell size and borders you will need to create something in
Excel's xml format:
http://msdn2.microsoft.com/en-us/lib...ffice.10).aspx

I find the XML method to be the easiest. But you don't have to bother
trying to learn the proper nodes and structure. Just make an excel
worksheet and fill it with fake data to make it look the way you want,
then Save As as XML and open the resulting document in a text editor.
You should be able to figure it out from there and replace the fake
data with the real.
Sometime I'll write a class to do it. Sometime.....

Jun 20 '07 #4
On Jun 20, 7:13 am, Dawid Pustulka <DPustu...@gmail.comwrote:
How to export data to xls file using PHP? Is it possible to edit a
look of document (like cell size, borders etc.) ? Please help.
Hi,

There are a few options you might like:

o You can export the data as an HTML table:

http://www.php-mysql-tutorial.com/php-mysql-select.php

o Use the Excel.Application COM object on windows:

http://web.informbank.com/articles/t...-documents.htm

o You can export in CSV format the values only:

http://webdeveloper.terapad.com/inde...s&newsID=10879

o Or use the PEAR Spreadsheet_Excel_Writer class to create an excel
doc:

http://pear.php.net/manual/en/packag...cel-writer.php

Jun 20 '07 #5
On 20 Jun, 13:06, petersprc <peters...@gmail.comwrote:
On Jun 20, 7:13 am, Dawid Pustulka <DPustu...@gmail.comwrote:
How to export data to xls file using PHP? Is it possible to edit a
look of document (like cell size, borders etc.) ? Please help.

Hi,

There are a few options you might like:

o You can export the data as an HTML table:

http://www.php-mysql-tutorial.com/php-mysql-select.php

o Use the Excel.Application COM object on windows:

http://web.informbank.com/articles/t...-documents.htm

o You can export in CSV format the values only:

http://webdeveloper.terapad.com/inde...s.newsDetails&...

o Or use the PEAR Spreadsheet_Excel_Writer class to create an excel
doc:

http://pear.php.net/manual/en/packag...dsheet-excel-w...
The csv link above is in fact a tab delimited format as I suggested
earlier.

Jun 20 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris | last post by:
Could someone please provide me an effective means of exporting data from a data set (or data grid) to Excel?
3
by: sridevi | last post by:
Hello How to export data from ms-access database to excel worksheet using ASP. mainly i need to export data to multiple worksheets. it is very urgent to us. i have a sample code which works...
4
by: D | last post by:
I've created a report with many subreports of aggregate data. I want my client to be able to export this data to Excel to make her charts, etc. Only one problem: one of the fields is a "SchoolYear"...
2
by: G | last post by:
When I export data from access to excel by with "export" or "Analyze with" I seem to loose parts of some fields (long text strings). Is there a way to export it all to excel? Thanks G
2
by: pmud | last post by:
Hi, I am exporting data from an EDITABLE DATA GRID EXCEL. But the 1st column in data grid is Edit Column. I want to display all columns in Excel except for the Edit column. The following...
2
by: bienwell | last post by:
Hi, I have a question about exporting data from datagrid control into Excel file in ASP.NET. On my Web page, I have a linkbutton "Export data". This link will call a Sub Function to perform...
21
by: bobh | last post by:
Hi All, In Access97 I have a table that's greater than 65k records and I'm looking for a VBA way to export the records to Excel. Anyone have vba code to export from access to excel and have the...
2
by: Snozz | last post by:
The short of it: If you needed to import a CSV file of a certain structure on a regular basis(say 32 csv files, each to one a table in 32 databases), what would be your first instinct on how to...
1
by: 333sridhar333 | last post by:
Hi, I am having a problem in exporting a data from jsp to excel. I am getting the values from a servlet and populating it to a JSP. And form there i export them to Excel. The functionality...
2
by: 333sridhar333 | last post by:
Hi, I am having a problem in exporting a data from jsp to excel. I am getting the values from a servlet and populating it to a JSP. And form there i export them to Excel. The functionality...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.