The Artima Developer Community
Sponsored Link

Java Buzz Forum
Java API to read, write and modify Excel spreadsheets

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Goldy Lukka

Posts: 1008
Nickname: xyling
Registered: Jan, 2004

Goldy Lukka is a Java Developer and an Entrepreneur. He is Founder of xyling.com.
Java API to read, write and modify Excel spreadsheets Posted: Dec 12, 2005 11:04 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Goldy Lukka.
Original Post: Java API to read, write and modify Excel spreadsheets
Feed Title: Xyling Java Blogs
Feed URL: http://www.javablogs.xyling.com/thisWeek.rss
Feed Description: Your one stop source for Java Related Resources.
Latest Java Buzz Posts
Latest Java Buzz Posts by Goldy Lukka
Latest Posts From Xyling Java Blogs

Advertisement
If you are looking for generating MS office Excel documents in Java, then Java API for Excel is a good option.

The reading of spreadsheet is as simple as the following piece of code.

Sheet sheet = workbook.getSheet(0);

Cell a1 = sheet.getCell(0,0);
Cell b2 = sheet.getCell(1,1);
Cell c2 = sheet.getCell(2,1);

String stringa1 = a1.getContents();
String stringb2 = b2.getContents();
String stringc2 = c2.getContents();

Similarly, writing the spreadsheet is as simple as:

WritableSheet sheet = workbook.createSheet("First Sheet", 0);

Label label = new Label(0, 2, "A label record");
sheet.addCell(label);

Number number = new Number(3, 4, 3.1459);
sheet.addCell(number);

...
// All sheets and cells added. Now write out the workbook
workbook.write();
workbook.close();

There much more you can do apart from just reading, writing or modifying the excel files. Click the title of this post to explore more.

[Resource-Type: Library; Category: Java; XRating: 4]

Read: Java API to read, write and modify Excel spreadsheets

Topic: You know you progam GUIs when,,,, Previous Topic   Next Topic Topic: Favored Freeware Reviews

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use