Wednesday, August 30, 2006

Export View as MS Excel

Follow up with the previous posting, I get the idea from Sean Burgess to export view data directly to excel. The idea is basically create a HTML table from a view and display it as application/msexcel.

Create a HTML view. I name the view with alias viewname.xls

In the header add in the required tag for a table <tr> and <td>

Then create a $$ViewTemplate for the view. In the Content Type, set it as application/msexcel

Embed the view into the viewtemplate then add in the opening and closing table tag for the view.

When you call the view (http://server/dbpath/viewname.xls) it should prompt you to save the view. The saved file can be open in Excel. The similar method can be used to export to other format like words, etc.

Tuesday, August 29, 2006

How to export web data to MS Excel

Philippe GAUVIN wrote an good article on how to export web data to MS Excel. Basically the concept is to display the view as Comma Seperated View (CSV). Then use $$Viewtemplate to set the Content-Type as text/csv. Basically when you load the view, it should open in MS Excel (only for those pc which associate csv file with MS Excel). This is an easy and fast way to "export" the data out. Check out the article.

Friday, August 25, 2006


I have not been updating my blog lately. It's been some crazy weeks. Lots of project is in the queue. In a way it's good.

Recently I've volunteer to help develop a site for CouchDB with Damien Katz. Thanks to Bruce Elgort for hosting the new project site. It should be out soon. I'll announce it here once it's up and running.

So what id CouchDb anyway? CouchDb is a database system meant to simplify the development of certain types of applications, particularly document oriented applications. For more details check out this site.

Damien just launch Alpha 1. You can download and test it out. There are some sample on PHP. Check it out and look out for the project site soon.

Tuesday, August 22, 2006

5 HTML elements you probably never use (but perhaps should)

There is an article at about 5 HTML elements that's seldom use
  1. <address>
  2. <q>
  3. <optgroup> (personally fell this one is really useful)
  4. <acronym> or <abbr>
  5. <fieldset> and <legend>
Check out the article for details.

Friday, August 11, 2006

Keep Domino Web session alive with PeriodicalExecuter

I created a web application which required to keep the session with the Domino server active. The current server settings is only 30 minutes. Changing that is not an option because it will effect other applications. A solution is to always do a server request before the session time ends. A very easy way to do it is to use prototype.js PeriodicalExecuter. You can specify the number of seconds when should a function be triggered

new PeriodicalExecuter(KeepSessionAlive, 1200);

function KeepSessionAlive ( ) {
var ajax = new Ajax.Request("/icons/blank.gif",{

Every 20 minutes (1200 seconds) I call the function KeepSessionAlive. The function will make a simple request to the blank.gif icon on the server. This will keep the session with the server alive. You can use this function to refresh and update a view every few minutes. This is another one of the simple useful function provided by prototype.js.

Tuesday, August 08, 2006

Lotus Notes got layers?

Yes. Lotus Notes got layers. Chris Blatnick from Interface matters come up with the idea to create cascading menu using layers. Never thought of that before and never actually used layers in Lotus Notes client before. But the solution sure looks cool. Check out the article here

Wednesday, August 02, 2006

10-Week Free AJAX Programming

Sang Shin is giving a 10 Week Free Ajax Programming Course . For those who's new to Ajax, this should get you up to speed with Ajax. Check out his other free Java/J2ee courses.