Export HTML to CSV

HI All,

I am trying to use the Convert Html to Csv smart service,

In the node variables:

a) HTML Document(Document) :I have passed the sample html document which i have uploaded in the document folder for the application.

Can someone suggest me what to write in the node CSS Query (text) .

A)HTML

B)

  Discussion posts and replies are publicly visible

Parents
  • Hello,

    The documentation of the Smart Service says:

    CSS Query: The css query to identify the table within the document to parse, e.g. "table", "#tableId", or ".tableClass".

    If you tell me more about the HTML and what you need to extract, i'll be happy to help you futher

  • 0
    Certified Senior Developer
    in reply to Gabriele Camilli

    I have the sample html which is to converted in Csv.

    <HTML>
    	<HEAD>
    	  <TITLE>Customer Price Communication</TITLE>
    	  <STYLE TYPE="text/css">
    		BODY {
    		  font-family: Arial, Helvetica, sans-serif;
    		  font-size: 10pt;
    		}
      
    		TD {
    		  font-family: Arial, Helvetica, sans-serif;
    		  font-size: 10pt
    		}
      
    		TH {
    		  font-family: Arial, Helvetica, sans-serif;
    		  font-size: 10pt;
    		  font-weight: bold;
    		}
    	  </STYLE>
    	</HEAD>
    	<BODY>
    	  <div align=left>
    		<TABLE border=1 cellpadding="5" cellspacing="0" bordercolor="#999999">
    		  <TR>
    			<TH ALIGN="left">Effective date</TH>
    		  </TR>
    		  <TR>
    			<TD>26 May 2022 12:00AM</TD>
    		  </TR>
    		</TABLE>
    	  </div>
    	  <BR>
    	  <BR>
    	  <div align="left">The first row shows the RACK price for the period given. The second row represents the change from the previous day. <BR>Le montant sur la deuxième ligne indique un changement par rapport au jour précédent. </div>
    	  <div align=left>
    		<TABLE style="font-size:8px;" border=1 cellpadding="5" cellspacing="0" bordercolor="#999999">
    		  <TR>
    			<TH ALIGN="left">Column 1</TH>
    			<TH ALIGN="left">Column 2</TH>
    			<TH ALIGN="left">Column 3</TH>
    			<TH ALIGN="left">Column 4</TH>
    			<TH ALIGN="left">Column 5</TH>
    		  </TR>
    		  <TR>
    			<TD rowspan=2> Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD rowspan=2> Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD rowspan=2> Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD rowspan=2> Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD rowspan=2> Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		</TABLE>
    	  </div>
    	  <BR>
    	  <BR>Disclaimer: <BR>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.  <BR>
    	  <TABLE border=1 cellpadding="5" cellspacing="0" bordercolor="#999999">
    		<TR>
    		  <TH ALIGN="center" COLSPAN="2">Column 1</TH>
    		  <TD>&nbsp</TD>
    		  <TH ALIGN="center" COLSPAN="2">Column 2 </TH>
    		</TR>
    		<TR>
    		  <TD>Loreum ipsum</TD>
    		  <TD>Loreum ipsum</TD>
    		  <TD> </TD>
    		  <TD>Loreum ipsum</TD>
    		  <TD>Loreum ipsum </TD>
    		</TR>
    		<TR>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum</TD>
    			<TD> </TD>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum </TD>
    		</TR>
    		<TR>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum</TD>
    			<TD> </TD>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum </TD>
    		</TR>
    		<TR>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum</TD>
    			<TD> </TD>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum </TD>
    		</TR>
    	  </TABLE>
    	 	 <BR>
    	  	<TABLE border=1 cellpadding="5" cellspacing="0" bordercolor="#999999">
    			<TR>
    			<TH ALIGN="center" COLSPAN="2">Column 1</TH>
    			<TD>&nbsp</TD>
    			<TH ALIGN="center" COLSPAN="2">Column 2</TH>
    			</TR>
    			<TR>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum</TD>
    				<TD> </TD>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum </TD>
    			</TR>
    			<TR>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum</TD>
    				<TD> </TD>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum </TD>
    			</TR>
    			<TR>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum</TD>
    				<TD> </TD>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum </TD>
    			</TR>
    		</TABLE>
    	</BODY>
    </HTML>

Reply
  • 0
    Certified Senior Developer
    in reply to Gabriele Camilli

    I have the sample html which is to converted in Csv.

    <HTML>
    	<HEAD>
    	  <TITLE>Customer Price Communication</TITLE>
    	  <STYLE TYPE="text/css">
    		BODY {
    		  font-family: Arial, Helvetica, sans-serif;
    		  font-size: 10pt;
    		}
      
    		TD {
    		  font-family: Arial, Helvetica, sans-serif;
    		  font-size: 10pt
    		}
      
    		TH {
    		  font-family: Arial, Helvetica, sans-serif;
    		  font-size: 10pt;
    		  font-weight: bold;
    		}
    	  </STYLE>
    	</HEAD>
    	<BODY>
    	  <div align=left>
    		<TABLE border=1 cellpadding="5" cellspacing="0" bordercolor="#999999">
    		  <TR>
    			<TH ALIGN="left">Effective date</TH>
    		  </TR>
    		  <TR>
    			<TD>26 May 2022 12:00AM</TD>
    		  </TR>
    		</TABLE>
    	  </div>
    	  <BR>
    	  <BR>
    	  <div align="left">The first row shows the RACK price for the period given. The second row represents the change from the previous day. <BR>Le montant sur la deuxième ligne indique un changement par rapport au jour précédent. </div>
    	  <div align=left>
    		<TABLE style="font-size:8px;" border=1 cellpadding="5" cellspacing="0" bordercolor="#999999">
    		  <TR>
    			<TH ALIGN="left">Column 1</TH>
    			<TH ALIGN="left">Column 2</TH>
    			<TH ALIGN="left">Column 3</TH>
    			<TH ALIGN="left">Column 4</TH>
    			<TH ALIGN="left">Column 5</TH>
    		  </TR>
    		  <TR>
    			<TD rowspan=2> Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD rowspan=2> Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD rowspan=2> Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD rowspan=2> Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD rowspan=2> Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		  <TR>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    			<TD>Lorem ipsum</TD>
    		  </TR>
    		</TABLE>
    	  </div>
    	  <BR>
    	  <BR>Disclaimer: <BR>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.  <BR>
    	  <TABLE border=1 cellpadding="5" cellspacing="0" bordercolor="#999999">
    		<TR>
    		  <TH ALIGN="center" COLSPAN="2">Column 1</TH>
    		  <TD>&nbsp</TD>
    		  <TH ALIGN="center" COLSPAN="2">Column 2 </TH>
    		</TR>
    		<TR>
    		  <TD>Loreum ipsum</TD>
    		  <TD>Loreum ipsum</TD>
    		  <TD> </TD>
    		  <TD>Loreum ipsum</TD>
    		  <TD>Loreum ipsum </TD>
    		</TR>
    		<TR>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum</TD>
    			<TD> </TD>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum </TD>
    		</TR>
    		<TR>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum</TD>
    			<TD> </TD>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum </TD>
    		</TR>
    		<TR>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum</TD>
    			<TD> </TD>
    			<TD>Loreum ipsum</TD>
    			<TD>Loreum ipsum </TD>
    		</TR>
    	  </TABLE>
    	 	 <BR>
    	  	<TABLE border=1 cellpadding="5" cellspacing="0" bordercolor="#999999">
    			<TR>
    			<TH ALIGN="center" COLSPAN="2">Column 1</TH>
    			<TD>&nbsp</TD>
    			<TH ALIGN="center" COLSPAN="2">Column 2</TH>
    			</TR>
    			<TR>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum</TD>
    				<TD> </TD>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum </TD>
    			</TR>
    			<TR>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum</TD>
    				<TD> </TD>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum </TD>
    			</TR>
    			<TR>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum</TD>
    				<TD> </TD>
    				<TD>Loreum ipsum</TD>
    				<TD>Loreum ipsum </TD>
    			</TR>
    		</TABLE>
    	</BODY>
    </HTML>

Children