A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
It didn't help so far.
The JavaScript is of a live webpage.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Pls help to get imported table to excel.
Html code....
function displaytagform(formname, fields){
var objfrm = document.forms[formname];
for (j=fields.length-1;j>=0;j--){var f= objfrm.elements[fields[j].f];if (f){f.value=fields[j].v};}
objfrm.submit();
}
</script><div class="pagelinks" align="right">[First/Prev] <strong>1</strong>, <a href="javascript:displaytagform('miscellaneousForm',[{f:'d-7876840-p',v:'2'}])" title="Go to page 2">2</a>, <a href="javascript:displaytagform('miscellaneousForm',[{f:'d-7876840-p',v:'3'}])" title="Go to page 3">3</a>, <a href="javascript:displaytagform('miscellaneousForm',[{f:'d-7876840-p',v:'4'}])" title="Go to page 4">4</a>, <a href="javascript:displaytagform('miscellaneousForm',[{f:'d-7876840-p',v:'5'}])" title="Go to page 5">5</a>, <a href="javascript:displaytagform('miscellaneousForm',[{f:'d-7876840-p',v:'6'}])" title="Go to page 6">6</a>, <a href="javascript:displaytagform('miscellaneousForm',[{f:'d-7876840-p',v:'7'}])" title="Go to page 7">7</a>, <a href="javascript:displaytagform('miscellaneousForm',[{f:'d-7876840-p',v:'8'}])" title="Go to page 8">8</a> [<a href="javascript:displaytagform('miscellaneousForm',[{f:'d-7876840-p',v:'2'}])">Next</a>/<a href="javascript:displaytagform('miscellaneousForm',[{f:'d-7876840-p',v:'13'}])">Last</a>]</div>
<table id="DTRDetailObject" style="width:100%" cellpadding="0" class="intablehead1" cellspacing="1">
<thead>
<tr>
<th><input type="checkbox" name="allbox" onclick="checkAll(document.forms[0])"></th>
<th>Requested Date</th>
<th>Customer MSISDN</th>
<th>POS Code</th>
<th>POS Name</th>
<th>POS MSISDN</th>
<th>Customer Name</th>
<th>MNP No</th></tr></thead>
<tbody>
<tr class="intablerow12">
<td>
<div align="center"><input type="checkbox" name="dtrappovedList[0].strSelected" value="on">
<input type="hidden" name="dtrappovedList[0].strSelected" value=""></div>
</td>
<td class="centeralign">2014-01-02 10:09:30</td>
<td class="centeralign">8409</td>
<td class="centeralign">PSBJPATN0285886</td>
<td class="centeralign">SHIV SHAKTI </td>
<td class="centeralign">91222</td>
<td class="centeralign">K KUMAR</td>
<td class="centeralign"></td></tr>
<tr class="intablerow11">
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
It didn't help so far.
The JavaScript is of a live webpage.
Hi,
i am not familiar with javascript
but try this...
assuming that you have an .htm file,
in path
"c:\FilesHTML\sample1.htm"
[Edit..Mar 11,2014]
Sub OpenXTML_01()
Dim myWB As Workbook, wb As Workbook
Dim ws As Worksheet
Dim myPath
myPath= "c:\FilesHTML\sample1.htm" '<< change
Set myWB = ThisWorkbook
Set wb = Workbooks.Open(myPath)
For x = 1 To wb.Sheets.Count
wb.Sheets(x).Copy after:=myWB.Sheets(myWB.Sheets.Count)
wb.Sheets(x).UsedRange.EntireColumn.AutoFit
Next
wb.Close False
myWB.Save
End Sub
XXXXXXXXXXXXXXXXXXX
or
download a htm file from a URL Address
like this....
[Edit..]
Sub Web_Query_Method()
Sheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.w3schools.com/html/html_tables.asp", Destination:=Range("A1"))
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False 'True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1" 'or "1,2"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
also,
"url;http://www.hsfdatabase.com/tn_greenbrier2000.htm"
and..
play with this in specific url...
"url;http://finance.yahoo.com/q?s=aa"
.WebTables = "1" 'or "1,2" or "1,2,3,4,5,6" or "3,4" or "6"
and..
"url;http://finance.yahoo.com/q?s=1" 'replace 1 with 2,3,4..
.WebTables = "1,2"
note
general,
most common is: "1" or "1,2"
and
usually, max number of tbs is 20
Dear All,
Waiting for any help on the same!!!
Hi
Pls help as I am not much familiar with HTML.