skip to content

 Web design 

Database-driven systems

Easy-to-maintain web sites


 



Desktop_write

This is a module that can be included when you need to create a local PC file from a PHP program. You provide the data and a filename and the module will open a request box on the desktop to save the new file. You can create files in the following formats:

  • Excel spreadsheet (xls)
  • MS Works spreadsheet (xlr)
  • Word (doc)
  • Notepad (txt)
  • Powerpoint (ppt)
  • Rich Text (rtf)
  • Comma separated variables (csv)

You can use this with a program that is writing directly to the output (i.e. using Echo or Print) as long as you call this module before anything is written out (this isn't demonstrated in the test module - I'll add it to the next version).

A test module is included that provides a simple demonstration of the creation of files in these formats. It is actually pretty simple and works well. I haven't tried to explore the limits of what you can do with it. The most flexible approach seems to be the creation of html tables which are then fed to Excel or Word. For Word, the table can be one large cell so you can get a normal-looking Word document. For Excel, you can include data and formulas if you wish. Using html commands you can provide color, fonts, bullets etc. 

This is Freeware and you can use it as you see fit. I provide no warranty and accept no liability for any problem you may encounter. Any feedback or improved versions would be appreciated.

 

Download it

 
   

Powered by Website Baker,
Design by Innovations Design based on a template by gavjof