• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

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?
0
inzaghi
Asked:
inzaghi
  • 3
1 Solution
 
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now