WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Export Excel Dynamically to Csv then to mysql
Categories : PHP Classes, Excel, PHP Update Picture
dan rossi
Date : Apr 02nd 2003
Grade : 3 of 5 (graded 24 times)
Viewed : 26175
File : No file for this code example.
Images : No Images for this code example.
Search : More code by dan rossi
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

<?
class Export_Excel {
        var $command
        function Export_Excel() {
                $this->command = "/xls2csv";
        }

        function xls2csv($path,$xls_file,$short_name) {
                $cmd = escapeshellcmd("$this->command -q 0 $path.$xls_file");
                $cmd .= " > $path.$short_name.csv";
                @exec($cmd,$stdout,$errocode);
                unlink("$path.$xls_file");
                if ($errorcode > 0) return $errocode;
        }

}

then in my db class

function insert_file($filename,$table,$col_terminator,$line_terminator,$cols=false,$opt
ions=false,$remove_file=false) {
                if ($options) $option = "OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY
'\n'";
                $this->query("LOAD DATA INFILE '$filename' INTO TABLE $table FIELDS
TERMINATED BY '$col_terminator' $option $cols");
                if ($remove_files) unlink($filename);
        }
?>
the xls2csv binary can be found @ http://www.45.free.net/~vitus/ice/catdoc/ver-0.9.html




Excel class in PHP
Categories : PHP, PHP Classes, Excel
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query
Categories : PHP, PHP, HTML, PDF, Excel
Array Insertion
Categories : PHP, PHP Classes, Arrays
crop and resize image class using gd library function
Categories : PHP, PHP Classes, GD image library, Graphics
Simple and fast user authentication
Categories : PHP, PHP Classes, Authentication
file class , uploade file , download file already uploaded on another website
Categories : PHP, PHP Classes, Filesystem, Web Services
POP3 Class
Categories : PHP Classes, PHP, Email
MySQL Connection/Query Class
Categories : Databases, MySQL, PHP, PHP Classes
Simple class for accessing databases like MSSql Server, Oracle etc by Raju
Categories : PHP, MS SQL Server, Databases, PHP Classes, Oracle
Render TTF Text to PNG. Text message, font, size, rotation, padding, color, background, and transparency can all be defined via URL.
Categories : PHP, PHP Classes, Graphics
Credit Card Identification and Validation Class - The credit_card class provides methods for cleaning, validating and identifying the type of credit card numbers.
Categories : PHP, PHP Classes, Credit Cards, Ecommerce, Algorithms
phpFormGenerator for Dynamic Form Generation from MySQL
Categories : PHP, PHP Classes, MySQL, Databases, HTML and PHP
simple shopping cart for php3
Categories : PHP, PHP Classes, Complete Programs, Ecommerce
cPanel Email Accounts Creator
Categories : PHP, PHP Classes, Email, Form Processing, Web Services
HTTP gzip compression
Categories : PHP, PHP Classes, Compression, Zlib