Go Back   nV News Forums > Software Forums > Software Development

Newegg Daily Deals

Reply
 
Thread Tools
Old 12-30-07, 03:27 PM   #1
technoid
Registered User
 
Join Date: Jul 2004
Location: Denton, Texas
Posts: 505
Default MySQL Export to XLS using Classic ASP

I wrote an export function to create a CSV file but it would be nice to be able to create a Real XLS file too. I've looked around a lot but haven't found any good example code to do it. I'm using Classic ASP so if you know where I can get something to help me I'd appreciate the information.

I'm running MySQL on a Windows 2000 Server at work using Classic ASP to write the webpages with. I'd use something better if I knew how

I installed PHP on my home system running XP Pro and IIS and could install PHP at work too if necessary to get the XLS working. I did find some PHP sample code to create a real XLS file but it's very bare bones and you can't do any formatting. But it does seem to create a real XLS file since Excel will open it without complaining and it's in a binary format. I could use that or port it over to ASP but since it's so bare bones a CSV file seems as good.

I guess I could ask another question too. At work on the Windows 2000 Server I have a SATA RAID using an Adaptec 1200A and anytime I try to put the MySQL data directory on the RAID Array it takes down the RAID after about 45 minutes of just sitting there looking like it's looked up. So I have the MySQL data directory on the OS drive, not a good solution. If anyone has any information about that problem I'd love to hear that too.

Thanks for any help.
__________________
Antec-SOLO | ASUS-P5Q-SE | C2D-E8600 | AC-Freezer-7-Pro | Seasonic-S12-550W | 3GB-KVR-PC2-6400 | GTX-560Ti | SB-XtremeGamer | Pioneer-BDR-205 | Samsung-S223B | Dell-U2412M
technoid is offline   Reply With Quote
Old 12-31-07, 12:15 PM   #2
fivefeet8
Ngemu Mod
 
Join Date: Jul 2003
Location: Fresno, CA
Posts: 1,886
Default Re: MySQL Export to XLS using Classic ASP

The PEAR repository does have an Excel generation package for PHP.

http://pear.php.net/package/Spreadsheet_Excel_Writer/

It generates native Excel files and has numerous functions for formatting. It's programmed in PHP, it's free, and has good documentation. You'll need to program the exporting part yourself, but once you've gotten the data from the Mysql database, creating the excel sheet and formatting is pretty straightforward.

I've actually used it on a production site that the company I work for uses to generate quarterly reports in Excel.
__________________
[i7 2600k @4.4ghertz][2x4 GB DDR3 1600][EVGA GTX570 1.280GB SC][EVGA GTX460 physx][Asrock Extreme7 Gen3 Z68][2xSeagate 160 Gb SATA HD raid0][Seagate 250 GB SATA2 HD][Sony Bravia 40' 1080p LCD HDTV][NEC 3520a DVD+-DLw][Windows 7 Ultimate x64][Rosewill 1000w]
fivefeet8 is offline   Reply With Quote
Old 01-01-08, 03:52 PM   #3
technoid
Registered User
 
Join Date: Jul 2004
Location: Denton, Texas
Posts: 505
Default Re: MySQL Export to XLS using Classic ASP

Quote:
Originally Posted by fivefeet8
The PEAR repository does have an Excel generation package for PHP.

http://pear.php.net/package/Spreadsheet_Excel_Writer/

It generates native Excel files and has numerous functions for formatting. It's programmed in PHP, it's free, and has good documentation. You'll need to program the exporting part yourself, but once you've gotten the data from the Mysql database, creating the excel sheet and formatting is pretty straightforward.

I've actually used it on a production site that the company I work for uses to generate quarterly reports in Excel.
Very Cool... I'm off to get it now, Thanks
__________________
Antec-SOLO | ASUS-P5Q-SE | C2D-E8600 | AC-Freezer-7-Pro | Seasonic-S12-550W | 3GB-KVR-PC2-6400 | GTX-560Ti | SB-XtremeGamer | Pioneer-BDR-205 | Samsung-S223B | Dell-U2412M
technoid is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:50 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.