Connection to excel

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ozkandokuz
Forum Newbie
Posts: 4
Joined: Tue Sep 14, 2004 2:51 am

Connection to excel

Post by ozkandokuz »

feyd | Please use

Code: Select all

tags when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Code: Select all

<?php
require("DB.php");
$excel_baglantisi = new COM("excel.application");
$excel_baglantisi->Visible = false;
$CalismaKitabi = $excel_baglantisi->workbooks->add();
$CalismaKitabi->Cells(1,1)->value = "name";
$CalismaKitabi->Cells(1,2)->value = "price";
$CalismaKitabi->Cells(1,3)->value = "time";
$CalismaKitabi->SaveAs("cal_raporlari-$ucret.xls");
$excel_baglantisi->quit();
?>
Why doesn't these codes work? I took these codes from a book. I didn't understand what the DB.php is. The book says u can download it from internet. But I don't know how to find it.
I want to write some datas from database to excel. How can I do this.


feyd | Please use

Code: Select all

tags when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

DB.php could be the Database functions ;)
Where you can downloaded??? mmmm if the book says that.. try searching the webpage of the book.
Post Reply