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 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
 
I've had the same problem so I tried chr(10) - with CRW32 8.5.0.217 exporting to excel 8/0 and8.5 extended.

It looks fine on the CR screen, but does not work on the import.

The ascii equivalents of Alt/enter are:

28 Hex, 1C Octal. There is no decimal equivalent. How do I insert Hex or Octal into the Basic formula

thanks


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top