Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-26-2012, 08:30 AM   PM User | #1
emekapromise
New Coder

 
Join Date: May 2011
Posts: 36
Thanks: 3
Thanked 0 Times in 0 Posts
emekapromise is an unknown quantity at this point
Exclamation Problem exporting Data to Excel with java

Please I need a help.

I am trying to export JTable data to excel, it works perfectly if the JTble doesn't contain a null. But once there is a null in the JTable my code throws an exception and the data doesn't eport.

Please can anybody help me correct this error?

Thanks in advance!!!
emekapromise is offline   Reply With Quote
Old 11-26-2012, 01:55 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Since you already have it working I'd suggest simply removing the nulls and replacing them with empty Strings. If you don't want to do it with the original data, take a copy of it during export or alter the export to catch the nulls and replace them with empty strings. You could also write it to completely forbid null to start with and take only an empty string.
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:49 AM.


Advertisement
Log in to turn off these ads.