Posts

Table Parser Power FX

Shambhu Tiwary
Controls to Create
Text Input Control

Name: txtTabularInput

Mode: TextMode.MultiLine

Button Control

Name: btnPreview

HTML Text Control

Name: htmlTableOutput

Button OnSelect Property
text
Set(varParsedTable, 
    ForAll(
        Split(txtTabularInput.Text, Char(10)),
        {RowData: Split(Result, Char(9))}
    )
);
HTML Text Control - HtmlText Property
text
"<table border='1' cellpadding='5' cellspacing='0' style='border-collapse:collapse; width:100%; border:1px solid black; font-family:Arial, sans-serif;'>" &
    "<thead>" &
        "<tr style='background-color:#4472C4; color:white; font-weight:bold;'>" &
            Concat(
                First(varParsedTable).RowData,
                "<th style='border:1px solid black; padding:8px; text-align:left;'>" & Value & "</th>"
            ) &
        "</tr>" &
    "</thead>" &
    "<tbody>" &
        Concat(
            LastN(varParsedTable, CountRows(varParsedTable) - 1),
            "<tr>" &
                Concat(
                    RowData,
                    "<td style='border:1px solid black; padding:8px;'>" & Value & "</td>"
                ) &
            "</tr>"
        ) &
    "</tbody>" &
"</table>"
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.