How can I force a download of entry data to an excel file?
Craft's HttpRequestService has a sendFile method (available via craft()-&gt;request-&gt;sendFile()).

The 3rd parameter is an optional $options array that accepts key => value pairs.  One of those is 'forceDownload' =&gt; true and when that is passed in, Craft will set the proper HTTP headers to force the given file to be sent to the browser as a download.

You could do this from inside an action in one of your plugin's controllers.  Something like:

public function actionDownloadFile()
{
    // Grab your file content from wherever you have it stored. Here, it's just hard coded into a string.
    $contents = 'row1column1,row2column2'.PHP_EOL.'row2column1,row2column2'.PHP_EOL;    

    // Call sendFile, giving it the name of the file to send, the contents and tell it to force a download to the browser.
    craft()-&gt;request-&gt;sendFile('filename.csv', $contents, array('forceDownload' =&gt; true));
}