Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Extracting/Exporting HTML Tables or PDF Tables into Excel

Hi All,

I just had a quick programming/general excel question surrounding my
current dilemma. Essentially, I am trying to extract financial tables
from SEC filings (either made in PDF or HTML). Ideally I would like to
have the capability of searching an SEC filing for a specific table
(i.e. lets say a "Consolidated Income Statement") and then have a macro
which would export that table into excel without losing the formatting.
If you guys have any idea as to how to go about doing this and
potentially provide me some starter code I would greatly appreciate
that.

Thanks

Mohammed

P.S. I know next to nothing about VB. So if you could explain what
parameters I may need it would be quite useful and what is going on
with the the code that would be helpful.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Extracting/Exporting HTML Tables or PDF Tables into Excel

Mohammed,
Reading the HTML files could be achieved with a web query. Look into
DataGet External DataNew Web Query, selecting the table to import from.
Getting data out PDF and into XL can be done manually as I've not looked
into coding this:
Open the PDF in Acrobat, NOT the Reader.
Use the Select Table tool.
Right click and export or open in Excel, depending on your version of
Acrobat.
Or can save the PDF as HTML, then web query that.

NickHK

"Mo Money" wrote in message
oups.com...
Hmm I have no idea...but your questions seems quite interesting.

wrote:
Hi All,

I just had a quick programming/general excel question surrounding my
current dilemma. Essentially, I am trying to extract financial tables
from SEC filings (either made in PDF or HTML). Ideally I would like to
have the capability of searching an SEC filing for a specific table
(i.e. lets say a "Consolidated Income Statement") and then have a macro
which would export that table into excel without losing the formatting.
If you guys have any idea as to how to go about doing this and
potentially provide me some starter code I would greatly appreciate
that.

Thanks

Mohammed

P.S. I know next to nothing about VB. So if you could explain what
parameters I may need it would be quite useful and what is going on
with the the code that would be helpful.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Extracting/Exporting HTML Tables or PDF Tables into Excel

For HTML to Excel, you might consider using the following script
extract -
---------------------------------------------------------------
sURL = "http://www.ibm.com"
On Error GoTo error_handler
Set objIE = CreateObject("InternetExplorer.Application")
With objIE
.Navigate sURL
Do While .Busy: DoEvents: Loop
RowNum = 1
ColNum = 1
With objIE.Document
Set theTables = .all.tags("table")
For Each Table In theTables
For Each Row In Table.Rows
For Each cell In Row.Cells
ws.Cells(RowNum, ColNum) = cell.innerText
ColNum = ColNum + 1
Next
RowNum = RowNum + 1
Next
Next
End With
End With
Set objIE = Nothing
Exit Sub
---------------------------------------------------------------
For PDF to Excel, there's no direct tool I could found, but you might
try PDF-HTML-Excel.

For PDF to HTML, you can use pdf2html, freely available on
sourceforge.net

NickHK wrote:
Mohammed,
Reading the HTML files could be achieved with a web query. Look into
DataGet External DataNew Web Query, selecting the table to import from.
Getting data out PDF and into XL can be done manually as I've not looked
into coding this:
Open the PDF in Acrobat, NOT the Reader.
Use the Select Table tool.
Right click and export or open in Excel, depending on your version of
Acrobat.
Or can save the PDF as HTML, then web query that.

NickHK

"Mo Money" wrote in message
oups.com...
Hmm I have no idea...but your questions seems quite interesting.

wrote:
Hi All,

I just had a quick programming/general excel question surrounding my
current dilemma. Essentially, I am trying to extract financial tables
from SEC filings (either made in PDF or HTML). Ideally I would like to
have the capability of searching an SEC filing for a specific table
(i.e. lets say a "Consolidated Income Statement") and then have a macro
which would export that table into excel without losing the formatting.
If you guys have any idea as to how to go about doing this and
potentially provide me some starter code I would greatly appreciate
that.

Thanks

Mohammed

P.S. I know next to nothing about VB. So if you could explain what
parameters I may need it would be quite useful and what is going on
with the the code that would be helpful.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
concatenate tables into html tables urlocaljeweler Excel Discussion (Misc queries) 1 December 11th 09 08:15 PM
concatenate tables into html tables urlocaljeweler New Users to Excel 1 December 11th 09 06:30 AM
Exporting Excel Tables Astrid Excel Discussion (Misc queries) 1 October 2nd 07 09:24 PM
Grabbing HTML tables into Excel Wibs Excel Discussion (Misc queries) 4 December 4th 05 07:29 PM
Exporting Excel Comments in to Access tables Ian Millward Excel Programming 1 December 10th 03 12:29 PM


All times are GMT +1. The time now is 09:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"