Click here to Skip to main content
14,356,442 members

C / C++ / MFC

 
AnswerRe: Tool to replace tabs with --- variable number of spaces --- and preserving width? Pin
_Flaviu3-Oct-19 2:32
member_Flaviu3-Oct-19 2:32 
GeneralRe: Tool to replace tabs with --- variable number of spaces --- and preserving width? Pin
arnold_w3-Oct-19 2:52
memberarnold_w3-Oct-19 2:52 
AnswerRe: Tool to replace tabs with VARIABLE NUMBER OF SPACES and preserve column alignment? Pin
Richard MacCutchan3-Oct-19 3:16
protectorRichard MacCutchan3-Oct-19 3:16 
GeneralRe: Tool to replace tabs with VARIABLE NUMBER OF SPACES and preserve column alignment? Pin
phil.o3-Oct-19 3:29
mvephil.o3-Oct-19 3:29 
GeneralRe: Tool to replace tabs with VARIABLE NUMBER OF SPACES and preserve column alignment? Pin
Richard MacCutchan3-Oct-19 3:37
protectorRichard MacCutchan3-Oct-19 3:37 
GeneralRe: Tool to replace tabs with VARIABLE NUMBER OF SPACES and preserve column alignment? Pin
phil.o3-Oct-19 3:46
mvephil.o3-Oct-19 3:46 
GeneralRe: Tool to replace tabs with VARIABLE NUMBER OF SPACES and preserve column alignment? Pin
Richard MacCutchan3-Oct-19 3:53
protectorRichard MacCutchan3-Oct-19 3:53 
AnswerRe: Tool to replace tabs with VARIABLE NUMBER OF SPACES and preserve column alignment? Pin
phil.o3-Oct-19 3:27
mvephil.o3-Oct-19 3:27 
Since the process involves the use of the clipboard, there are a couple of solutions which come to my mind:

  • You could create a VBA macro in Excel which would format the contents:

    • You would need some PADLEFT or PADRIGHT kind of function:
      Function PadLeft(text As Variant, totalLength As Integer, padCharacter As String) As String
          PadLeft = String(totalLength - Len(CStr(text)), padCharacter) & CStr(text)
      End Function
      
      Function PadRight(text As Variant, totalLength As Integer, padCharacter As String) As String
          PadRight = CStr(text) & String(totalLength - Len(CStr(text)), padCharacter)
      End Function
      (source: SO: Any method equivalent to PadLeft/PadRight?[^]
    • Then use one of these functions to pad the values to the width of the largest value and place the result in the clipboard.
    • Have a button in Excel which launches the macro (whose result will be formatted text exported to the clipboard).

  • Or find an utility which can automatically format the content of the clipboard according to a specified format string. Honestly, I have never searched for such a tool, I don't even know if that exists.

"Five fruits and vegetables a day? What a joke!
Personally, after the third watermelon, I'm full."

AnswerRe: Tool to replace tabs with VARIABLE NUMBER OF SPACES and preserve column alignment? Pin
leon de boer3-Oct-19 7:38
memberleon de boer3-Oct-19 7:38 
GeneralRe: Tool to replace tabs with VARIABLE NUMBER OF SPACES and preserve column alignment? Pin
arnold_w3-Oct-19 7:41
memberarnold_w3-Oct-19 7:41 
GeneralRe: Tool to replace tabs with VARIABLE NUMBER OF SPACES and preserve column alignment? Pin
leon de boer4-Oct-19 4:52
memberleon de boer4-Oct-19 4:52 
GeneralRe: Tool to replace tabs with VARIABLE NUMBER OF SPACES and preserve column alignment? Pin
arnold_w4-Oct-19 6:44
memberarnold_w4-Oct-19 6:44 
AnswerRe: Tool to replace tabs with VARIABLE NUMBER OF SPACES and preserve column alignment? Pin
arnold_w3-Oct-19 8:37
memberarnold_w3-Oct-19 8:37 
QuestionError C2059 C2143 Pin
_Flaviu2-Oct-19 8:59
member_Flaviu2-Oct-19 8:59 
AnswerRe: Error C2059 C2143 Pin
David Crow2-Oct-19 10:22
memberDavid Crow2-Oct-19 10:22 
AnswerRe: Error C2059 C2143 Pin
CPallini2-Oct-19 10:52
mveCPallini2-Oct-19 10:52 
AnswerRe: Error C2059 C2143 Pin
Richard MacCutchan2-Oct-19 22:45
protectorRichard MacCutchan2-Oct-19 22:45 
QuestionDisplays the image in Picture Control. Pin
Member 126614642-Oct-19 8:07
memberMember 126614642-Oct-19 8:07 
AnswerRe: Displays the image in Picture Control. Pin
Gerry Schmitz2-Oct-19 8:19
mveGerry Schmitz2-Oct-19 8:19 
GeneralRe: Displays the image in Picture Control. Pin
Member 126614642-Oct-19 8:41
memberMember 126614642-Oct-19 8:41 
QuestionRe: Displays the image in Picture Control. Pin
David Crow2-Oct-19 10:19
memberDavid Crow2-Oct-19 10:19 
AnswerRe: Displays the image in Picture Control. Pin
Victor Nijegorodov2-Oct-19 10:41
memberVictor Nijegorodov2-Oct-19 10:41 
GeneralRe: Displays the image in Picture Control. Pin
Member 126614642-Oct-19 11:37
memberMember 126614642-Oct-19 11:37 
GeneralRe: Displays the image in Picture Control. Pin
Victor Nijegorodov2-Oct-19 11:49
memberVictor Nijegorodov2-Oct-19 11:49 
GeneralRe: Displays the image in Picture Control. Pin
Member 126614642-Oct-19 12:04
memberMember 126614642-Oct-19 12:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.