Piyush with Rails
2010-Feb-01 05:10 UTC
Embedding New Line Character in XML Spreadsheet (Excel)
Hi Friends, Hope all are doing well. I running with below problem here. please let me know if anyone have workaround on this. I am generating excel spreadsheet using XML representation for cells and rows in ROR. now within content of a cell i need to enter new line character (means need to put line break) between some content. i have searched at various places for this and found that for adding line break (Alt + Enter), its required to embed between any content. and then i tried to put between the content of a cell but it got interpreted as in the excel sheet. if i save the excelsheet as xml spreadsheet and check the content in wordpad its showing &#10; in the cell content. for an example i tried as given below. xml.Row ''ss:StyleID'' => ''s65'' do xml.Cell ''ss:StyleID'' => ''s70'' do xml.Data "test" + " " + "test 3", ''ss:Type'' => ''String'' end end So here i was expecting data test and test 3 need to be separated by line break but in the excel sheet it is showing as test test 3 and saving and opening as xml shpreadsheet it is showing as test&#10;test 3 Apart from that i tried to puts"\n",<br/> etc tags but it is putting space for this characters. Please let me know if anyone has any solution on this. Thanks in advance. Thanks, Piyush -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rails List
2010-Feb-01 09:14 UTC
Re: Embedding New Line Character in XML Spreadsheet (Excel)
did you try 10.chr -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Piyush with Rails
2010-Feb-03 05:56 UTC
Re: Embedding New Line Character in XML Spreadsheet (Excel)
Yes.i have tried putting 10.chr as as below xml.Row ''ss:StyleID'' => ''s65'' do xml.Cell ''ss:StyleID'' => ''s70'' do xml.Data "test" + 10.chr + "test 3", ''ss:Type'' => ''String'' end end But it is putting a space instead of a line break. Thanks, Piyush On Feb 1, 2:14 pm, Rails List <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> did you try > > 10.chr > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.