Problem in WEB Data import to Excel

gnaga

Well-known Member
Joined
Jul 9, 2002
Messages
680
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
Hi,

I am not able to download the following web page content into my excel workbook. It is an ASP file. I am getting a message that "WEB Queries Returns No Data". I am able to download other ASP file data from this web site.

I am using Office XP.


http://www.capitalmarket.com/bulletin/bsebhav.asp?var=A

Thanks

GNaga
 

Some videos you may like

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

ChrisUK

Well-known Member
Joined
Sep 3, 2002
Messages
675
I think this is because a webquery insists on the data being in the first HTML table on a page and this page uses an HTML table to format the header row, the second table holds the data.

Can't think of a way round this.
 

gnaga

Well-known Member
Joined
Jul 9, 2002
Messages
680
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
Thanks Chris. I am not aware much about HTML,ASP & web pages. Why this ASP page is not getting opened in Excel. I am able to open other ASP files from the same site.

GNaga
 

ChrisUK

Well-known Member
Joined
Sep 3, 2002
Messages
675
it will be being opened but when you open a webquery it takes information from the first HTML table in a page, the page you put in your post has two HTML tables and it's the second one in your case which holds the data, not the first.
 

gnaga

Well-known Member
Joined
Jul 9, 2002
Messages
680
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows

ADVERTISEMENT

Ok. If I select only second table while importing then it should return data into Excel. Am I correct or wrong?

GNaga
 

ChrisUK

Well-known Member
Joined
Sep 3, 2002
Messages
675
I've had another look at the page and I've found a further problem, there appear to be two html and body close tags (view source and lines 34 and 35). These tags are telling excel the page has finished loading, I've found one way round it so far but it means downloading the page, cuting the lines from the source, saving the page and then querying on the saved page - not a nice solution!!
 

kahmad

New Member
Joined
Sep 18, 2002
Messages
30
Hi Gunga,
I tried a simple Solution, Maybe too simple
Left click and Drag to highlight the Whole table in View.
Right Click - Copy and then paste into an excel worksheet.
Worked perfectly for Me.
Brgds
Khawar
 

gnaga

Well-known Member
Joined
Jul 9, 2002
Messages
680
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
Thanks for both of you. I am looking for a solution to download the file to excel using a Macro. Like this I have 26 files.

I could import data from hundred over files downloaded from the same web site by writing a simple macro.

Only this 26 files only I am facing the problem. Any help Please.

GNaga
 

Watch MrExcel Video

Forum statistics

Threads
1,123,304
Messages
5,600,861
Members
414,408
Latest member
macroSmith

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top