Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9183727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:52:31+00:00 2026-06-17T18:52:31+00:00

I have the following HTML table Link To the HTML I want to parse

  • 0

I have the following HTML table Link To the HTML

I want to parse it and convert it to XML/CSV/PS Object,
I tried to do with HtmlAgilityPack.dll but no success.
Can anybody give me any directions to do it?


I want to convert the table to a PSObject and export it to csv,
I currently have just the beginning of the code,
and access to the lines but i can’t access to the values in the lines

Add-Type -Path C:\Windows\system32\HtmlAgilityPack.dll
$HTML = New-Object HtmlAgilityPack.HtmlDocument
$res = $HTML.Load("C:\Test\Test.html")
$table = $HTML.DocumentNode.SelectNodes("//table/tr/td/nobr")

when i access to $table[0..47].InnerHtml i get only the first ** column ** of the file,
i can’t access to the 2nd and etc

Thanks Ohad

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:52:33+00:00Added an answer on June 17, 2026 at 6:52 pm

    you can try this to get all the html in <nobr> tags. I let you find the logic to output what you want…

    $ie = new-object -com "InternetExplorer.Application"
    $ie.navigate("http://urltoyourfile.html")
    $doc = $ie.Document
    ($doc.getElementsByTagName("nobr"))|%{$_.innerHTML}
    

    Output :

    Lead User&nbsp;&nbsp;
    Accesses&nbsp;&nbsp;
    Last Accessed&nbsp;&nbsp;
    Average&nbsp;&nbsp;
    Max&nbsp;&nbsp;
    Min&nbsp;&nbsp;
    Total&nbsp;&nbsp;
    amirt</NO br>
    2
    01/20/2013 09:40:47
    04:18:17
    06:19:26
    02:17:09
    08:36:35
    andream
    1
    01/20/2013 10:33:01
    02:34:37
    02:34:37
    02:34:37
    02:34:37
    avnerm
    1
    01/17/2013 11:34:16
    00:30:44
    00:30:44
    00:30:44
    00:30:44
    brouria
    

    a way to parse it :

    ($doc.getElementsByTagName("nobr"))|%{
        write-host -nonew $_.innerHTML";"
        $cpt++
        if ($cpt % 8 -eq 0){$cpt=1;write-host ""}
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following script that I want to insert into a table, but
I have the following xml file and want to parse it into an .aspx
i have following HTML code:- <table class=results> <tr> <td> <a href=..>link</a><span>2nd Mar 2011</span><br>XYZ Consultancy
I have the following html table <table id={64ED3A94-5833-4CC7-869F-CCE583B498BE} class=ms-listviewtable width=100% cellspacing=0 cellpadding=1 border=0 xmlns:o=urn:schemas-microsoft-com:office:office
I have the following HTML table: <table style=width: 100%;> <tr> <td class=title_bar_left_border></td> <td class=title_bar_middle></td>
I have the following html code: <table> <tr> <td> <div id=fixmywidth style=position:relative; height:30px;> <div
I have the following code to access a HTML table. my $table = $tree->look_down(_tag
I have the following html structure (which is generated and I can't change): <table
I have the following HTML generated by an ASP.NET repeater: <table> <tr> <td><input type=hidden
I have the following html code: <form> <table> <tbody> <tr> <td> <span>Quantity<span class=pull-right>3</span> <input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.