looking for character to represent line feed in a description build

Stephen Hulbert shulbert at littlejohnllp.com
Fri Mar 16 04:53:50 CDT 2012


Helen,
Newline in Excel is ASCII 10.
Here's some portable (and untested) code.


;put 10 in both bytes

def d'lf9 int unsigned size 2 = 257 * 10

;take the first one

def d'lf char = asc(d'lf9)[1:1]


def d'field char*132 &

  = trun(lastname) + "/" + firstname + d'lf &

 + "DOB " + datefield + d'lf &

  + "Student# " + idfield + coursename + d'lf &

  + "Enrollment Period " + begindate + "-"+ enddate

Watch out for those smart quotes/em dashes.
Regards,
Stephen.


--

Stephen Hulbert
Senior Analyst Programmer
For and on behalf of
Littlejohn LLP
Direct: +44 (20) 7516 2201

From: powerh-l-bounces+shulbert=littlejohnllp.com at lists.sowder.com [mailto:powerh-l-bounces+shulbert=littlejohnllp.com at lists.sowder.com] On Behalf Of Helen Wellcome
Sent: 15 March 2012 20:28
To: powerh-l at lists.sowder.com
Subject: looking for character to represent line feed in a description build

I am building a description field with a combination of hardcode and data fields.
This field then gets exported in a file to excel
But the description field is looking messy on excel .

Quiz
Define char field        (lastname + "/ " + firstname + "DOB " + datefield + "Student# " + idfield + coursename + "Enrollment Period " + begindate + "-" + enddate)

But this wraps around the excel box depending on size of the name fields,

I would like to build the define in quiz so when I export to excel it looks like :
                               Lastname/ firstname
                               DOB datefield
                               Student# idfield
                               Coursename
                               Enrollment Period begindate-enddate

Is there a newline   character that I can use

Helen



Littlejohn
1 Westferry Circus
Canary Wharf
London
E14 4HD

T: 020 7516 2200
F: 020 7516 2400
www.littlejohnllp.com

Littlejohn LLP, Chartered Accountants

The information contained in this communication is confidential and may be
legally privileged. It is intended solely for the use of the individual or
entity to whom it is addressed and others authorised to receive it. If you
are not the intended recipient you are hereby notified that any disclosure,
copying, distribution or taking of any action in reliance on the contents of
this information is strictly prohibited and may be unlawful.
 
Littlejohn LLP reserves the right to monitor the content of any
message sent to or from littlejohnllp.com.

Littlejohn LLP is registered as a limited liability partnership in England and Wales No. OC342572.  
Registered office as above.
 
Any reference to a partner is to a member of the limited liability partnership. 
A list of members is available at the registered office.

Littlejohn Advisors LLP is a limited liability partnership registered in 
England and Wales No. OC331599. Registered office as above.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20120316/a58e15b0/attachment-0001.htm>


More information about the powerh-l mailing list