"LF" and "CR"

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Posts: 2
Joined: Tue Apr 19, 2022 8:23 am

"LF" and "CR"

Post by bobox » Tue Apr 19, 2022 8:42 am


I have Excel cells which happen to have text "LF" and "CR" (Sub-accounts).

When I send (Send>%SubAccount%) the Excel field text to the target application, it appears to be sending line feed (LF) or carriage return (CR) rather than the text "LF" or "CR", resulting in the field in the target application defaulting to a default value of "01" rather than the "LF" or "CR" Sub-account code. The other few thousand sub-accounts are fine, just ones which happen to have these "reserved" characters.

How do I send the literal value?

My half-arsed option was to send sub-account characters individually, eg Send> L Send> F, to avoid the problem.


User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1106
Joined: Sun Nov 03, 2002 3:19 am

Re: "LF" and "CR"

Post by Dorian (MJT support) » Tue Apr 19, 2022 9:12 am

There are two answers to this. The one that answers the question, and the correct one. :)

To answer the question :

Code: Select all

But the preferred method is to not send text to Excel cells at all, but to use the Macro Scheduler Excel Commands XLSetCell. You'll see a usage example at that link. Once you master the Excel commands you'll never look back.
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts