Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2011
    Thanked 0 Times in 0 Posts

    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!!!

  2. #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,668 Times in 2,637 Posts
    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts