+ Reply to Thread
Results 1 to 12 of 12

Fetching data from PDF to excel-Alignment issue

  1. #1
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Fetching data from PDF to excel-Alignment issue

    I have sucessfully designed a code to extract the datas from pdf to workbook.All the data's are fetching to excel very well with out any issues.
    But i have alignment/Rule to place the data's to excel from Pdf..I tried a lot..but am failing when trying.I have attached the
    required files for review.Some one please have a look and help me out to complete the code.

    1.Pdf files
    2.Conversion of current output file
    3.Requirement needed in the macro.
    4.Required output



    Thanks in advance
    Lax
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Fetching data from PDF to excel-Alignment issue

    Can any one please have a look and help me out

    Lax

  3. #3
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Fetching data from PDF to excel-Alignment issue

    Can any one please have a look and help me out

    Lax

  4. #4
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Fetching data from PDF to excel-Alignment issue

    Can some one pls help me as I have done with the main part of the coding.I have to match the alignment alone.pls help me wit this..

    Lax

  5. #5
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Fetching data from PDF to excel-Alignment issue

    Sorry Friends,

    I missed to attache the code so far what i have done.

    Please Login or Register  to view this content.
    And the second part is :

    Please Login or Register  to view this content.

    Re attaching the work book also

    Thanks,
    Lax
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Fetching data from PDF to excel-Alignment issue

    Dear masters,
    I have done 90% of the code.am struck with the rest.please help me.

    Lax

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Fetching data from PDF to excel-Alignment issue

    You'd probably be better off asking your question in an Acrobat forum.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Fetching data from PDF to excel-Alignment issue

    Dear shg,
    Thanks ..but I have completed the macro part of fetching details from PDF.my only request is I have to place the details fetching from PDF to be placed in a appropriate cells shown in the required output sheet.I need macro/formula +macro code updates in my macro itself.
    Thanks for the help in advance.

    Lax

  9. #9
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Fetching data from PDF to excel-Alignment issue

    Hi Lax,

    I completed the processing of Invoice Type 1 files. Attached is an output .xlsx file for your review.

    Please upload 3 zip files containing .xlsx files created by Adobe Acrobat containing:
    a. 3 Invoice Type 1 files
    b. 3 Invoice Type 2 files
    c. 3 Invoice Type 3 files
    Make sure each file contains at least two pages of data. I need the additional files to make sure I am processing each file type correctly. Please note that Adobe Acrobat formatted page 2 of the 'Type 1' files in a completely different manner than it processed page 1.

    Please let me know if you want changes to any of the following items:
    1. The output files are starting at line 17 per your 'required output.xlsx' file. Please let me know if there is anything additional you want. I am discarding everything except the column headers and the actual invoice data.
    2. All data is formatted as text for ease in 'PrettyPrint' (i.e. there is a 'single quote' [aka apostrophe ' ], inserted in front of each field. Please let me know if you need any cells formatted specifically as numbers. This will be needed only if you are going to do numerical calculations on those cells.
    3. The Output .xlsx files I am creating are in the same folder as the input files.
    4. The Output .xlsx files are named with 'Output' appended to the 'Base File Name'. For example if the raw file is xyz.xlsx, then the output file will be xyzOutput.xlsx.
    5. The Sheet Name in the 'Output File' is 'Table 1'. All other Sheets in the output file (if any) will be deleted.
    6. I don't have Adobe Acrobat, so I am assuming your Acrobat conversion macro works correctly.

    Lewis
    Attached Files Attached Files
    Last edited by LJMetzger; 11-04-2014 at 11:38 AM.

  10. #10
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Fetching data from PDF to excel-Alignment issue

    Dear Lewis,

    thanks and sorry for the delayed response.

    Please find my inline comments for the Questions you raised:

    1. The output files are starting at line 17 per your 'required output.xlsx' file. Please let me know if there is anything additional you want. I am discarding everything except the column headers and the actual invoice data.



    > Basically, I need the data to be converted from the column headers irrespective of the pdf Invoice copy Type 1. That mean's, post conversion of pdf file the data converted should include all the column headers along with the respective values. Also, if you could extend the range for each page post conversion. Since this would include all the converted values and also would not overlap on the other page data converted values.


    2. All data is formatted as text for ease in 'PrettyPrint' (i.e. there is a 'single quote' [aka apostrophe ' ], inserted in front of each field. Please let me know if you need any cells formatted specifically as numbers. This will be needed only if you are going to do numerical calculations on those cells.


    > Kindly keep the formatting for the column H ( Price ) and column L (Amount) as numbers for calculation purpose, rest all can be accepted as Text format.


    3. The Output .xlsx files I am creating are in the same folder as the input files.


    > The path is OK.


    4. The Output .xlsx files are named with 'Output' appended to the 'Base File Name'. For example if the raw file is xyz.xlsx, then the output file will be xyzOutput.xlsx.

    >File name is OK.

    Just to confirm, if you are appending my macro i.e (basic conversion of pdf to excel version) in the new requirement (your's current macro).



    5. The Sheet Name in the 'Output File' is 'Table 1'. All other Sheets in the output file (if any) will be deleted.

    >I believe as the Output File generated would be invoice specific and thus no other Tab sheets will be generated.



    Please help me to complete my rest part.Waiting for your next reply..

    Thanks,
    Lax

  11. #11
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Fetching data from PDF to excel-Alignment issue

    Dear Lewis,

    as discussed i have attached 3 invoice files.PFA..Thanks in advance
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Fetching data from PDF to excel-Alignment issue

    See the attached file 'ExcelForumConvertInvoices.xlsm'. I've included renamed .xlsx file and renamed .pdf files in the zip file also, for ease of testing. Many of the .xlsx files created by Adobe Acrobat, especially the ones with Optical Character Recognition (OCR), were not well behaved. Misbehavior included:
    a. Lines out of order
    b. Lines concatenated together
    c. Missing data
    d. OCR errors which include:
    (1) Changing a 5 to an S
    (2) Elminating the character '1' (e.g. '2014' becomes '2 14')

    I corrected the misbehavior the best I could, but I am afraid that you will have to manually examine each file to make sure that the data is correct.
    -------------------------------

    There is a different macro that processes each File Type or SubType:
    1 = 'Sobeys' Invoices
    2A = 'BUY LOW' Invoices (Acrobat Optical Character Recognition)
    2B = Returns to 'GENERAL MILLS CANADA' (Acrobat Optical Character Recognition)
    3 = 'CO-OP ATLANTIC' Request For Adjustment

    Each Type/SubType is in in it's own module. Module 0 (mInvoiceType0 )contains code to identify Type/SubType and also contains Utility Routines.

    ---------------------

    I made a few small changes to your original code (module mExportAllPDFs) to allow my code to be executed after all the .pdf files are processed. The changes I made are highlighted in red:
    Please Login or Register  to view this content.


    To test what I've done, I suggest you put all the files alone in their own subfolder and test using my Excel file. If you are satisfied with results, then you can copy the macros over to your file. Since I am using Excel 2003, there may be features in your file that are not present in mine.

    Lewis
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Data Alignment Issue
    By Mistercadbury in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-31-2014, 06:55 AM
  2. fetching table data from a webpage in excel using VBA
    By ad9924 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-26-2014, 02:24 AM
  3. Issue with Center Alignment in word
    By SathishKumar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-27-2013, 02:31 AM
  4. writing excel VBA Query for fetching data from Access
    By vikas.bhandari in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-16-2007, 05:47 AM
  5. Userform Textbox Alignment Issue
    By Navanax in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-05-2005, 03:57 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1