Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Adam-S
Regular Visitor

Website table Xpath not showing in Children

Hello,

 

I am trying to access the table shown in the below link, however, when navigating the Children tables according to the Xpath of the table from the webpage it does not appear. I assume it's because it's an interactive table on the website and may have some restrictions (I'm not very versed in accessing web content yet), so I was wondering if there is a particular method of bringing this table in via Power Query. Thanks for any guidance

https://apps.bea.gov/iTable/iTable.cfm?reqid=19&step=3&isuri=1&nipa_table_list=13&categories=survey

Xpath: /html/body/div[1]/div[2]/div/div/div[2]/div/div[3]/div/div[3]/form/div/div/div/div[2]/div/div/div[2]/div[2]/table

 

Best,

Adam

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

This monstrosity seems to work

 

let
    Source = Web.BrowserContents("https://apps.bea.gov/iTable/iTable.cfm?reqid=19&step=3&isuri=1&nipa_table_list=13&categories=survey"),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11)"}, {"Column2", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10)"}, {"Column3", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9)"}, {"Column4", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8)"}, {"Column5", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7)"}, {"Column6", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6)"}, {"Column7", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3) + TH[colspan=""4""][rowspan=""1""]:nth-child(4):nth-last-child(2), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(5), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(7):nth-last-child(5)"}, {"Column8", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3) + TH[colspan=""4""][rowspan=""1""]:nth-child(4):nth-last-child(2), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(5) + TH[colspan=""1""][rowspan=""1""]:nth-child(6):nth-last-child(4), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(7):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(8):nth-last-child(4)"}, {"Column9", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3) + TH[colspan=""4""][rowspan=""1""]:nth-child(4):nth-last-child(2), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(5) + TH[colspan=""1""][rowspan=""1""]:nth-child(6):nth-last-child(4) + TH[colspan=""1""][rowspan=""1""]:nth-child(7):nth-last-child(3), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(7):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(8):nth-last-child(4) + TD:not([colspan]):not([rowspan]):nth-child(9):nth-last-child(3)"}, {"Column10", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3) + TH[colspan=""4""][rowspan=""1""]:nth-child(4):nth-last-child(2), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(5) + TH[colspan=""1""][rowspan=""1""]:nth-child(6):nth-last-child(4) + TH[colspan=""1""][rowspan=""1""]:nth-child(7):nth-last-child(3) + TH[colspan=""1""][rowspan=""1""]:nth-child(8):nth-last-child(2), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(7):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(8):nth-last-child(4) + TD:not([colspan]):not([rowspan]):nth-child(9):nth-last-child(3) + TD:not([colspan]):not([rowspan]):nth-child(10):nth-last-child(2)"}, {"Column11", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3) + TH[colspan=""4""][rowspan=""1""]:nth-child(4):nth-last-child(2) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(1), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(5) + TH[colspan=""1""][rowspan=""1""]:nth-child(6):nth-last-child(4) + TH[colspan=""1""][rowspan=""1""]:nth-child(7):nth-last-child(3) + TH[colspan=""1""][rowspan=""1""]:nth-child(8):nth-last-child(2) + TH[colspan=""1""][rowspan=""1""]:nth-child(9):nth-last-child(1), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(7):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(8):nth-last-child(4) + TD:not([colspan]):not([rowspan]):nth-child(9):nth-last-child(3) + TD:not([colspan]):not([rowspan]):nth-child(10):nth-last-child(2) + TD:not([colspan]):not([rowspan]):nth-child(11):nth-last-child(1)"}}, [RowSelector="TABLE[id='tbl'] > * > TR"])
in
    #"Extracted Table From Html"

 

 

 

but you might have more luck invoking the downloadTable function call directly. Specify the filetype as the payload.

 

 

 

function downloadTable(filetype)
{
	var form =$("#DownloadDataForm");
	$("#downloadtable-modal").modal("hide");
	if(form.length === 0)
	{
		form = $('<form id="DownloadDataForm" style="display:none;" target="_blank" method="post" action="download.cfm"></form>');
		form.append($('<input type="hidden" name="filetype"/>'));
		form.append($('<textarea name="rawdata" style="display:none"></textarea>'));
	}
	form.find("input[name='filetype']").val(filetype);
	form.find("textarea[name='rawdata']").val($("rowTableDataContainer").html())
	$('body').append(form);
	$(form).submit();
}

 

 

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

This monstrosity seems to work

 

let
    Source = Web.BrowserContents("https://apps.bea.gov/iTable/iTable.cfm?reqid=19&step=3&isuri=1&nipa_table_list=13&categories=survey"),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11)"}, {"Column2", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10)"}, {"Column3", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9)"}, {"Column4", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8)"}, {"Column5", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7)"}, {"Column6", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6)"}, {"Column7", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3) + TH[colspan=""4""][rowspan=""1""]:nth-child(4):nth-last-child(2), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(5), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(7):nth-last-child(5)"}, {"Column8", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3) + TH[colspan=""4""][rowspan=""1""]:nth-child(4):nth-last-child(2), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(5) + TH[colspan=""1""][rowspan=""1""]:nth-child(6):nth-last-child(4), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(7):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(8):nth-last-child(4)"}, {"Column9", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3) + TH[colspan=""4""][rowspan=""1""]:nth-child(4):nth-last-child(2), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(5) + TH[colspan=""1""][rowspan=""1""]:nth-child(6):nth-last-child(4) + TH[colspan=""1""][rowspan=""1""]:nth-child(7):nth-last-child(3), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(7):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(8):nth-last-child(4) + TD:not([colspan]):not([rowspan]):nth-child(9):nth-last-child(3)"}, {"Column10", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3) + TH[colspan=""4""][rowspan=""1""]:nth-child(4):nth-last-child(2), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(5) + TH[colspan=""1""][rowspan=""1""]:nth-child(6):nth-last-child(4) + TH[colspan=""1""][rowspan=""1""]:nth-child(7):nth-last-child(3) + TH[colspan=""1""][rowspan=""1""]:nth-child(8):nth-last-child(2), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(7):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(8):nth-last-child(4) + TD:not([colspan]):not([rowspan]):nth-child(9):nth-last-child(3) + TD:not([colspan]):not([rowspan]):nth-child(10):nth-last-child(2)"}, {"Column11", "TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""2""]:nth-child(1):nth-last-child(5) + TH[colspan=""1""][rowspan=""2""]:nth-child(2):nth-last-child(4) + TH[colspan=""4""][rowspan=""1""]:nth-child(3):nth-last-child(3) + TH[colspan=""4""][rowspan=""1""]:nth-child(4):nth-last-child(2) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(1), TABLE[id='tbl'] > * > TR > TH[colspan=""1""][rowspan=""1""]:nth-child(1):nth-last-child(9) + TH[colspan=""1""][rowspan=""1""]:nth-child(2):nth-last-child(8) + TH[colspan=""1""][rowspan=""1""]:nth-child(3):nth-last-child(7) + TH[colspan=""1""][rowspan=""1""]:nth-child(4):nth-last-child(6) + TH[colspan=""1""][rowspan=""1""]:nth-child(5):nth-last-child(5) + TH[colspan=""1""][rowspan=""1""]:nth-child(6):nth-last-child(4) + TH[colspan=""1""][rowspan=""1""]:nth-child(7):nth-last-child(3) + TH[colspan=""1""][rowspan=""1""]:nth-child(8):nth-last-child(2) + TH[colspan=""1""][rowspan=""1""]:nth-child(9):nth-last-child(1), TABLE[id='tbl'] > * > TR > TD:not([colspan]):not([rowspan]):nth-child(1):nth-last-child(11) + TD:not([colspan]):not([rowspan]):nth-child(2):nth-last-child(10) + TD:not([colspan]):not([rowspan]):nth-child(3):nth-last-child(9) + TD:not([colspan]):not([rowspan]):nth-child(4):nth-last-child(8) + TD:not([colspan]):not([rowspan]):nth-child(5):nth-last-child(7) + TD:not([colspan]):not([rowspan]):nth-child(6):nth-last-child(6) + TD:not([colspan]):not([rowspan]):nth-child(7):nth-last-child(5) + TD:not([colspan]):not([rowspan]):nth-child(8):nth-last-child(4) + TD:not([colspan]):not([rowspan]):nth-child(9):nth-last-child(3) + TD:not([colspan]):not([rowspan]):nth-child(10):nth-last-child(2) + TD:not([colspan]):not([rowspan]):nth-child(11):nth-last-child(1)"}}, [RowSelector="TABLE[id='tbl'] > * > TR"])
in
    #"Extracted Table From Html"

 

 

 

but you might have more luck invoking the downloadTable function call directly. Specify the filetype as the payload.

 

 

 

function downloadTable(filetype)
{
	var form =$("#DownloadDataForm");
	$("#downloadtable-modal").modal("hide");
	if(form.length === 0)
	{
		form = $('<form id="DownloadDataForm" style="display:none;" target="_blank" method="post" action="download.cfm"></form>');
		form.append($('<input type="hidden" name="filetype"/>'));
		form.append($('<textarea name="rawdata" style="display:none"></textarea>'));
	}
	form.find("input[name='filetype']").val(filetype);
	form.find("textarea[name='rawdata']").val($("rowTableDataContainer").html())
	$('body').append(form);
	$(form).submit();
}

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors