Column width of report or folderreport

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
hermhart
Posts: 213
Joined: 13 Jan 2015 18:41

Column width of report or folderreport

Post by hermhart »

If I wanted to create a visual friendly listing using report() or folderreport(), for each column of data that I want is there any way to set the width of each column without outputting it as a table in an html file for column alignment? Granted I know that may truncate some data in some places.

highend
Posts: 13315
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Column width of report or folderreport

Post by highend »

Not directly but using a one / multiple regexreplace() on the report you've generated would be a viable option
One of my scripts helped you out? Please donate via Paypal

hermhart
Posts: 213
Joined: 13 Jan 2015 18:41

Re: Column width of report or folderreport

Post by hermhart »

Thank you. I will look into that.

highend
Posts: 13315
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Column width of report or folderreport

Post by highend »

A little tool...

Code: Select all

Mandatory args
==============
01. /columns=1:15,3:5 -> <x> = column : <y> = width | , = separator

Optional args
=============
02. /srcFile="a file with full path"
    If the argument is not given, the clipboard will be searched for the separator
    If the separator (and at least one <crlf>) is not found in the clipboard, quit
    If the argument is used but the file does not exist, quit

03. /columnSep=";"
    Default is: "|"

04. /padChar="_"
    Default is: " " (a space)

05. /removeLastSep=1
    Default is: 0
In other words, to format a report that is inside the clipboard (and that is using "|" as the field separator) you'd call it:
columnize.exe /columns=1:40,3:20,4:8
which would set the width limit to 40 for the first column and 20 for the third column, etc.
All other columns are left as they are

It will store that new report in the clipboard...
Attachments
Columnize_v0.1.zip
(30.87 KiB) Downloaded 43 times
One of my scripts helped you out? Please donate via Paypal

hermhart
Posts: 213
Joined: 13 Jan 2015 18:41

Re: Column width of report or folderreport

Post by hermhart »

That's awesome, thanks highend. I'm looking forward to testing this out!

Post Reply