Apache
  Home arrow Apache arrow Page 3 - Programmatically Manipulating Microsoft Ex...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
APACHE

Programmatically Manipulating Microsoft Excel Spreadsheets with the Apache POI API
By: Kulvir S. Bhogal
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 53
    2003-11-26

    Table of Contents:
  • Programmatically Manipulating Microsoft Excel Spreadsheets with the Apache POI API
  • Let’s Learn How to Write to a Spreadsheet
  • Let’s Learn How to Read From a Spreadsheet
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Programmatically Manipulating Microsoft Excel Spreadsheets with the Apache POI API - Let’s Learn How to Read From a Spreadsheet


    (Page 3 of 4 )

    While the Apache POI allows us to write to spreadsheets, it also allows us to read from them. In the code shown in Listing 2, we do just that, reading off the values of our states and their corresponding sales figures and directing them to the system console. You’ll notice how much of our code is similar to that of Listing 1. We again open our spreadsheet, which we specify is located at c:articlessales.xls. HSSFCell and HSSFRow objects are used to narrow and house the cells we want to read data from. We then use the getStringCellValue and getNumericCellValue methods to extract the cell data and display it to the console.

    More Apache Articles
    More By Kulvir S. Bhogal


     

    APACHE ARTICLES

    - Programmatically Manipulating Microsoft Exce...
    - Installing PHP under Windows
    - Compressing Web Content with mod_gzip and mo...
    - Compressing Web Output Using mod_deflate and...
    - Setting Up Apache 2.0.45 to Parse PHP Pages
    - Custom Error 404 Documents with PHP
    - Using Apache and PHP on Mac OS X
    - ASP: Active Sessions, Active Logins and Tota...
    - Working With Oracle on Windows: Part 1
    - The Quick-n-Dirty Guide to Setting Up Apache...
    - Installing Apache With SSL: The Complete Gui...
    - 7 Powerful .htaccess Customization Tips
    - Trap And Get Notified: A Practical Solution ...
    - One Way To Use Server Side Includes
    - Using ForceType For Nicer Page URLs







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT