In many web-applications development, we come across the requirement of importing data from tables present in database to excel sheets and vice-versa. This is basically needed when we are migrating an already existing application, where we would need the already existing data of the application to be stored somewhere and then to be imported into database tables of the new version of the application. Another scenario is when we provide the end user of an web application to download some details or history, like transaction history. In such cases, we can have the data saved to an excel sheet. Though ColdFusion is a tag based language, and we have tags for performing many complex functionalities without knowing any lower level details for those, but there is no direct tag to perform the above operations. There are many solutions to tackle the above issue. One of the easiest solution has been provided by Ben Nadel, the POI Utility. The POI Utility is a ColdFusion component that contains functions to read excel sheets into queries thus making the data compatible with the ColdFusion, and to write database tables data in the form of queries to excel sheets. This utility provides with the flexibility to populate multiple worksheets of an excel sheet, thus allowing the storage of all the required data in one excel sheet instead of multiple excel sheets. Using this utility, its also possible to provide styling specifications for the excel sheet data to be written from database table data. To take all those advantages, we need to download the POI Utility into our application. But what when we want to perform the above operations without downloading the POI Utility? The answer to this question is that we have many other alternatives to perform the above operations. Here I would be describing some of the alternatives in detail.
by
- Reading data from an excel sheet
- Writing to an excel sheet (method 1)
- Writing to an excel sheet (method 2)
- Conclusion
No comments:
Post a Comment