• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bold font using FileWriter

 
Srinivasa Maddi
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
The following will add an attribute Emp Name to myfile in a normal font style. But i want this to be added in BOLD font. How to achieve this


[ November 12, 2008: Message edited by: Srinivasa Maddi ]
 
Satish Chilukuri
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Plain text files by themselves do not contain any font information. You need to add extra information for that. Decide upon a file format which supports fonts like rtf, html, odf, pdf etc... and use that for your file.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What file format is this? Plain text files do not have a concept of styling text in any way.

Also, what do you mean by "attribute"? Would this be text in the file contents, or something else (like document attributes)?

Just to state the obvious, you're aware that "add" is not a method in FileWriter, right?
[ November 12, 2008: Message edited by: Ulf Dittmer ]
 
Srinivasa Maddi
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its a CSV format file. Here attribute i mean a "Column Label Name" which is getting retrieved from the database.
[ November 12, 2008: Message edited by: Srinivasa Maddi ]
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CSV does not support text styling. If you want something that opens in Excel and which supports text styling, you can use the Apache POI library to create XLS files.
 
Srinivasa Maddi
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Ulf.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic