Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting to Excel: Line breaks disappear

Status
Not open for further replies.

joji12

IS-IT--Management
Jul 17, 2002
13
0
0
US
Hi CR Gurus! Help needed!

I am exporting a CR to Excel which has formula fields in it.
A formula field has a formula 'fld1 + Chr(13) + fld2' and the output is fine when I view it in Crystal reports(the line breaks for are shown properly).

When I export to Excel, the line breaks disappear! I tried Chr(10) instead of Chr(13) and tried both together
(chr(10 + Chr(13)) , but did not work.

How to preseve line breaks in Excel? I know that 'Alt Enter' is used in Excel to force a line break. What is the equivalent of 'Alt Enter' in VB Script?

Any help would be appreciated!

Ciao!
 
I answered this in your other post.

I found that Excel uses a hex "0A", which is a chr(10), so I tried it here and it worked.

I use CR 8.5.2.663 with numerous patches installed.

I also tried exporting to a CSV and opening it with Excel, it also formatted with the line breaks.

-k kai@informeddatadecisions.com
 
Thanks for your tip. I have CR v8.5.0.217.

I'll try to install patches. That might work.

Thanks
 
Could you please tell me which all patches you had applied?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top