Saturday, 16 February 2019

Export HTML Page With PHP

Category : PHP Script
sekarang aku mo coba untuk memberikan tutorial yang mudah tapi menghasilkan sesuatu yang luar biasa, yaitu mencoba menbuat laporan mengunakan php dan excel. pada dasarnya excel dapat membaca html, sehinga kita hanya perlu memberikan header untuk memberitahu browser untuk membuka file kita mengunakan aplikasi excel. dan dengan ajaibnya html yang telah kita buat akan terkonversi sendiri, ajaib bukan? nah ini header yang perlu untuk di letakan pada script kita
<?
    header("application/vnd.ms-excel");
    header("Content-Disposition: attachment; filename=$filename");
?>

variable $filename harus di ganti dengan nama file yang kita kehendaki, misalnya report_tahun_2008.xls
perlu di ingat nama filenya harus berextension .xls.mudah bukan?

walo kita juga bisa masukin table dan memperindah dengan memeberikan warna, namun ada beberapa kelemahan mengunakan cara ini, karena kita tak dapat melakukan pengiriman gambar ke excel, yang artinya di report excel kita tidak ada gambar. solusi nya kita bisa mengunakan lib pear yang sudah ada, tentunya tidak semudah ini.

Like this articles? share it with Share With FacebookFacebook
<< Back
0 Comment | 3490 hits | Posted by Callrid at 2008-01-05 12:49:56

Related Read

Add Comment
Name :
Web :
Comment :

Code :
 

Other Source
A Practical Guide On Complete Multivitamins
Many of us have a hard time deciding what the best multivitamin is for us. This is completely confusing and difficult especially when there are so many bottles to scan in the various aisles of the...

High Blood Pressure
The nutritional benefits of low-fat dairy products are well known for ages. The latest studies show that the ingredients of dairy products - some combination of milk proteins are effective and...

Welcome To Mimicwatch.com - Quality Luxury Replica Vacheron Constantin Watches At Affordable Price
When entering our online store at Mimicwatch.com, you are given an unique opportunity to choose among a wide selection of famous Replica Watches and Replica handbags such as Replica Vacheron...

Ebook Marketing Tips
A great way to have a product to sell on the Internet is an e-book which almost anyone can create. There is no longer any need for delaying with the simple process detailed below. If you are afraid...

Tactical Asset Marketing
Asset Management Different Asset Allocation Strategies Asset marketing is the process of dividing a portfolio into major asset categories such as cash, stocks, real estate, or...

Shout Box
2016-11-24 08:56:05 
Pembicara Internet M
Website yagn bagus
2016-11-24 08:40:45 
Produsen Mukena
Good Website
2016-04-05 20:44:45 
Belanja Alat ukur
Belanja Alat ukur dan Thermal Camera Hanya di dutapersada.co.id
2016-04-04 07:10:03 
hit obat nyamuk
hit obat nyamuk
2016-03-31 15:26:29 
vay dam Lury 2016
We stumbled over here from a different web address and thought I might as well check things out. I like what I see so i am just following you. Look forward to finding out about your web page yet again.

Site Partners


Search Articles

Web Statistic
No Visitor :
3231801
Today Visitor :
129
Online Visitor :
1
what is my ip address? Page Rank Checker

< Feb 2019 >
SMTWTFS
     12
3456789
10111213141516
17181920212223
2425262728

Increase Page Rank

Last Modified 08-November-2011, 23:21:04 pm
callrid.com Created 2006-2012 by Anton Ongsono
All rights reserved