Binary Fortress
Binary Fortress Software
CheckCentral
ClipboardFusion
CloudShow
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
Quoted CSV Output From Tab Delimited Data
Return to ClipboardFusion Macros
Description
Takes tab delimited data (including data copied from Excel), and converts it into a comma separated values (CSV) or comma delimited format where each field is surrounded by quotes. This helps in situations where each field in a CSV file needs to be quoted since saving a file as a CSV from Excel will only place quotes around fields that happen to have commas in them. There are no options in Excel to quote all output.
Language
C#.net
Minimum Version
3.3+
Created By
wooster11
Contributors
-
Date Created
Aug 19, 2014
Date Last Modified
Aug 13, 2019
Macro Code
Copy
Select All
using System; public static class ClipboardFusionHelper { public static string ProcessText(string text) { System.Text.StringBuilder output = new System.Text.StringBuilder(); System.IO.StringReader sr = new System.IO.StringReader(text); string line = null; line = sr.ReadLine(); while (line != null) { string[] parts = line.Split('\t'); output.AppendFormat("{0}{1}{0}{2}", '"', String.Join("\",\"", parts), "\n"); line = sr.ReadLine(); } return output.ToString(); } }