Import text into a form from a tab delimited file using an action

Good evening.
I am using Adobe Acrobat XI Pro
I have been working all weekend so far on this, and have tried many options.
What I am wanting is to import a line of data from an excel file into a form, save the file with a name drived from the form fields, close the new file, then go back to the original file, import a line of data, and so on and so on.
I had all of this working in livecyle with a tool, but now that we are going to Windows 8 and Microsoft Office 2013, the driver that I need to load the excel file into the form is not available--so now I have to redo the forms in Adobe and import using a tab delimited file.
I would like to do this with an action.
Thus far, I have the following.
**Credit goes to George Johnson who helped me with the script to save the file using field names a few months ago**
To start, I have a folder level script
mySaveAs = app.trustPropagatorFunction(function(doc,path)
app.beginPriv();
var myDoc = event.target;
myDoc.saveAs(path);
app.endPriv();
myTrustedSpecialTaskFunc = app.trustedFunction(function(doc,path)
//privileged and/or non-privileged code above
app.beginPriv();
mySaveAs(doc, path);
app.endPriv
//Privileged and/or non-privileged code below
For the Action, I start with the Form file loaded
Then I execute a javascript to import the text into the file.
this.importTextData("/c/data/clerical.txt");
The next step is to save the file using field names as part of the file name
--credit goes to George Johnson who assisted me with this on a similar project a few months ago.
//Get the Field Value
var fn=getField("Last").valueAsString + "-" + getField("First").valueAsString;
//Specify the folder
var fldr = "/c/data/";
//Determine the full path
var fp=fldr + fn + ".pdf";
//save the file
myTrustedSpecialTaskFunc(this, fp);
That is as far as I have gotten. 
What I want to do now is load the original form file, import the next line into the form, save the file, repeat.
If anyone could assist me, I would greatly appreciate it.
**note  I had to type this from my I-pad because I kept getting kicked off the internet from my computer.  I hope my code is typed correctly.

George
Thank you so much for your response.
Yes--there are multiple lines in the data file--it will vary from month to month.  It looks like from what you are saying is that I need to do the global variable since it will constantly change, and then increment it as it goes through the text file.  When it reaches the end, then it will stop.
I looked at the following links--but this is from Adobe 9 API--I don't know if things have changed with XI--especially since 9 used batch processing and XI has actions.
Count PDF Files
http://help.adobe.com/livedocs/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/js/html/ wwhelp.htm?href=JS_API_AcroJS.88.1.html
Global counter
http://help.adobe.com/livedocs/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/js/html/ wwhelp.htm?href=JS_API_AcroJS.88.1.html
I am not exactly sure how to include this in my code.
If you could point me in the right direction, I would appreciate it.

Similar Messages

  • Acquire data from a tab delimited file using a popup dialog object on a stamp

    I am trying to import data from a tab delimited file using a popup dialog object on a stamp.  I have purchased the book by Thom Parker--All About PDF Stamps in Acrobat and Paperless Workflows and have been working through the examples in the appendix.
    My problem is understanding how to bring the data into the dialog object from the file.
    I don't want to plagiarize his book--so am electing at this time not to show my code.  The  script is reading the file, just not bringing in the records from the file so that I can select which line to import into the stamp.
    I have typed in the code exactly how the book describes, but when the popup dialog object is selected, there is nothing in the drop-down.  When I click OK, the first record is put on the stamp--except for the fields that I am wanting to appear in the dialog object popup box.
    I have searched the forums, and also the JavaScript reference.  There are examples of the popup dialog object, but none of them show how to import the data from a file--just for the items to be typed in as the list.
    Any help would be greatly appreciated!  i have been trying to work on this for several months now.

    Karl
    Thank you for getting back with me!
    In answer to your questions:
    1. Your trusted function is not a trusted function. Did you put this
    function into a folder level script so that it will get executed at system
    startup?--
         yes--I saved the script as a .js file and put it in the following path (I have Acrobat XI Pro for Windows)
    C:\Documents and Settings\tjohnson\Application Data\Adobe\Acrobat\Privileged\11.0\JavaScripts\GetTabData.js
    2. The script cannot find your tab delimited data file, or it cannot
    extract the data. Did you add the data file in the correct location? The
    location from the script in the book would be c:\mydata\Contacts.txt
    Yes--the file is in the same path as the book.
    Below is my code that references the file.
    var cPath = "/c/mydata/Contacts.txt";
    the slashes in the book go in the direction of the text above--should they go in the direction that you have in your question?
    Also,  the name and email address need to be separated by one Tab character.
    They are. 
    3. The fields need to be named the same way as the columns in the data file (the two names are in the first line of the file).
    My headings are RevByFromTab and EmailFromTab--which match the names of the two fields on the stamp.
    So, check that you are not getting any errors in the JavaScript console
    (Ctrl-J or Cmd-J), and verify that the tab delimited file is in the correct
    location
    When I run in the java script console--and I just run the script on the stamp,
    it says
    TypeError: event.source is null
    17:Console:Exec
    undefined
    When I place the stamp on the page, the popup box is working, but when you click on the down arrow, there is nothing listed.  When I click OK, the RevByFromTab is populated by the first item in the file, but the EmailFromTab field says undefined.
    Thank you
    Message was edited by: tdjohnson7700

  • Trouble importing contacts from a tab-delimited file into Contacts on 10.9.5

    I am having Trouble importing contacts from a tab-delimited file into Contacts on MacBook Pro, OS 10.9.5, Intel 2.4 GHz Core 2 Duo., 400GB drive, 4GB memory DDR3
    So far I have:
    - Followed closely the help screen in Contacts app
    - Modified my source document meticulously - first in MS Word, then copied and tweaked in Apple's "Text Edit" app
    - The problem arises when I go to access the document for import.  Specifically, the target document, and all others in that file, are "greyed out" and thus can't be "opened" to facilitate the import process
    - Tried changing the extension of the document name to ".txt", ".rtf", and ".rtd". No change or improvement.
    - Searched Apple.com/help and found nothing relevant
    Can anyone offer some advice or tell me what I may be overlooking in this process?
    Any help will be greatly appreciated!
    Thanks,
    <Email Edited By Host>

    Hi Rammohan,
    Thanks for the effort!
    But I don't need to use GUI upload because my functionality does not require to fetch data from presentation server.
    Moreover, the split command advised by you contains separate fields...f1, f2, f3... and I cannot use it because I have 164 fields.  I will have to split into 164 fields and assign the values back to 164 fields in the work area/header line.
    Moreover I have about 10 such work areas.  so the effort would be ten times the above effort! I want to avoid this! Please help!
    I would be very grateful if you could provide an alternative solution.
    Thanks once again,
    Best Regards,
    Vinod.V

  • Program to upload data from a tab-delimited file ...

    I have to upload data from a tab-delimited file with following fields into database table(ZCBU) with same fields:
    CBU (parent)
    KUNNR (child)
    ERDAT (effective from)
    MANDT (client)
    SFID (salesforce ID)
    AEDAT (effective to)
    AENAM (assigned by).
    This file can be of type PC(txt) or UNIX.
    plz tell me how to do this in both type of files

    Hi,
    DATA: bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE.
    DATA: xfile TYPE string.
    DATA: BEGIN OF itab OCCURS 0,
            empno TYPE zmemp-empno,
            name  TYPE zmemp-first_name,
            last  TYPE zmemp-last_name,
            comp  TYPE zmemp-comp,
            place TYPE zmemp-place,
            END OF itab.
    PARAMETER : p_file TYPE rlgrap-filename OBLIGATORY.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Form to get the file path of legacy data stored on presentation server
      PERFORM get_file_path.
    START-OF-SELECTION.
      MOVE p_file TO xfile.
    to get the data from excel sheet data into an internal table
      PERFORM get_data.
      LOOP AT itab .
        REFRESH bdcdata.
        PERFORM bdc_dynpro      USING 'ZM_EMPLOYEE' '9001'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'S9001_EMPNO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=CREA'.
        PERFORM bdc_field       USING 'S9001_EMPNO'
                                      itab-empno.
        PERFORM bdc_dynpro      USING 'ZM_EMPLOYEE' '9002'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'S9002_PLACE'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SAVE'.
        PERFORM bdc_field       USING 'S9002_EMPNO'
                                      itab-empno.
        PERFORM bdc_field       USING 'S9002_FIRST_NAME'
                                      itab-name.
        PERFORM bdc_field       USING 'S9002_LAST_NAME'
                                      itab-last.
        PERFORM bdc_field       USING 'S9002_COMP'
                                      itab-comp.
        PERFORM bdc_field       USING 'S9002_PLACE'
                                      itab-place.
        PERFORM bdc_dynpro      USING 'ZM_EMPLOYEE' '9001'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'S9001_EMPNO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=BACK'.
        CALL TRANSACTION 'ZMEMP'
        USING bdcdata
        UPDATE 'A'
        MODE   'N'.
      ENDLOOP.
           Start new screen                                              *
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "BDC_FIELD
    *&      Form  get_file_path
    FORM get_file_path .
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        CHANGING
          file_name = p_file.
    ENDFORM.                    " get_file_path
    *&      Form  get_data
    FORM get_data .
      DATA : lines1 TYPE i.
      MOVE p_file TO xfile.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = xfile
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = itab.
      DESCRIBE TABLE itab LINES lines1.
      WRITE : / lines1 , 'REcords uploaded' .
    ENDFORM.                    " get_data
    Regards,
    Nihar Swain,

  • Tab Delimited File Using Receiver FCC

    Hi Experts,
    I need to generate a Tab Delimited File Using Receiver FCC. I have achieved the same by copying the tab length from a notepad and used the same in name.fieldSeparator parameter.
    The other below mentioned values for name.fieldSeparator didnu2019t produce the expected result:
    name.fieldSeparator=u2019htu2019
    name.fieldSeparator=u2019\tu2019
    name.fieldSeparator=u2019 0x09u2019
    So just need to know if my approach for achieving this is fine or not.
    Thanking you in advance.
    Aditya.

    Verma,
    name.fieldSeparator=u2019 0x09u2019
    I see a space after the first comma. Try removing it and give a try.
    '0x09' with no spaces.
    Regards,
    ---Satish

  • I am trying to create a Form that will act as a list.  I want to import data into the form from exce

    My table has a list of names with product information in corresponding columns.  I want to create a form that I can import this into where every row makes a new part of the form list I create.  Is this possible?
    Example of what I have in excel:
    Name
    Product 1
    Product 2
    Product 3
    Total
    a
    1
    2
    3
    6
    b
    0
    3
    4
    7
    c
    1
    3
    4
    8
    d
    1
    3
    5
    9
    Example of what I want in Form:
    Customer a    1     2     3     6
    Customer b    0     3     4     7
    etc.
    I want to put this info into a form to make it more presentable.  Can anyone help me with this?

    Look at the Import/Export form data functionalities already built-in into Acrobat.

  • How do you import multiple sets of tab delimited text into your form?

    Is there an easy way to bring in form data from a text file of data values(tab delimited) with multiple instances of each variable?   In my current project, I would like to bring name, address, phone, etc data from the text file for a couple hundred people into a PDF form which I create and format to my given specs.  I know I can import the text and select which instance of the variable I want to populate the similarly named fields, but I was wondering if I could appropriately name or create the various fields in the form so that it would auto populate each subsequent instance of the variables with the next line of data?.  In this case, I want to end up with a nicely formatted address book.
    Thanks!

    It is possible but not just a simple import of data.
    Each form field in the multiple page PDF would need a unique name not repeated on another page of the PDF. Fortunately the Acrobat form standard includes the "template" object and this object can be spawned or used to add a new page with the form fields automatically renamed with a prefix string of the page number and template added to each form field on the new page. So if one were to import a row from your tab delimited file into the template, one could then spawn a new page from the template with the data and rename the fields so there would be no conflict of like named fields.
    A Lesson in Templates for Adobe Acrobat by Dave Wraight
    With newer versions of Acrobat there is a mail merge feature.
    Create PDFs from Word mail merges

  • Creating tab delimited file

    Hi,
    Can anybody tell me how to create tab delimited file using ABAP. I am using 4.6C ( so I cant use cl_gui_char_utilities ) and I want to download the file to application server ( GUI_DOWNLOAD cant be used ).
    Thanks,
    Sameej

    Hi,
    -> here's an example to separate the fields by tab:
    DATA: BEGIN OF tabulator,
            x(1) TYPE x VALUE '09',
          END OF tabulator.
    data tabilator_c.
      CALL FUNCTION 'SYSTEM_CODEPAGE'
           IMPORTING
                codepage = c_to.
      tabulator_c = tabulator.
      TRANSLATE tabulator_c FROM CODE PAGE c_from TO CODE PAGE c_to.
    *for int. table
    loop at itab.
        clear string.
        do.
          assign component sy-index of structure itab to <f>.
          IF SY-SUBRC <> 0.
            EXIT.
          ENDIF.
          concatenate string <f> tabulator_c into string.
        enddo.
       append string to tab_download.
    endloop.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
                FILETYPE = 'ASC'
                FILENAME = FILE
           TABLES
                DATA_TAB = tab_download.
    Grx Andreas

  • GUI_Download problem in tab delimited file

    Hi,
    I am trying to download tab delimited file using F.M GUI_DOWNLOAD.We have
    4.6C version.I have declared internal table with 5 columns.The file created using F.M is very strange.Column 1 and 2 and 3 and 4 are seaprated by tab but column 2
    and 3  and column 4 and 5 are not seaprated by tab but have fixed length.
    I am not getting where I am doing mistake.Any help is appericiated.
    Below is the structure of internal table.
    DATA:BEGIN OF IT_FINAL OCCURS 0,
           Company(3) type c,
           County(30) type c,
           FId(35) type c,
           Wellno(15) type c,
           Welldesc(35) type c,
         END OF IT_FINAL.
    Data populated in table it_final.
    it_final-Company = '300'.
    it_final-County = 'Greenwood'.
    it_final-fid = 'testts'.
    it_final-wellno = '10000000'.
    it_final-welldesc = 'tebsbvd'.
    append it_final.
    F.M GUI_DOWNLOAD
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
        BIN_FILESIZE                  =
          filename                      = l_path
        FILETYPE                      = 'ASC'
        APPEND                        = ' '
          write_field_separator         = 'X'
        HEADER                        = '00'
        TRUNC_TRAILING_BLANKS         = ' '
        WRITE_LF                      = 'X'
        COL_SELECT                    = ' '
        COL_SELECT_MASK               = ' '
        DAT_MODE                      = ' '
      IMPORTING
        FILELENGTH                    =
        TABLES
          data_tab                      = it_final
         EXCEPTIONS
         file_write_error              = 1
         no_batch                      = 2
         gui_refuse_filetransfer       = 3
         invalid_type                  = 4
         no_authority                  = 5
         unknown_error                 = 6
         header_not_allowed            = 7
         separator_not_allowed         = 8
         filesize_not_allowed          = 9
         header_too_long               = 10
         dp_error_create               = 11
         dp_error_send                 = 12
         dp_error_write                = 13
         unknown_dp_error              = 14
         access_denied                 = 15
         dp_out_of_memory              = 16
         disk_full                     = 17
         dp_timeout                    = 18
         file_not_found                = 19
         dataprovider_exception        = 20
         control_flush_error           = 21
         OTHERS                        = 22
    Thanks,
    Rekha.

    Hi,
    i think it is because tou need to uncomment:
         FILETYPE                      = 'ASC'
    try it.
    Best regards.

  • Tab Delimited File?

    Hi All,
             I am trying to create a tab delimited file using Sender File adapter using <b>File content Conversion in Adapter Module</b>. I want a constant space beteween the fields of length 8 spaces. When i use '        ' as field seperater , the file that is generated is <b>19'     'Stringtest14,Hiring'     '09/03/2007'     'Managing Dir, Operations</b>. I want the file without colons i.e <b>19     Stringtest14,Hiring'     09/03/2007     Managing Dir, Operations</b>.
    Please Advice...
    Regards,
    XIer

    Hi Xler
    <b>content conversion parameters  ,, just like</b>
    Recordset structure = DT_PRY,*
    DT_PRY.fieldnames = ID,empname,empno,country
    DT_PRY.fieldSeparator = '0x09' (tab delimited)
    DT_PRY.endSeparator = 'nl'
    <b>
    The FCC...</b>
    Document Name : MT_PRY
    Document Namespace : http://product.com/prvsoup
    Recordset Name : recordset
    Recordset structure = DT_PRY,*
    DT_PRY.fieldnames = ID,empname,empno,country
    DT_PRY.fieldSeparator = '0x09'
    DT_PRY.endSeparator = 'nl'
    ignoreRecordsetName = true
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    <b>can take the help of this blog</b>
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    <b>Conversion agent</b>
    /people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield
    /people/paul.medaille/blog/2005/11/18/conversion-agent-a-free-lunch
    /people/alexander.bundschuh/blog/2006/03/14/integrate-sap-conversion-agent-by-itemfield-with-sap-xi
    /people/paul.medaille/blog/2005/11/17/more-on-the-sap-conversion-agent-by-itemfield
    Thanks!
    Questions are welcome here!!
    <b>Also mark helpful answers by rewarding points</b>
    Regards
    Abhishek Agrahari

  • Split tab delimited file

    Hiall,
    I filled an internal table with the data from a tab delimited file (trought the FM FTP_TOR3).
    All my date is in the internal table, but I want to split it now. I tried with the '#' (as ALT + 3), but he doesn 't split the line.
    I'm on 4.6, so I cannot use the horizontal_tab as splitter

    While I was searching on this forum on unicode-characters (had a feeling it was something like this), I found  a post with practicly the same problem (but with a somewhat bizarre title ), there they told me to use this :
    data : c_tab type x value '09'.
    as splitter. Apparently, it has something to do with Unix unicode, and the windows # differs from the Unix #.
    Problem solved, thanks for the help
    (awarded you 10 points for the help )
    kr
    Björn

  • Infospoke - tab delimited file

    Whether any one has tried generating tab delimited file using an infospoke.
    If so please advise how to proceede?
    There is SPRO setting to change the Delimiter . But not sure how can insert Tab delimiter
    in the transaction RSCUSTV1

    Hi
    you can hold Alt+ the numeric combination, but this will not be visible in the dialog. I didn't tried it, but I don't think this would be helpful.
    I a similar problem we setted "#" and then in the import we wrote to understand "#" as "Tab".
    Cheers
    Paul

  • Parse tab delimited file after upload

    I could use some advice. I have a requirement to parse and insert an uploaded, tab delimited file using APEX. Directly off of the file system, I would do this with an external table, but here I am uploading the file into a CLOB field. Does PL/SQL have any native functions to parse delimited files?
    The user will not have access to the data load part of APEX, although I have seen numerous requests on this forum for that functionality to be added to the user GUI. Thoughts?

    j,
    I wrote this a while ago...
    http://www.danielmcghan.us/2009/02/easy-csv-uploads-yes-we-can.html
    I've since improved the code a little bit. If you like the solution, I could do a new post with the latest code.
    Regards,
    Dan
    Blog: http://DanielMcGhan.us/
    Work: http://SkillBuilders.com/

  • Download TAB-Delimited file

    Hi,
    I want to produce a TAB-Delimited File using the FM, Gui_Download. Could anyone help how to do this?

    Use this <b>METHOD cl_gui_frontend_services=>gui_download</b>
    Download the output file to presentation server
        CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            filename                = filename         "filename to be generated
            filetype                = 'ASC'                "File type ASCII for tab delimited
            write_field_separator   = 'X'               "X for tab delimiter
          CHANGING
            data_tab                = itab_download            "internal table with data
          EXCEPTIONS
            file_write_error        = 1
            no_batch                = 2
            gui_refuse_filetransfer = 3
            invalid_type            = 4
            no_authority            = 5
    Please check and close your thread if its resolved.
    Reward points if useful.

  • Importing data from tab delimited file

    Hi everyone,
    This is my first question on here so I hope I am doing the right thing.
    I've searched online as much as I can to find an answer or a way to fix my problem but I have not been able to find a resolution.
    My issue is I'm trying to import name and contact information from a excel file, that I have saved as a tab delimited file, into a fillable PDF file. I'm able select the text file through the import option and it shows the correct information as different rows that I can import but when I select one and click on to finish the import of the data I get an error message advising that some of the text could not be imported. The issue is nothing is being imported at all.
    I've made sure that all the relevant fields are the same name as what the form has but still cannot get anything to import.
    Does anyone have any ideas why this may not be working? Also I basically have no ability to write JavaScript to import the information otherwise I would look at travelling down that path.
    Please let me know if I need to be any more specific.
    Regards,
    Adam

    Ok I can share the form itself and will need to quickly create some data itself to go along with it
    PDF Form Shared Files - Acrobat.com 
    Here is the tab delimited file I am trying to use (well the format anyway).
    Test Data File Shared Files - Acrobat.com
    Adam
    Thanks Pat Willener

Maybe you are looking for

  • On Performance of Dashboards

    Hi All, I have solved the performance of dashboards by creating the MV's on top of the query that is generated. That was very fast. But when I login with a specific user the performance of the report is different or a but slow. How can I increase the

  • Move Time Machine backup from hard drive to Time Capsule

    I have a new Time Capsule.  Can I move my existing Time Machine backup from a hard drive to the TC?  The tips given back in 2010 in this forum are no longer available.

  • I don't have a Mac or PC so how do I put music on my iPod from my iPad?

    I received an iPad Air for Christmas and just recently bought an iPod nano (the newest generation) under the impression that I can use my iPad to sync music onto my iPod. I am struggling to figure out how to do this. Everything I have read has said t

  • Itunes 10.3.1 no full screen in Lion

    Hi, i'm with a MBA previous model and i've installed Lion and itunes 10.3.1. I can't seem to be able to put itunes in full screen mode!!! The double-headed arrow on the top right corner of itunes does not exist, while if i go to view->Full Screen i't

  • Oracle 10G connection problem

    Oracle 10G connection problem I launch my db with the following script: su - oracle -c "export ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1 && /u01/app/oracle/product/10.1.0/db_1/bin/dbstart" su - oracle -c "export ORACLE_HOME=/u01/app/oracle/prod