Problems with the < character in excell

I am writing data to excell settign the content type to <meta http-equiv="Content-Type" content="application/vnd.ms-excel; 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?
inzaghiAsked:
Who is Participating?
 
colr__Commented:
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.

colr__
0
 
colr__Commented:
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).

colr__
0
 
colr__Commented:
Apologies, its &gt; for the right tag.

colr__
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.