ConsoleTableExt
ConsoleTableExt copied to clipboard
Multiple lines in cell
Sorry, I can't figure out, do ConsoleTableExt have any support of multiple lines in cell? Just now as I see, when I try to use the "first" + Environment.NewLine + "second"
text in cell, the line wraps not inside the cell, but on the new line of whole formatted table output. Is it possible to format table like in https://github.com/seleznevae/libfort? The libfort unfortunately is in C (
Maybe there is a way to do it in ConsoleTableExt?
This code:
public static string GetAsciiTable()
{
var tableData = new List<List<object>>
{
new List<object>{ "Sakura Yamamoto", "Support Engineer", "London", 46},
new List<object>{ "Serge Baldwin", "Data Coordinator", "San Francisco", 28, "something else" },
new List<object>{ "Shad Decker", "Regional Director", "Edinburgh"},
};
return ConsoleTableBuilder.From(tableData)
.WithColumn("AAA BBB", "CCC" + Environment.NewLine + "DDD", "EEE FFF")
.Export().ToString();
}
Results in this output:
And the C libfort library multiline output for example:
No sir, multi lines has not supported yet