Interesting. I will have to check out this code.

Thanks for sharing.

Dan Goldberg


From: 'Karen Tellef' via RBASE-L <[email protected]>
Sent: Friday, April 25, 2025 6:07 AM
To: RBase List <[email protected]>
Subject: [EXTERNAL] [RBASE-L] - Code example: copy/paste from Excel


This is a very simple code fragment that maybe some will find useful.  I was 
bringing up a multi-line dialog box where the user could type in Invoice#(s) 
which would then be used in a "where" clause.  I had a request to be able to 
copy/paste invoice#s from an Excel spreadsheet.  Those invoice#s could be 
across a bunch of columns, or down a bunch of rows.  This code handles both 
situations.  It turns carriage returns and tabs into commas

So I put up a dialog box trapping into vInvList.  Or I define a form with a 
variable memo multi-line

SET VAR vTab = (CHAR(009))
SET VAR vInvList = (SRPL(.vInvList, .vTab, ",", 0))

SET VAR vCRLF = (CHAR(013) + CHAR(010))
SET VAR vInvList = (SRPL(.vInvList, .vCRLF, ",", 0))

SET VAR vInvList = ("(" + .vInvList + ")")
SET VAR vWhere = ("Invoice IN " + .vInvList)


Have a nice weekend, everyone!

Karen
--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion visit 
https://groups.google.com/d/msgid/rbase-l/1920114651.1425808.1745586415314%40mail.yahoo.com<https://groups.google.com/d/msgid/rbase-l/1920114651.1425808.1745586415314%40mail.yahoo.com?utm_medium=email&utm_source=footer>.

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/rbase-l/BY3PR19MB5027A7C04582D95BBF5E8CC0D4842%40BY3PR19MB5027.namprd19.prod.outlook.com.

Reply via email to