Currently Browsing: Home » 2010 » February

Archive for February, 2010

3 Easy Steps to Create Excel Spreadsheets in PHP

Spreadsheets are simple files that help you manage and organize data. They are used everywhere and have become quite popular. You can find them by using Microsoft Excel, Open Office, or even an online alternative such as Google Docs.

Spreadsheet

Generating Spreadsheets

Since computers and automation have become second nature, spreadsheet generation isn’t out of the ordinary. With MySQL databases, it becomes even more imperative, as spreadsheets are perfect to represent the data located in these structures.

Upon searching for how to create excel spreadsheets using PHP, most of the results came back with libraries that do the job. This seemed to be too much of a hassle. That’s why I’ve created 3 easy steps to create excel spreadsheets without any libraries.

Download the Files

Read the rest of this entry »

Force Download Dialog Boxes

When we browse the web, we click on links. That’s what makes the web a web – the links between pages. Sometimes, those links lead us not to pages, but to files. Many types of files pop up dialog boxes prompting downloads – executables, videos, etc.

However, certain filetypes, thanks to modern web browsers, are rendered as an in-browser page, such as images, PDFs, and MP3s. While this may be a convenience, at times we may wish to force the user to download the files, not just view them in their browser.

In this article I will show two easy ways to do this. The first is using .htaccess, and the second is using PHP.

Read the rest of this entry »