Avatar of Sridhar Lenkala
Sridhar Lenkala

asked on 

HTML to CSV using xslt

Hi all,

I need an xslt to convert HTML to CSV. I know there are other ways to convert but I have a process which only accept xslt to convert HTML to CSV.
I am attaching source HTML file and csv file i want, can some one please create xslt for me. Appreciate any help on this since this is an urgent requirement and i am new to xslt.

Essentially below file lines of the csv files are 1 on 1. and you can get them in the body part pasted below.

Total Transactions:,245
Successful Transactions:,243
Failed Transactions:,2
Duplicate Transactions:,0
Unprocessed Transactions:,0
Transaction,Error Message,Details

 <body>
        <div class="container-fluid">
          <h4>Upload Summary</h4>
          <div class="row">
            <div class="col-md-4">
              <table class="table table-bordered table-striped table-condensed">
                <tr>
                  <td>
                    <b>Total Transactions:</b>
                  </td>
                  <td align="right">245</td>
                </tr>
                <tr>
                  <td colspan="2">
                    <hr/>
                  </td>
                </tr>
                <tr>
                  <td align="right">
                    <b>Successful Transactions:</b>
                  </td>
                  <td align="right">243</td>
                </tr>
                <tr>
                  <td align="right">
                    <b>Failed Transactions:</b>
                  </td>
                  <td align="right">2</td>
                </tr>
                <tr>
                  <td align="right">
                    <b>Duplicate Transactions:</b>
                  </td>
                  <td align="right">0</td>
                </tr>
                <tr>
                  <td align="right">
                    <b>Unprocessed Transactions:</b>
                  </td>
                  <td align="right">0</td>
                </tr>
              </table>
            </div>
          </div>
          <hr/>
          <h5>Error Summary</h5>
          <div class="row">
            <div class="col-md-12">
              <table class="table table-bordered table-striped table-condensed tablesorter">
                    <thead>
                     <tr>
                       <th class="col-md-1" align="center">Transaction</th>
                       <th class="col-md-10">Error Message</th>
                       <th class="col-md-1" align="center">Details</th>
                     </tr>
                  </thead>
                  <tbody>
FailureReport--19-.html
convertcsv.csv
HTML* XSLTXML

Avatar of undefined
Last Comment
Gertone (Geert Bormans)

8/22/2022 - Mon