We had published article about Pear library. Why we are using pear library because in export option they gave simple and flexible with ease of code implementation. In also their documentation clear to understand. Here we gave sample of how to use this and to export the users information as excel file with PDO OOPs . Once you do with our sample code and if you are got idea you can customize code as your wish.