<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Reading Excel Sheet Documents in Java</title>
	<atom:link href="http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java</link>
	<description>Software Programming and Tutorials</description>
	<lastBuildDate>Mon, 06 Sep 2010 16:27:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Imran</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-25192</link>
		<dc:creator>Imran</dc:creator>
		<pubDate>Mon, 26 Jul 2010 08:57:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-25192</guid>
		<description>Hey can any one tell me from where should i download jxl package and where should I place it to compile my source code.</description>
		<content:encoded><![CDATA[<p>Hey can any one tell me from where should i download jxl package and where should I place it to compile my source code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neeraj</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-24203</link>
		<dc:creator>Neeraj</dc:creator>
		<pubDate>Fri, 02 Jul 2010 15:11:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-24203</guid>
		<description>Can anybody help me in writing the content of an excel file into an XML file in java.

Actually i m able to read the excel file but m trying to output the data into the xml file through an object of FileWriter but its not working...
please provide me with some better code.
_________________________________________________
This is my code which m trying to execute:
**NOTE:I wasn&#039;t able to write tags on this site so i used curly braces for tags instead of angular braces

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.*;
import jxl.Cell;
import jxl.CellType;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;

public class ReadExcel {

	public static void main(String[] args) throws IOException {
		 String inputFile = &quot;c:/data.xls&quot;;
		 
		File inputWorkbook = new File(inputFile);
	 	
	
		File fileout = new File(&quot;C:/data.xml&quot;);
	 	FileWriter fw = new FileWriter(fileout);

	 	fw.write(&quot;{root}&quot;);
	 	
	
	Workbook w;
		try {
			w = Workbook.getWorkbook(inputWorkbook);
			// Get the first sheet
			Sheet sheet = w.getSheet(0);
			// Loop over first 10 column and lines

			for (int i = 0; i &lt; sheet.getColumns(); i++) {
				for (int j = 0; j &lt; sheet.getRows(); j++) {
					Cell cell = sheet.getCell(j, i);
							//CellType type = cell.getType();
					if (cell.getType() == CellType.LABEL) {
						fw.write(&quot;{tag} &quot;+ cell.getContents()+&quot;{/tag}&quot;);
					}

					if (cell.getType() == CellType.NUMBER) {
						fw.write(&quot;{tag} &quot;+ cell.getContents()+&quot;{/tag}&quot;);
					}

				}
			}
			 fw.write(&quot;{/root}&quot;);
			
		} catch (BiffException e) {
			e.printStackTrace();
		}
	}
}</description>
		<content:encoded><![CDATA[<p>Can anybody help me in writing the content of an excel file into an XML file in java.</p>
<p>Actually i m able to read the excel file but m trying to output the data into the xml file through an object of FileWriter but its not working&#8230;<br />
please provide me with some better code.<br />
_________________________________________________<br />
This is my code which m trying to execute:<br />
**NOTE:I wasn&#8217;t able to write tags on this site so i used curly braces for tags instead of angular braces</p>
<p>import java.io.BufferedWriter;<br />
import java.io.File;<br />
import java.io.FileWriter;<br />
import java.io.IOException;<br />
import java.util.*;<br />
import jxl.Cell;<br />
import jxl.CellType;<br />
import jxl.Sheet;<br />
import jxl.Workbook;<br />
import jxl.read.biff.BiffException;</p>
<p>public class ReadExcel {</p>
<p>	public static void main(String[] args) throws IOException {<br />
		 String inputFile = &#8220;c:/data.xls&#8221;;</p>
<p>		File inputWorkbook = new File(inputFile);</p>
<p>		File fileout = new File(&#8220;C:/data.xml&#8221;);<br />
	 	FileWriter fw = new FileWriter(fileout);</p>
<p>	 	fw.write(&#8220;{root}&#8221;);</p>
<p>	Workbook w;<br />
		try {<br />
			w = Workbook.getWorkbook(inputWorkbook);<br />
			// Get the first sheet<br />
			Sheet sheet = w.getSheet(0);<br />
			// Loop over first 10 column and lines</p>
<p>			for (int i = 0; i &lt; sheet.getColumns(); i++) {<br />
				for (int j = 0; j &lt; sheet.getRows(); j++) {<br />
					Cell cell = sheet.getCell(j, i);<br />
							//CellType type = cell.getType();<br />
					if (cell.getType() == CellType.LABEL) {<br />
						fw.write(&quot;{tag} &quot;+ cell.getContents()+&quot;{/tag}&quot;);<br />
					}</p>
<p>					if (cell.getType() == CellType.NUMBER) {<br />
						fw.write(&quot;{tag} &quot;+ cell.getContents()+&quot;{/tag}&quot;);<br />
					}</p>
<p>				}<br />
			}<br />
			 fw.write(&quot;{/root}&quot;);</p>
<p>		} catch (BiffException e) {<br />
			e.printStackTrace();<br />
		}<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neeraj</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-24202</link>
		<dc:creator>Neeraj</dc:creator>
		<pubDate>Fri, 02 Jul 2010 15:08:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-24202</guid>
		<description>Can anybody help me in writing the content of an excel file into an XML file in java.

Actually i m able to read the excel file but m trying to output the data into the xml file through an object of FileWriter but its not working...
please provide me with some better code.
_________________________________________________
This is my code which m trying to execute:

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.*;
import jxl.Cell;
import jxl.CellType;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;

public class ReadExcel {

	public static void main(String[] args) throws IOException {
		 String inputFile = &quot;c:/data.xls&quot;;
		 
		File inputWorkbook = new File(inputFile);
	 	
	
		File fileout = new File(&quot;C:/data.xml&quot;);
	 	FileWriter fw = new FileWriter(fileout);

	 	fw.write(&quot;&quot;);
	 	
	
	Workbook w;
		try {
			w = Workbook.getWorkbook(inputWorkbook);
			// Get the first sheet
			Sheet sheet = w.getSheet(0);
			// Loop over first 10 column and lines

			for (int i = 0; i &lt; sheet.getColumns(); i++) {
				for (int j = 0; j &lt; sheet.getRows(); j++) {
					Cell cell = sheet.getCell(j, i);
							//CellType type = cell.getType();
					if (cell.getType() == CellType.LABEL) {
						fw.write(&quot; &quot;+ cell.getContents()+&quot;&quot;);
					}

					if (cell.getType() == CellType.NUMBER) {
						fw.write(&quot; &quot;+ cell.getContents()+&quot;&quot;);
					}

				}
			}
			 fw.write(&quot;&quot;);
			
		} catch (BiffException e) {
			e.printStackTrace();
		}
	}
}</description>
		<content:encoded><![CDATA[<p>Can anybody help me in writing the content of an excel file into an XML file in java.</p>
<p>Actually i m able to read the excel file but m trying to output the data into the xml file through an object of FileWriter but its not working&#8230;<br />
please provide me with some better code.<br />
_________________________________________________<br />
This is my code which m trying to execute:</p>
<p>import java.io.BufferedWriter;<br />
import java.io.File;<br />
import java.io.FileWriter;<br />
import java.io.IOException;<br />
import java.util.*;<br />
import jxl.Cell;<br />
import jxl.CellType;<br />
import jxl.Sheet;<br />
import jxl.Workbook;<br />
import jxl.read.biff.BiffException;</p>
<p>public class ReadExcel {</p>
<p>	public static void main(String[] args) throws IOException {<br />
		 String inputFile = &#8220;c:/data.xls&#8221;;</p>
<p>		File inputWorkbook = new File(inputFile);</p>
<p>		File fileout = new File(&#8220;C:/data.xml&#8221;);<br />
	 	FileWriter fw = new FileWriter(fileout);</p>
<p>	 	fw.write(&#8220;&#8221;);</p>
<p>	Workbook w;<br />
		try {<br />
			w = Workbook.getWorkbook(inputWorkbook);<br />
			// Get the first sheet<br />
			Sheet sheet = w.getSheet(0);<br />
			// Loop over first 10 column and lines</p>
<p>			for (int i = 0; i &lt; sheet.getColumns(); i++) {<br />
				for (int j = 0; j &lt; sheet.getRows(); j++) {<br />
					Cell cell = sheet.getCell(j, i);<br />
							//CellType type = cell.getType();<br />
					if (cell.getType() == CellType.LABEL) {<br />
						fw.write(&quot; &#8220;+ cell.getContents()+&#8221;");<br />
					}</p>
<p>					if (cell.getType() == CellType.NUMBER) {<br />
						fw.write(&#8221; &#8220;+ cell.getContents()+&#8221;");<br />
					}</p>
<p>				}<br />
			}<br />
			 fw.write(&#8220;&#8221;);</p>
<p>		} catch (BiffException e) {<br />
			e.printStackTrace();<br />
		}<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shan</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-24045</link>
		<dc:creator>Shan</dc:creator>
		<pubDate>Tue, 29 Jun 2010 08:24:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-24045</guid>
		<description>I am getting this error when i run the code posted above. I dont really understand the problem. Thanks in advance.

jxl.read.biff.BiffException: Unable to recognize OLE stream
	at jxl.read.biff.CompoundFile.(CompoundFile.java:116)
	at jxl.read.biff.File.(File.java:127)
	at jxl.Workbook.getWorkbook(Workbook.java:268)
	at ReadXLSheet.contentReading(ReadXLSheet.java:55)
	at ReadXLSheet.init(ReadXLSheet.java:20)
	at ReadXLSheet.main(ReadXLSheet.java:109)</description>
		<content:encoded><![CDATA[<p>I am getting this error when i run the code posted above. I dont really understand the problem. Thanks in advance.</p>
<p>jxl.read.biff.BiffException: Unable to recognize OLE stream<br />
	at jxl.read.biff.CompoundFile.(CompoundFile.java:116)<br />
	at jxl.read.biff.File.(File.java:127)<br />
	at jxl.Workbook.getWorkbook(Workbook.java:268)<br />
	at ReadXLSheet.contentReading(ReadXLSheet.java:55)<br />
	at ReadXLSheet.init(ReadXLSheet.java:20)<br />
	at ReadXLSheet.main(ReadXLSheet.java:109)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-22642</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Mon, 24 May 2010 14:23:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-22642</guid>
		<description>Hi,

I&#039;ve written the following function:

	public void read() throws IOException  {
		File inputWorkbook = new File(&quot;c:/temp/test.xls&quot;);
		Workbook w;
		try {
			w = Workbook.getWorkbook(inputWorkbook);
			...
		} catch (BiffException e) {
			e.printStackTrace();
		}
	}

When I run this function within a normal Java Application together with JFace everything works fine. But when I run this function inside a RCP project I get the following error:

java.lang.ClassNotFoundException: jxl.read.biff.BiffException
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at model.CollectionManager.newOilFor(CollectionManager.java:120)
	at model.CollectionManager.loadCollection(CollectionManager.java:107)
	at model.CollectionManager.getCollection(CollectionManager.java:56)
	at hellooil.CollectionViewContentProvider.getElements(CollectionViewContentProvider.java:39)
...

Does someone know what could be wrong?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;ve written the following function:</p>
<p>	public void read() throws IOException  {<br />
		File inputWorkbook = new File(&#8220;c:/temp/test.xls&#8221;);<br />
		Workbook w;<br />
		try {<br />
			w = Workbook.getWorkbook(inputWorkbook);<br />
			&#8230;<br />
		} catch (BiffException e) {<br />
			e.printStackTrace();<br />
		}<br />
	}</p>
<p>When I run this function within a normal Java Application together with JFace everything works fine. But when I run this function inside a RCP project I get the following error:</p>
<p>java.lang.ClassNotFoundException: jxl.read.biff.BiffException<br />
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)<br />
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)<br />
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)<br />
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)<br />
	at java.lang.ClassLoader.loadClass(Unknown Source)<br />
	at model.CollectionManager.newOilFor(CollectionManager.java:120)<br />
	at model.CollectionManager.loadCollection(CollectionManager.java:107)<br />
	at model.CollectionManager.getCollection(CollectionManager.java:56)<br />
	at hellooil.CollectionViewContentProvider.getElements(CollectionViewContentProvider.java:39)<br />
&#8230;</p>
<p>Does someone know what could be wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hitesh Agrawal</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-22000</link>
		<dc:creator>Hitesh Agrawal</dc:creator>
		<pubDate>Sat, 08 May 2010 09:09:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-22000</guid>
		<description>Hi Gaurav,
You will have to add JExcel API in your class path while compiling the java file, you can download the JExcelAPI from http://jexcelapi.sourceforge.net/

Thanks,
Hitesh Agarwal</description>
		<content:encoded><![CDATA[<p>Hi Gaurav,<br />
You will have to add JExcel API in your class path while compiling the java file, you can download the JExcelAPI from <a href="http://jexcelapi.sourceforge.net/" rel="nofollow">http://jexcelapi.sourceforge.net/</a></p>
<p>Thanks,<br />
Hitesh Agarwal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gaurav Arora</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-21951</link>
		<dc:creator>Gaurav Arora</dc:creator>
		<pubDate>Fri, 07 May 2010 00:22:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-21951</guid>
		<description>I have downloaded your code and tryied to run it on ubuntu platform with jdk6  
but at run time its showed this
Exception in thread \main\ java.lang.NoClassDefFoundError: ReadXLSheet
   at java.lang.Class.initializeClass(libgcj.so.10)
Caused by: java.lang.ClassNotFoundException: jxl.Cell not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.Class.initializeClass(libgcj.so.10)

instead of output

CAN you please tell me whats the problem with my code i am not able to get and its urget

seeking towards help...
Thanks in advance</description>
		<content:encoded><![CDATA[<p>I have downloaded your code and tryied to run it on ubuntu platform with jdk6<br />
but at run time its showed this<br />
Exception in thread \main\ java.lang.NoClassDefFoundError: ReadXLSheet<br />
   at java.lang.Class.initializeClass(libgcj.so.10)<br />
Caused by: java.lang.ClassNotFoundException: jxl.Cell not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}<br />
   at java.net.URLClassLoader.findClass(libgcj.so.10)<br />
   at java.lang.ClassLoader.loadClass(libgcj.so.10)<br />
   at java.lang.ClassLoader.loadClass(libgcj.so.10)<br />
   at java.lang.Class.initializeClass(libgcj.so.10)</p>
<p>instead of output</p>
<p>CAN you please tell me whats the problem with my code i am not able to get and its urget</p>
<p>seeking towards help&#8230;<br />
Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hitesh Agrawal</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-21202</link>
		<dc:creator>Hitesh Agrawal</dc:creator>
		<pubDate>Wed, 21 Apr 2010 18:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-21202</guid>
		<description>Hi Meneka,
Latest Apache POI supports xslx file.

Thanks,
Hitesh Agarwal</description>
		<content:encoded><![CDATA[<p>Hi Meneka,<br />
Latest Apache POI supports xslx file.</p>
<p>Thanks,<br />
Hitesh Agarwal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Menaka</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-21144</link>
		<dc:creator>Menaka</dc:creator>
		<pubDate>Tue, 20 Apr 2010 05:53:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-21144</guid>
		<description>Hi Hitesh,
Do u have any idea about writing to .xlsx files. If yes can u pls share some code samples.
Thanks</description>
		<content:encoded><![CDATA[<p>Hi Hitesh,<br />
Do u have any idea about writing to .xlsx files. If yes can u pls share some code samples.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sadanala</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-20804</link>
		<dc:creator>sadanala</dc:creator>
		<pubDate>Tue, 13 Apr 2010 07:50:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-20804</guid>
		<description>where do i get jar file?</description>
		<content:encoded><![CDATA[<p>where do i get jar file?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prema GV</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-20007</link>
		<dc:creator>Prema GV</dc:creator>
		<pubDate>Thu, 25 Mar 2010 11:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-20007</guid>
		<description>Hi thanks for the code.........
Code worked fine when i run first time got result too....

But when i run same code after three times of exection...... its giving file not found and null point exception........... plzzzz get me back with solution as soon as possible........  

Thanks in advance..................</description>
		<content:encoded><![CDATA[<p>Hi thanks for the code&#8230;&#8230;&#8230;<br />
Code worked fine when i run first time got result too&#8230;.</p>
<p>But when i run same code after three times of exection&#8230;&#8230; its giving file not found and null point exception&#8230;&#8230;&#8230;.. plzzzz get me back with solution as soon as possible&#8230;&#8230;..  </p>
<p>Thanks in advance&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prema GV</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-20006</link>
		<dc:creator>Prema GV</dc:creator>
		<pubDate>Thu, 25 Mar 2010 11:41:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-20006</guid>
		<description>Hi thanks for the code.........
Code worked fine when i run first time got result too....

But when i run same code after three times of exection...... its giving file not found and null point exception...........  tHE path name specified is also correct....plzzzz get me back with solution as soon as possible........</description>
		<content:encoded><![CDATA[<p>Hi thanks for the code&#8230;&#8230;&#8230;<br />
Code worked fine when i run first time got result too&#8230;.</p>
<p>But when i run same code after three times of exection&#8230;&#8230; its giving file not found and null point exception&#8230;&#8230;&#8230;..  tHE path name specified is also correct&#8230;.plzzzz get me back with solution as soon as possible&#8230;&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manjunath</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-19677</link>
		<dc:creator>Manjunath</dc:creator>
		<pubDate>Mon, 15 Mar 2010 18:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-19677</guid>
		<description>&lt;a href=&quot;#comment-14584&quot; rel=&quot;nofollow&quot;&gt;@Ganesh  &lt;/a&gt; 


I am getting the same error as Ganesh got. My file is saved as .xls and is unblocked,but still getting the same BiffException.Please help</description>
		<content:encoded><![CDATA[<p><a href="#comment-14584" rel="nofollow">@Ganesh  </a> </p>
<p>I am getting the same error as Ganesh got. My file is saved as .xls and is unblocked,but still getting the same BiffException.Please help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paramjit</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-18870</link>
		<dc:creator>Paramjit</dc:creator>
		<pubDate>Thu, 18 Feb 2010 10:26:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-18870</guid>
		<description>Been very useful...great work</description>
		<content:encoded><![CDATA[<p>Been very useful&#8230;great work</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roshan Khandelwal</title>
		<link>http://www.hiteshagrawal.com/java/java-excel-reading-excel-sheet-in-java/comment-page-1#comment-18235</link>
		<dc:creator>Roshan Khandelwal</dc:creator>
		<pubDate>Mon, 01 Feb 2010 06:57:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.hiteshagrawal.com/?p=310#comment-18235</guid>
		<description>Hi everyone , 
  The code works pretty fine with one change. 

After every case statement add a &quot;break &quot; 
so the revised code would be :

switch (j) {
						case 0:
							System.out.println(&quot;Employee Id:&quot; + rowData[j].getContents());
							break;
						case 1:
							System.out.println(&quot;Employee Name:&quot; + rowData[j].getContents());
							break;
						case 2:
							System.out.println(&quot;Employee Designation:&quot; + rowData[j].getContents());
							break;
						default:
							break;
						}


With the code as given , it loops through all three condition and gives an erroneous output.
Thanks for the code .</description>
		<content:encoded><![CDATA[<p>Hi everyone ,<br />
  The code works pretty fine with one change. </p>
<p>After every case statement add a &#8220;break &#8221;<br />
so the revised code would be :</p>
<p>switch (j) {<br />
						case 0:<br />
							System.out.println(&#8220;Employee Id:&#8221; + rowData[j].getContents());<br />
							break;<br />
						case 1:<br />
							System.out.println(&#8220;Employee Name:&#8221; + rowData[j].getContents());<br />
							break;<br />
						case 2:<br />
							System.out.println(&#8220;Employee Designation:&#8221; + rowData[j].getContents());<br />
							break;<br />
						default:<br />
							break;<br />
						}</p>
<p>With the code as given , it loops through all three condition and gives an erroneous output.<br />
Thanks for the code .</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 4/27 queries in 0.085 seconds using disk

Served from: www.hiteshagrawal.com @ 2010-09-09 02:52:12 -->