Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Pasting from Clipboard into range of fields?

  • Pasting from Clipboard into range of fields?

    Posted by Allan Lombardi Lombardi on April 5, 2024 at 1:53 pm

    I would like to be able to copy 8 cells in 1 row from an Excel spreadsheet (manually) and using a window button paste that data (numbers ranging from 0.00 to 999) into a range of 8 fields on the window of the current main file. I was thinking I might use a list as an intermediary (easier to code) but I can’t seem to find any relevant commands other than Paste from clipboard which does not seem to be delimiter smart. What might be the options? TIA, Allan.

    Deleted User replied 1 year ago 3 Members · 2 Replies
  • 2 Replies
  • Götz Krija

    Member
    April 8, 2024 at 9:05 am

    You could paste the clipboard into a character variable and then parse the string into a list using a Carriage Return as delimiter.

    The code should look something like this:

    Paste from clipboard charVar1
    Do listVar.$define(charVar1)
    Repeat
    Calculate charVar2 as strtok(‘charVar1’,chr(13))
    Do listVar.$add(charVar2)
    Until charVar2=”

  • Deleted User

    Deleted User
    September 11, 2024 at 3:00 am

    To paste content from the clipboard into a range of fields, the method depends on the type of application or environment you’re working with.

    • Select the Range: Click and drag to highlight the cells where you want to paste the content.
    • Paste: Press Ctrl + V (or Cmd + V on Mac). Google Sheets will fill the selected cells with the content from the clipboard.
    • Adjust as Needed: Check and adjust formatting and cell sizes if required.

    More information at https://www.technotes.omnis.net/Technical%20Notes/Extending%20Omnis/Using%20the%20oProcess%20Worker/3.Simple%20example%3A%20whoami.html slice master

    After pasting, review the data to ensure there are no formatting or alignment issues.

Log in to reply.