Consulting

Results 1 to 11 of 11

Thread: Use Excel VBA to extract fund size data

  1. #1
    VBAX Newbie
    Joined
    Aug 2023
    Posts
    3
    Location

    Use Excel VBA to extract fund size data

    Hi i need to extract fund size data from fund factsheet.

    Sample URL:

    https://docs.publifund.com/12_FACT/LU1820811914/en_SG

    Anyone can guide me how to create VBA to auto extract fund size data?

    Thank you.

  2. #2
    can you download the pdf and use Able2Extract to extract the info?

  3. #3
    VBAX Newbie
    Joined
    Aug 2023
    Posts
    3
    Location
    No, im using company computer so unable to install other app. And i actually have around 2-300 pdf url to extract fund size

  4. #4
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    337
    Location
    Have you web searched topic "Access VBA extract data from PDF"? https://www.access-programmers.co.uk...access.203947/
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    VBAX Newbie
    Joined
    Aug 2023
    Posts
    3
    Location
    Yes, I actually tried a few lines of code, but because I am using Adobe Reader and not Adobe Acrobat Pro, all the VBA code failed.

  6. #6
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    337
    Location
    True, requires Adobe Acrobat Pro or 3rd party tool.

    Since you say cannot install any new software, SOL.

    If this is a company task then bosses need to authorize purchase of tool to accomplish.
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    Power Query:
    let
        Source = Pdf.Tables(Web.Contents("https://docs.publifund.com/12_FACT/LU1820811914/en_SG"), [Implementation="1.3"]),
        #"Filtered Rows" = Table.SelectRows(Source, each ([Kind] = "Table")),
        #"Expanded Data" = Table.ExpandTableColumn(#"Filtered Rows", "Data", {"Column1", "Column2"}, {"Column1", "Column2"}),
        #"Filtered Rows1" = Table.SelectRows(#"Expanded Data", each Text.StartsWith([Column1], "Fund size:")),
        #"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows1",{"Column1"})
    in
        #"Removed Other Columns"
    In the attached, right click the small table at cell A1 and choose Refresh.
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  8. #8
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    337
    Location
    Will the powers that be allow you to install Power Query add-in?

    I tested the posted Excel and got error.
    "[Expression.Error] The import Pdf.Tables matches no exports. Did you miss a module reference?"

    And under "Workbook Queries" displays "Download did not complete."

    I tried right click on A1 and A2.
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    Quote Originally Posted by June7 View Post
    Will the powers that be allow you to install Power Query add-in?
    Excel 2010 and Excel 2013 would require that add-in to be installed, later versions of Excel from 2016 have it built-in under the guise of Get & Transform Data.
    The OP hasn't revealed his version of Excel.

    You can check if you've got the Pdf.Tables function in your version of Excel by running the query at the bottom (Section 5) of this page: https://answers.microsoft.com/en-us/...5-1ece1c9f9c4a
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  10. #10
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    337
    Location
    I have Excel 2010 and that function does not list in that query output. Version: 2.62.5222.701 32-bit

    The version UPDATE button is greyed out.
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    Quote Originally Posted by June7 View Post
    I have Excel 2010 and that function does not list in that query output.
    If @peixin had responded we'd know if this worked for him or not.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •