Binary Fortress
Binary Fortress Software
CheckCentral
ClipboardFusion
CloudShow
CloudShow Manager
DisplayFusion
FileSeek
HashTools
LogFusion
Notepad Replacer
Online Base64 Decoder
Online Base64 Encoder
Online JSON Formatter
ShellSend
TrayStatus
VoiceBot
WallpaperFusion
Window Inspector
More Apps...
DisplayFusion
CheckCentral
CloudShow
ClipboardFusion
FileSeek
TrayStatus
VoiceBot
WallpaperFusion
Clipboard
Fusion
by Binary Fortress Software
Download
Download
Change Log
Download Beta
Beta Change Log
License (EULA)
Features
Features
HotKeys
Macros
Triggers
Clipboard Syncing
Clipboard Manager
Languages
Free vs Pro
Apps
More
Screenshots
Macros
Languages
Help
Help Guide
FAQ
Discussions
Contact Us
Find My License
Mailing Address
Advanced Settings
Purchase
Login / Register
WARNING: You currently have Javascript disabled!
This website will not function correctly without Javascript enabled.
Title
Message
OK
Confirm
Yes
No
Excel Cells to Separate Entries
Return to ClipboardFusion Macros
Description
This macro takes the copied Excel cells from the clipboard and creates separate ClipboardFusion history entries for each cell.
Language
C#.net
Minimum Version
5.9.1+
Created By
Thomas Malloch (BFS)
Contributors
-
Date Created
Jan 14, 2022
Date Last Modified
Jan 14, 2022
Macro Code
Copy
Select All
using System; using System.Collections.Generic; // The 'text' parameter will contain the text from the: // - Current Clipboard when run by HotKey // - History Item when run from the History Menu // The returned string will be: // - Placed directly on the Clipboard when run as a Macro // - Ignored by ClipboardFusion if it is 'null' // - Passed along to the next action in a Trigger (null changed to an empty string) public static class ClipboardFusionHelper { public static string ProcessText(string text) { // Clean up line breaks text = text.Replace(Environment.NewLine, "\n") .Replace("\0", "") .Replace("\r", ""); // Get the lines from the text string[] lines = text.Split(new [] {'\n'}); // Reverse the order of the lines so that they appear in the right order in this History Array.Reverse(lines); // Loop through the lines and add the cells to the History foreach(string line in lines) { string[] cells = line.Split(new [] { '\t' }); Array.Reverse(cells); foreach(string cell in cells) BFS.ClipboardFusion.AddHistoryText(cell); } // Tell ClipboardFusion to ignore the result of this macro return null; } }