### Export Console Table as StringBuilder Source: https://context7.com/minhhungit/consoletableext/llms.txt Use the Export method to get the formatted table as a StringBuilder. This is useful for logging, file output, or further string manipulation before displaying. ```csharp using ConsoleTableExt; using System.Collections.Generic; using System.Text; var data = new List> { new List{ "Test 1", "Pass" }, new List{ "Test 2", "Fail" } }; StringBuilder tableString = ConsoleTableBuilder .From(data) .WithColumn("Test Name", "Result") .WithFormat(ConsoleTableBuilderFormat.MarkDown) .Export(); // Use the string for logging, file writing, etc. string tableOutput = tableString.ToString(); Console.WriteLine(tableOutput); // Write to file System.IO.File.WriteAllText("report.md", tableOutput); ``` -------------------------------- ### Advanced Custom Console Table with Title and Char Map in C# Source: https://github.com/minhhungit/consoletableext/blob/master/README.md Create a highly customized console table with a title, specific column headers, minimum column lengths, text alignment, and custom character maps for borders and dividers. This example demonstrates extensive configuration options. ```csharp ConsoleTableBuilder .From(tableData) .WithTitle("CONTACTS ", ConsoleColor.Yellow, ConsoleColor.DarkGray) .WithColumn("Id", "First Name", "Sur Name") .WithMinLength(new Dictionary { { 1, 25 }, { 2, 25 } }) .WithTextAlignment(new Dictionary { {2, TextAligntment.Right } }) .WithCharMapDefinition(new Dictionary { {CharMapPositions.BottomLeft, '=' }, {CharMapPositions.BottomCenter, '=' }, {CharMapPositions.BottomRight, '=' }, {CharMapPositions.BorderTop, '=' }, {CharMapPositions.BorderBottom, '=' }, {CharMapPositions.BorderLeft, '|' }, {CharMapPositions.BorderRight, '|' }, {CharMapPositions.DividerY, '|' }, }) .WithHeaderCharMapDefinition(new Dictionary { {HeaderCharMapPositions.TopLeft, '=' }, {HeaderCharMapPositions.TopCenter, '=' }, {HeaderCharMapPositions.TopRight, '=' }, {HeaderCharMapPositions.BottomLeft, '|' }, {HeaderCharMapPositions.BottomCenter, '-' }, {HeaderCharMapPositions.BottomRight, '|' }, {HeaderCharMapPositions.Divider, '|' }, {HeaderCharMapPositions.BorderTop, '=' }, {HeaderCharMapPositions.BorderBottom, '-' }, {HeaderCharMapPositions.BorderLeft, '|' }, {HeaderCharMapPositions.BorderRight, '|' }, }) .ExportAndWriteLine(TableAligntment.Right); ``` -------------------------------- ### Create Console Table from List> Source: https://context7.com/minhhungit/consoletableext/llms.txt Use ConsoleTableBuilder.From with a List> to create a table. Ensure all inner lists have the same number of elements. The table is exported and written to the console. ```csharp using ConsoleTableExt; using System; using System.Collections.Generic; using System.Data; // From List> var listData = new List> { new List{ "Sakura Yamamoto", "Support Engineer", "London", 46 }, new List{ "Serge Baldwin", "Data Coordinator", "San Francisco", 28 }, new List{ "Shad Decker", "Regional Director", "Edinburgh", 35 } }; ConsoleTableBuilder .From(listData) .ExportAndWriteLine(); ``` -------------------------------- ### Initialize Table Data in C# Source: https://github.com/minhhungit/consoletableext/blob/master/README.md Prepare a list of lists to hold your table data. Each inner list represents a row, and elements can be of various object types. ```csharp var tableData = new List> { new List{ "Sakura Yamamoto", "Support Engineer", "London", 46}, new List{ "Serge Baldwin", "Data Coordinator", "San Francisco", 28, "something else" }, new List{ "Shad Decker", "Regional Director", "Edinburgh"}, }; ``` -------------------------------- ### Simple Console Table Output in C# Source: https://github.com/minhhungit/consoletableext/blob/master/README.md Generate and print a console table using the default format. This is the most basic way to display data. ```csharp ConsoleTableBuilder .From(tableData) .ExportAndWriteLine(); ``` -------------------------------- ### Console Table with Alternative Format and Center Alignment in C# Source: https://github.com/minhhungit/consoletableext/blob/master/README.md Utilize a predefined 'Alternative' format for the console table and center-align the entire table output. Requires importing the ConsoleTableExt library. ```csharp ConsoleTableBuilder .From(tableData) .WithFormat(ConsoleTableBuilderFormat.Alternative) .ExportAndWriteLine(TableAligntment.Center); ``` -------------------------------- ### Apply Built-in Table Formats Source: https://context7.com/minhhungit/consoletableext/llms.txt Use the WithFormat method to apply predefined table styles like Default, MarkDown, Alternative, and Minimal. Each format alters the border characters and layout. ```csharp using ConsoleTableExt; var data = new List> { new List{ "Alice", "Developer", 30 }, new List{ "Bob", "Designer", 25 } }; // Default format (uses dashes and pipes) ConsoleTableBuilder .From(data) .WithFormat(ConsoleTableBuilderFormat.Default) .WithColumn("Name", "Role", "Age") .ExportAndWriteLine(); // Alternative format (uses plus signs at corners) ConsoleTableBuilder .From(data) .WithFormat(ConsoleTableBuilderFormat.Alternative) .WithColumn("Name", "Role", "Age") .ExportAndWriteLine(); // Markdown format (compatible with Markdown tables) ConsoleTableBuilder .From(data) .WithFormat(ConsoleTableBuilderFormat.MarkDown) .WithColumn("Name", "Role", "Age") .ExportAndWriteLine(); // Minimal format (header underline only) ConsoleTableBuilder .From(data) .WithFormat(ConsoleTableBuilderFormat.Minimal) .WithColumn("Name", "Role", "Age") .ExportAndWriteLine(); ``` -------------------------------- ### Create Console Table from Custom Data Function Source: https://context7.com/minhhungit/consoletableext/llms.txt Build a table using a function that returns a ConsoleTableBaseData object. This allows for programmatic definition of table columns and rows. ```csharp // From custom data function ConsoleTableBuilder.From(() => new ConsoleTableBaseData { Rows = new List> { new List { "a1", "b1", "c1" }, new List { "a2", "b2", "c2" } }, Column = new List { "Col-A", "Col-B", "Col-C" } }) .ExportAndWriteLine(); ``` -------------------------------- ### Create Console Table from List (Class) Source: https://context7.com/minhhungit/consoletableext/llms.txt Generate a table from a List where T is a class. The library uses reflection to extract public properties of the class as column headers and data. ```csharp // From List where T is a class (uses reflection to extract properties) public class Employee { public string Name { get; set; } public string Position { get; set; } public int Age { get; set; } } var employees = new List { new Employee { Name = "John Doe", Position = "Developer", Age = 30 }, new Employee { Name = "Jane Smith", Position = "Manager", Age = 35 } }; ConsoleTableBuilder .From(employees) .ExportAndWriteLine(); ``` -------------------------------- ### Output Console Table with Alignment Source: https://context7.com/minhhungit/consoletableext/llms.txt Use ExportAndWriteLine to render and output the table to the console. This method supports controlling the table's alignment within the console window using TableAligntment enum. ```csharp using ConsoleTableExt; using System.Collections.Generic; var data = new List> { new List{ "Alpha", 1 }, new List{ "Beta", 2 } }; // Left-aligned (default) ConsoleTableBuilder .From(data) .WithColumn("Name", "Value") .WithFormat(ConsoleTableBuilderFormat.Alternative) .ExportAndWriteLine(TableAligntment.Left); // Center-aligned in console window ConsoleTableBuilder .From(data) .WithColumn("Name", "Value") .WithFormat(ConsoleTableBuilderFormat.Alternative) .ExportAndWriteLine(TableAligntment.Center); // Right-aligned in console window ConsoleTableBuilder .From(data) .WithColumn("Name", "Value") .WithFormat(ConsoleTableBuilderFormat.Alternative) .ExportAndWriteLine(TableAligntment.Right); ``` -------------------------------- ### Create Console Table from DataTable Source: https://context7.com/minhhungit/consoletableext/llms.txt Create a table from a System.Data.DataTable. The library automatically uses column names as headers and populates rows from the DataTable. ```csharp // From DataTable DataTable table = new DataTable(); table.Columns.Add("Name", typeof(string)); table.Columns.Add("Position", typeof(string)); table.Columns.Add("Age", typeof(int)); table.Rows.Add("Airi Satou", "Accountant", 33); table.Rows.Add("Angelica Ramos", "CEO", 47); ConsoleTableBuilder .From(table) .ExportAndWriteLine(); ``` -------------------------------- ### Set Minimum Column Widths Source: https://context7.com/minhhungit/consoletableext/llms.txt Sets minimum character width for specific columns. Useful for ensuring consistent column widths regardless of data length. Use column index (0-based) as the dictionary key. ```csharp using ConsoleTableExt; using System.Collections.Generic; var data = new List> { new List{ "A", 1, "X" }, new List{ "B", 2, "Y" } }; // Without minimum length - columns are as narrow as content ConsoleTableBuilder .From(data) .WithColumn("Col1", "Col2", "Col3") .WithFormat(ConsoleTableBuilderFormat.Alternative) .ExportAndWriteLine(); // With minimum length - enforce wider columns ConsoleTableBuilder .From(data) .WithColumn("Col1", "Col2", "Col3") .WithFormat(ConsoleTableBuilderFormat.Alternative) .WithMinLength(new Dictionary { { 0, 15 }, // First column minimum 15 characters { 1, 10 }, // Second column minimum 10 characters { 2, 20 } // Third column minimum 20 characters }) .ExportAndWriteLine(); ``` -------------------------------- ### WithPaddingLeft/WithPaddingRight - Cell Padding in C# Source: https://context7.com/minhhungit/consoletableext/llms.txt Sets custom padding strings for the left and right sides of cell content. Default padding is a single space on each side. Use `WithPaddingLeft()` and `WithPaddingRight()` to configure. ```csharp using ConsoleTableExt; using System.Collections.Generic; var data = new List> { new List{ "Item", 100 }, new List{ "Thing", 200 } }; // Increased padding ConsoleTableBuilder .From(data) .WithColumn("Name", "Value") .WithFormat(ConsoleTableBuilderFormat.Alternative) .WithPaddingLeft(" ") // 3 spaces .WithPaddingRight(" ") .ExportAndWriteLine(); ``` ```csharp // No padding (compact style) ConsoleTableBuilder .From(data) .WithColumn("Name", "Value") .WithCharMapDefinition() // Empty char map .WithPaddingLeft(string.Empty) .WithPaddingRight(" ") .ExportAndWriteLine(); ``` -------------------------------- ### Define Custom Table Border Characters Source: https://context7.com/minhhungit/consoletableext/llms.txt Customize table borders using WithCharMapDefinition. This can be done with predefined maps like FramePipDefinition (single-line) or FrameDoublePipDefinition (double-line), or by providing a custom Dictionary of CharMapPositions to char. ```csharp using ConsoleTableExt; using System.Collections.Generic; var data = new List> { new List{ "Product A", 150.00, 25 }, new List{ "Product B", 299.99, 10 } }; // Using predefined single-line box-drawing characters ConsoleTableBuilder .From(data) .WithColumn("Product", "Price", "Qty") .WithCharMapDefinition(CharMapDefinition.FramePipDefinition) .ExportAndWriteLine(); // Using predefined double-line box-drawing characters ConsoleTableBuilder .From(data) .WithColumn("Product", "Price", "Qty") .WithCharMapDefinition(CharMapDefinition.FrameDoublePipDefinition) .ExportAndWriteLine(); // Custom character map with specific border characters ConsoleTableBuilder .From(data) .WithColumn("Product", "Price", "Qty") .WithCharMapDefinition(new Dictionary { { CharMapPositions.TopLeft, '=' }, { CharMapPositions.TopCenter, '=' }, { CharMapPositions.TopRight, '=' }, { CharMapPositions.MiddleLeft, '|' }, { CharMapPositions.MiddleCenter, '+' }, { CharMapPositions.MiddleRight, '|' }, { CharMapPositions.BottomLeft, '=' }, { CharMapPositions.BottomCenter, '=' }, { CharMapPositions.BottomRight, '=' }, { CharMapPositions.BorderTop, '=' }, { CharMapPositions.BorderBottom, '=' }, { CharMapPositions.BorderLeft, '|' }, { CharMapPositions.BorderRight, '|' }, { CharMapPositions.DividerX, '-' }, { CharMapPositions.DividerY, '|' } }) .ExportAndWriteLine(); ``` -------------------------------- ### Add Metadata Rows to Console Table Source: https://context7.com/minhhungit/consoletableext/llms.txt Use WithMetadataRow to add custom rows above or below the table content. The content generator function receives the builder instance, providing access to properties like NumberOfRows and NumberOfColumns. ```csharp using ConsoleTableExt; using System.Collections.Generic; var data = new List> { new List{ "Item A", 100, 5 }, new List{ "Item B", 200, 3 }, new List{ "Item C", 150, 8 } }; ConsoleTableBuilder .From(data) .WithColumn("Product", "Price", "Quantity") .WithFormat(ConsoleTableBuilderFormat.Alternative) // Top metadata rows .WithMetadataRow(MetaRowPositions.Top, builder => $"=== INVENTORY REPORT ===") .WithMetadataRow(MetaRowPositions.Top, builder => $"Generated: {DateTime.Now:yyyy-MM-dd HH:mm}") // Bottom metadata rows .WithMetadataRow(MetaRowPositions.Bottom, builder => $"Total rows: {builder.NumberOfRows} | Columns: {builder.NumberOfColumns}") .WithMetadataRow(MetaRowPositions.Bottom, builder => "=== END OF REPORT ===") .ExportAndWriteLine(); ``` -------------------------------- ### Add Table Title with Styling Source: https://context7.com/minhhungit/consoletableext/llms.txt Use WithTitle to add a title row to the console table. Supports optional foreground color, background color, and text alignment for the title. ```csharp using ConsoleTableExt; using System; using System.Collections.Generic; var data = new List> { new List{ "Alice", "Sales", 52000 }, new List{ "Bob", "Engineering", 68000 }, new List{ "Carol", "Marketing", 55000 } }; // Simple title ConsoleTableBuilder .From(data) .WithColumn("Employee", "Department", "Salary") .WithTitle("EMPLOYEE REPORT") .WithCharMapDefinition(CharMapDefinition.FramePipDefinition) .ExportAndWriteLine(); // Title with colors and alignment ConsoleTableBuilder .From(data) .WithColumn("Employee", "Department", "Salary") .WithTitle("QUARTERLY REPORT", ConsoleColor.Yellow, ConsoleColor.DarkBlue, TextAligntment.Left) .WithCharMapDefinition(CharMapDefinition.FrameDoublePipDefinition) .ExportAndWriteLine(); // Title with foreground color only, right-aligned ConsoleTableBuilder .From(data) .WithColumn("Employee", "Department", "Salary") .WithTitle("STAFF DATA", ConsoleColor.Green, TextAligntment.Right) .WithCharMapDefinition(CharMapDefinition.FramePipDefinition) .ExportAndWriteLine(); ``` -------------------------------- ### Configure Cell Text Alignment Source: https://context7.com/minhhungit/consoletableext/llms.txt Sets text alignment for specific columns in the table body. Supports Left, Right, and Center alignment. Use column index (0-based) as the dictionary key. ```csharp using ConsoleTableExt; using System.Collections.Generic; var data = new List> { new List{ "Widget", 1250.99, 50, "In Stock" }, new List{ "Gadget", 899.50, 125, "Low Stock" }, new List{ "Tool", 45.00, 1000, "In Stock" } }; ConsoleTableBuilder .From(data) .WithColumn("Product", "Price ($)", "Quantity", "Status") .WithFormat(ConsoleTableBuilderFormat.Alternative) .WithTextAlignment(new Dictionary { { 0, TextAligntment.Left }, // Product: left-aligned { 1, TextAligntment.Right }, // Price: right-aligned (for numbers) { 2, TextAligntment.Center }, // Quantity: centered { 3, TextAligntment.Center } // Status: centered }) .ExportAndWriteLine(); ``` -------------------------------- ### Configure Header Text Alignment Source: https://context7.com/minhhungit/consoletableext/llms.txt Sets text alignment specifically for header cells, independent of body cell alignment. Useful when headers need different alignment than their column data. ```csharp using ConsoleTableExt; using System.Collections.Generic; var data = new List> { new List{ "Sales Q1", 125000 }, new List{ "Sales Q2", 148500 }, new List{ "Sales Q3", 132000 } }; ConsoleTableBuilder .From(data) .WithColumn("Category", "Amount") .WithFormat(ConsoleTableBuilderFormat.Alternative) .WithMinLength(new Dictionary { { 1, 15 } }) .WithHeaderTextAlignment(new Dictionary { { 0, TextAligntment.Center }, // Header centered { 1, TextAligntment.Center } // Header centered }) .WithTextAlignment(new Dictionary { { 0, TextAligntment.Left }, // Data left-aligned { 1, TextAligntment.Right } // Data right-aligned }) .ExportAndWriteLine(); ``` -------------------------------- ### Custom Header Styling with CharMapDefinition Source: https://context7.com/minhhungit/consoletableext/llms.txt Defines separate character styling for the header row, allowing different border characters between header and body sections. Use this for sophisticated table designs with distinct header separators. ```csharp using ConsoleTableExt; using System.Collections.Generic; var data = new List> { new List{ "Item 1", 100, "Active" }, new List{ "Item 2", 200, "Pending" } }; // Header with double-line top border and single-line separator ConsoleTableBuilder .From(data) .WithColumn("Name", "Value", "Status") .WithCharMapDefinition( CharMapDefinition.FramePipDefinition, new Dictionary { { HeaderCharMapPositions.TopLeft, '╒' }, { HeaderCharMapPositions.TopCenter, '╤' }, { HeaderCharMapPositions.TopRight, '╕' }, { HeaderCharMapPositions.BottomLeft, '╞' }, { HeaderCharMapPositions.BottomCenter, '╪' }, { HeaderCharMapPositions.BottomRight, '╡' }, { HeaderCharMapPositions.BorderTop, '═' }, { HeaderCharMapPositions.BorderRight, '│' }, { HeaderCharMapPositions.BorderBottom, '═' }, { HeaderCharMapPositions.BorderLeft, '│' }, { HeaderCharMapPositions.Divider, '│' } }) .ExportAndWriteLine(); ``` ```csharp // Header without column dividers (merged header style) ConsoleTableBuilder .From(data) .WithColumn("Name", "Value", "Status") .WithCharMapDefinition( CharMapDefinition.FramePipDefinition, new Dictionary { { HeaderCharMapPositions.TopLeft, '╒' }, { HeaderCharMapPositions.TopCenter, '═' }, // No divider in header top { HeaderCharMapPositions.TopRight, '╕' }, { HeaderCharMapPositions.BottomLeft, '╞' }, { HeaderCharMapPositions.BottomCenter, '╤' }, { HeaderCharMapPositions.BottomRight, '╡' }, { HeaderCharMapPositions.BorderTop, '═' }, { HeaderCharMapPositions.BorderBottom, '═' }, { HeaderCharMapPositions.BorderLeft, '│' }, { HeaderCharMapPositions.BorderRight, '│' }, { HeaderCharMapPositions.Divider, ' ' } // Space instead of divider }) .ExportAndWriteLine(); ``` -------------------------------- ### Set Custom Column Headers with WithColumn Source: https://context7.com/minhhungit/consoletableext/llms.txt Sets custom column headers for the table. Accepts a list of strings or variadic string parameters. This overrides any existing column definitions. ```csharp using ConsoleTableExt; using System.Collections.Generic; var data = new List> { new List{ "John", "john@email.com", true }, new List{ "Jane", "jane@email.com", false } }; // Using variadic parameters ConsoleTableBuilder .From(data) .WithColumn("User Name", "Email Address", "Is Active") .WithFormat(ConsoleTableBuilderFormat.Alternative) .ExportAndWriteLine(); ``` ```csharp // Using List ConsoleTableBuilder .From(data) .WithColumn(new List { "N A M E", "[Email]", "" }) .WithFormat(ConsoleTableBuilderFormat.MarkDown) .ExportAndWriteLine(); ``` -------------------------------- ### Format Console Table String with Regex Source: https://github.com/minhhungit/consoletableext/blob/master/test-regex.txt This C# code snippet uses Regex to parse and modify a format string for console table columns. It adjusts column widths based on specific formatting rules, like doubling the width for asterisk-prefixed fields. ```csharp static void Main(string[] args) { var format = "{0,15} │ {1,30} │ {2,*13} │ {3,*2} │ {4,-14}"; var items = Regex.Replace(format, @"\{(.*?)}", m => { if (m.Value.Contains("*")) { var newValue = m.Value.Replace("*", ""); int oldLength = int.Parse(newValue.Replace("{", "").Replace("}", "").Split(',')[1]); return string.Join("", Enumerable.Range(0, oldLength / 2).Select(x => " ")) + m.Value.Replace(string.Format(",*{0}", oldLength), string.Format(",{0}", oldLength / 2)); } return m.Value; }); foreach (var item in items) { Console.WriteLine(item); } Console.WriteLine("Hello World!"); } ``` -------------------------------- ### Custom Cell Value Formatting Source: https://context7.com/minhhungit/consoletableext/llms.txt Use WithFormatter to apply custom formatting functions to cell values in specific columns. The formatter receives the cell value and returns a formatted string. Useful for number, date, or boolean formatting. ```csharp using ConsoleTableExt; using System; using System.Collections.Generic; var data = new List> { new List{ "Widget", 1250.995, new DateTime(2024, 1, 15), true }, new List{ "Gadget", 899.5, new DateTime(2024, 2, 20), false }, new List{ "Tool", 45.0, new DateTime(2024, 3, 10), true } }; ConsoleTableBuilder .From(data) .WithColumn("Product", "Price", "Date Added", "Active") .WithFormat(ConsoleTableBuilderFormat.Alternative) // Format price as currency with 2 decimal places .WithFormatter(1, value => $"${value:N2}") // Format date as short date .WithFormatter(2, value => $"{value:yyyy-MM-dd}") // Format boolean as Yes/No .WithFormatter(3, value => (bool)value ? "Yes" : "No") .ExportAndWriteLine(); // Creative formatting with decorations ConsoleTableBuilder .From(data) .WithColumn("Product", "Price", "Date", "Status") .WithCharMapDefinition(CharMapDefinition.FramePipDefinition) .WithFormatter(0, value => $">> {value} <<") .WithFormatter(1, value => $"{value:F2} USD") .WithTextAlignment(new Dictionary { { 1, TextAligntment.Right } }) .ExportAndWriteLine(); ``` -------------------------------- ### Dynamically Add Rows to Console Table Source: https://context7.com/minhhungit/consoletableext/llms.txt Use AddRow to append new rows to an existing table builder. This method supports adding single rows using object arrays, lists, or multiple rows via params. ```csharp using ConsoleTableExt; using System.Collections.Generic; // Start with initial data var initialData = new List> { new List{ "Row 1", "Data A", 100 } }; ConsoleTableBuilder .From(initialData) .WithColumn("ID", "Name", "Value") .WithFormat(ConsoleTableBuilderFormat.Alternative) // Add single row using object array .AddRow(new object[] { "Row 2", "Data B", 200 }) // Add single row using List .AddRow(new List { "Row 3", "Data C", 300 }) // Add row with params .AddRow("Row 4", "Data D", 400) .ExportAndWriteLine(); ``` -------------------------------- ### TrimColumn - Remove Empty Trailing Columns in C# Source: https://context7.com/minhhungit/consoletableext/llms.txt Enables automatic removal of empty trailing columns from the table. Useful when data has variable column counts. Use `TrimColumn(true)` to enable. ```csharp using ConsoleTableExt; using System.Collections.Generic; var data = new List> { new List{ "A", "B", null, null }, new List{ "C", "D", null, null } }; // Without TrimColumn - shows all columns including empty ones ConsoleTableBuilder .From(data) .WithFormat(ConsoleTableBuilderFormat.Alternative) .ExportAndWriteLine(); // With TrimColumn - removes trailing empty columns ConsoleTableBuilder .From(data) .WithFormat(ConsoleTableBuilderFormat.Alternative) .TrimColumn(true) .ExportAndWriteLine(); ``` -------------------------------- ### Custom Header Value Formatting Source: https://context7.com/minhhungit/consoletableext/llms.txt Use WithColumnFormatter to apply custom formatting functions to header (column name) values. This formats the column headers themselves, distinct from cell data formatting. ```csharp using ConsoleTableExt; using System.Collections.Generic; var data = new List> { new List{ "John", "Developer", 30 }, new List{ "Jane", "Designer", 28 } }; ConsoleTableBuilder .From(data) .WithColumn("name", "position", "age") .WithFormat(ConsoleTableBuilderFormat.Alternative) // Transform header text to uppercase with brackets .WithColumnFormatter(0, text => $"[ {text.ToUpper()} ]") .WithColumnFormatter(1, text => $"[ {text.ToUpper()} ]") .WithColumnFormatter(2, text => $"[ {text.ToUpper()} ]") .ExportAndWriteLine(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.