How can we find how many columns and rows are there in the html file ? How can we count that how many td tags are there in the html file ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the HTML Agility pack to parse the HTML, then query it for the number of
<TR>tags for the number of rows in a table.For the
<TD>, use the first row and get the number of those. Check if there are anycolspanattributes and add the value of each – 1, to get the number of columns in the table.For example, to get the number of rows: