Problems with the < character in excell

Posted on 2006-04-19
Last Modified: 2010-03-31
I am writing data to excell settign the content type to <meta http-equiv="Content-Type" content="application/; charset=UTF-8" />

if I have data such as 'Table <55' the data
'Table' gets printed in the cell but the remaining data <55 is ignored?

Any ideas?
Question by:inzaghi
    LVL 8

    Accepted Solution

    Your writing the excel sheet as html so when it hits this tag it expects an html tag, which it doesnt get. The applications response to this is to ignore what it believws to be a spurios tag.

    Try coding your brackets using &lt; for the left brace, and &rt; for the right brace.

    LVL 8

    Expert Comment

    You'll have to apply replaceAll("<", "&lt;") and replaceAll(">", "&rt;") to your data set before writing it to the excel sheet (assuming its a string obejct youve got).

    LVL 8

    Expert Comment

    Apologies, its &gt; for the right tag.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    If you have upgraded to Java2 update 10 on a Microsoft Windows client, you may have discovered that your Java application does not work as it did before.  For example, the colors of your Java2D graphic may be all wrong for no apparent reason. Aft…
    This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now