0

Hi I am writing to CSV file like below

Writer  bw3 =  new BufferedWriter(
                new OutputStreamWriter(new FileOutputStream(outFileConversation),"UTF-8"));

But Still if i open CSV in textpad all cell with complete data will be there but in Excel some text contents are moved to next cell even next line if text content is big

So I replaced all special chars from text like \n,\t,\","," etc also I used UTF-8 but still why in excel text content not wrapping to single cell ?

Any problem in writing to CSV ? or Excel not able to read huge text content ?

Nándor Előd Fekete
  • 6,211
  • 1
  • 16
  • 40
Sanvi
  • 65
  • 1
  • 8
  • Can you share a bit more of a code about how do you perform write operation? – Chirag Parmar Nov 02 '16 at 04:41
  • You need to escape comma. Find this search https://www.google.co.in/search?q=stackoverflow+mvce&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&ei=v20ZWJKCHujI8AfcjIfwAQ#newwindow=1&q=java+csv+comma+escape – vels4j Nov 02 '16 at 04:44

1 Answers1

1

Please be aware that when you have UTF-8 encoding, there are some additional steps that you should follow, as explained here

Community
  • 1
  • 1
Carlos Monroy Nieblas
  • 1,905
  • 1
  • 14
  • 22
  • I also found that String literal having 65535 length onward not able to print as size exceeds. So how to increase this length or how to break text without breaking the line display? – Sanvi Nov 02 '16 at 07:44