Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

Search: 

  Tutorial: Book excerpt: Converting XML to spreadsheet, and vice versa

Often it is useful for XML data to be presented as a spreadsheet.

Tutorial Details:

A typical spreadsheet (for example, a Microsoft Excel spreadsheet) consists of cells represented in a grid of rows and columns, containing textual data, numeric data, or formulas. An Excel spreadsheet defines some standard functions such as SUM and AVERAGE that you can specify in cells. The Apache Jakarta POI project provides the HSSF API to create an Excel spreadsheet from an XML document or to go the opposite way, parsing an Excel spreadsheet and converting to XML. The HSSF API has provisions for setting the layout, border settings, and fonts of an Excel document. In this article, you'll learn how to generate an example Excel spreadsheet by parsing an XML document and adding data from the XML document to a spreadsheet. Subsequently, you'll convert the Excel spreadsheet to an XML document.

The Jakarta POI HSSF API provides classes to create an Excel workbook and add spreadsheets to the workbook. With the POI API, the HSSFWorkbook class represents a workbook, and you set the spreadsheet fonts, sheet order, and cell styles in the HSSFWorkbook class. You can represent the spreadsheet using the HSSFSheet class. Specifically, you set the sheet layout, including the column widths, margins, header, footer, and print setup using the HSSFSheet class. You can represent a spreadsheet row using the HSSFRow class, and you set the row height using the HSSFRow class. The HSSFCell class represents a cell in a spreadsheet row, and you set the cell style using the HSSFCell class. The indexing of spreadsheets in a workbook, of rows in a spreadsheet, and of cells in a row is zero based. In this article, we'll show how to convert an example XML document to an Excel spreadsheet and then convert the spreadsheet to an XML document. Listing 1 shows the example document, incomestatements.xml.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Book excerpt: Converting XML to spreadsheet, and vice versa

View Tutorial:
Book excerpt: Converting XML to spreadsheet, and vice versa

Related Tutorials:

Displaying 1 - 50 of about 943 Related Tutorials.

XML Books
documents. This is the most comprehensive and up-to-date book about integrating XML with Java (and vice versa) you can buy. It contains over 1000 pages of detailed..., and more. After reading this book I hope you'll agree with me that XML
 
Convert a file name path to url and vice versa in java
Converting Filename Path and URL in Java,URL to Filename Path in Java Convert a file name path to url and vice versa in java... the conversion from a Filename path to a URL and vice versa in the java. URL stands
 
Hibernate Annotations
to database tables and vice versa. Most commonly XML file is used to write
 
To retrieve the IP address from Host Name, vice-versac
, vice-versa To retrieve the IP address from Host Name, vice-versa        ... to find out the IP address from host name and to vice verse. Here we are give
 
Quick Hibernate Annotation Tutorial
and vice versa. Most commonly XML file is used to write the metadata information... is the example for the configuration file. <?xml version='1.0' encoding='utf-8
 
Java Architecture for XML Binding (JAXB)
allow us for marshalling of java objects into XML and vice-versa or we can say... Java Architecture for XML Binding Java Architecture for XML Binding (JAXB)       
 
PHP Ajax Book
knowledge of PHP, XML, JavaScript and MySQL, this book will help you understand... and XML together in order to achieve wonderful results The book's authors... PHP Ajax Book PHP Ajax Book  
 
PHP SQL Connection
database and vice-versa. Understand with Example The Tutorial illustrate
 
Java biginteger to String
to String and String to the BigInteger vice-versa. To Convert BigInteger value
 
Java Biginteger
we can convert the BigInteger to String and String to the BigInteger vice-versa
 
Open Source XML Editor
of an XML application, stress. The book also discusses W3C specifications... Open Source XML Editor Open Source XML Editor Open source Extensible XML Editor The Xerlin Project is a Java? based XML
 
String Arrays Java
;   String array cannot hold numbers or vice- versa. Jsp arrays
 
Hibernate Book
Hibernate Book,Hibernate Books Hibernate Book... you all you need to start working with Hibernate now. The book focuses... is the first book to offer complete coverage of the open source lightweight Hibernate 3
 
Java XML Books
It -An essential book for any XML user.  Browse It:-This book may... of the book focuses on using XML from your Java applications. Java developers...; Java and XML The first half of the book
 
Ajax - Asynchronous JavaScript and XML
application. Ajax stands for Asynchronous JavaScript and XML. Ajax is used to fetch.... These include HTML, CSS, DOM, XML, XSLT, XMLHttpRequest and Javascript. The acronym AJAX stands for Asynchronous Javascript and XML. AJAX is based
 
Phone Book Midlet Example
Phone Book Midlet Example Phone Book Midlet Example          ...;    This example illustrates how to create your phone book
 
Find Type of Work Book
Fnd Type of Work Book Find Type of Work Book                         
 
Create XML file from flat file and data insert into database
Create XML file from flat file and data insert into database Create XML file from flat file and data insert into database...;  In this section, we have developed an application to create xml
 
XML Validation
XML Validation XML Validation...;            XML with correct syntax is Well Formed XML. XML validated against a DTD
 
Struts Book - Popular Struts Books
Struts Book Struts Book - Popular Struts Books.... In the first book to cover the extensive new features of the final release... to design, build, and deploy sophisticated Struts 1.1.This book covers
 
Struts Book - Popular Struts Books
Struts Book Struts Book - Popular Struts Books.... In the first book to cover the extensive new features of the final release... to design, build, and deploy sophisticated Struts 1.1.This book covers
 
XML Parsers
XML Parsers XML Parsers  ...;            XML parser is used to read, update, create and manipulate an XML document. Parsing XML
 
XML: An Introduction
XML XML: An Introduction  ... is XML? "XML is a cross-platform, software and hardware independent tool for transmitting information" XML is a W3C Recommendations. It stands
 
XML Interviews Question
XML Interviews Question,xml Interviews Guide,xml Interviews XML Interviews Question    ...;         XML Question
 
Java XML
Java Certification Java XML  ...;            XML... to describe data. XML is significant role in today's application development scenerio
 
XML Elements
XML Elements XML Elements  ...;            XML.... XML Elements are Extensible XML documents can be extended to carry more
 
Linux Books
; Introduction to GCC The purpose of this book... this book you should understand how to compile a program, and how to use basic compiler options for optimization and debugging. This book does not attempt to teach
 
DTD - XML Constituent
DTD - XML constituent DTD - XML Constituent...; The constituent components of XML DTD Documents.  DTDs are made... are the main constituent components of both XML documents. Elements can contain text, other
 
XML Related Technologies: An overview
XML Related Technologies XML Related Technologies...;     Below is a list of XML-related technologies. DTD (Document Type Definition) is used to define the legal elements in an XML document
 
XML Tutorials
XML,XML Tutorials,Online XML Tutorial,XML Help Tutorials XML Tutorials         ...;     Learn XML from scratch without having any prior
 
XML Tutorials
XML,XML Tutorials,Online XML Tutorial,XML Help Tutorials XML Tutorials         ...;     Learn XML from scratch without having any prior
 
Designing XML Schema
Designing XML Schema Designing XML Schema...; XML documents can have a reference to a DTD or to an XML Schema. A Simple XML Document               Look
 
Xcarecrows 4 XML
Xcarecrows 4 XML Xcarecrows 4 XML...; Xcarecrows 4 XML, Cogenit's new Eclipse plugin, is an efficient graphical editor to perform the daily tasks required when working with XML
 
Free JSP download Books
We're so confident that you're going to learn faster and better with this book... you can learn Java web programming using this book's fresh approach, real-world... Third Edition The best-selling book Mastering EJB is now in its third edition
 
Introduction to XML Schema
XML Schema,XML Schema Tutorial,Introduction to XML Schema,Online XML Schema Tutorials Introduction to XML Schema...; In this tutorial you will learn how to read and create XML Schemas, why XML
 
C and C++ books
; Page 1 This is the online version of The C Book, second edition... processing or spreadsheet programs. Page 3 Before there was C... This book is a tremendous achievement. You owe it to yourself
 
XML Attributes
XML Attributes XML Attributes...;            XML... as containers for XML data, you might end up with the documents that are both
 
XML DOM Tutorial
XML DOM Tutorial XML DOM Tutorial   ... provides a standard called DOM for HTML & XML documents. DOM is also used as an interface for accessing and manipulating HTML & XML documents.DOM
 
Testing EntityReferences in Xml
Testing EntityReferences in Xml,XML,XML Tutorials,Online XML Tutorial,XML Help Tutorials Testing EntityReferences in Xml...; This Example gives you the way to test EntityReferences in an XML file. JAXP (Java
 
Use of Core XML tags in JSP
Use of Core XML tags in JSP Use of Core XML... use of Core XML tag in JSP JSTL (JSP standard tag library) XML tag can..., forEach, if x Transformation transform, param x Core XML
 
Transforming XML with SAXFilters
Transforming XML with SAXFilters, XML,XML Tutorials,Online XML Tutorial,XML Help Tutorials Transforming XML with SAXFilters...; This Example shows you how to Transform XML with SAXFilters. JAXP (Java API
 
Java get XML File
Java get XML File Java get XML File...; In this section, you will study how the java application read the XML file. For this, you need to create a XML file. Here is the employee.xml file
 
The Simple API for XML (SAX) APIs
The Simple API for XML (SAX) APIs The Simple API for XML (SAX) APIs        ... applications to configure and obtain a SAX based parser to parse XML
 
XML Transformation in JSP
XML Transformation in JSP XML Transformation... to demonstrate XML Transformation tag in JSP This example illustrate use of XML transformation tag in JSP file. This example performs transformation from an XML file
 
XML Syntax Rules
What is XML XML Syntax Rules...; The syntax  rules  for  XML are very simple and strict. These ... that can read and manipulate XML is very easy. Xml enables an user to create  his
 
VoIP XML
VoIP XML VoIP XML   ... XML Wireless Software Intoto, a leading provider of integrated security.... It includes voice XML-based applications, such as auto-attendant, voicemail, and multi
 
Storing properties in XML file
Storing properties in XML file,XML,XML Tutorials,Online XML Tutorial,XML Help Tutorials Storing properties in XML file  ...; This Example shows you how Store properties in a new XML File. JAXP (Java API
 
Comparing XML with HTML
Comparing  XML with HTML Comparing  XML...;    The Main Differences Between XML and HTML XML... information but XML is all about describing information. In current scenario
 
Create - XML File (Document)
Java Create XML File,Java Create XML Document,Create XML Java,Create XML Files Create - XML File (Document)   ...; In this section, you will  learn to create a XML document using the DOM APIs. This XML
 
Ask XML Questions
Ask XML Questions Ask XML Questions...; The eXtensible Markup Language in short XML is an extremely simple dialect of Standard Generalized Markup Language (SGML). XML is a simple
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.