How can I pull data from an attached excel/csv file?

I currently manage some price lists for the company I work for. They are graphical, and usually created in inDesign and then exported to pdf.
I'm looking for a way to attach our company's prices in an excel sheet, (or delimited file) and be able to pull a price into the pdf.
For example, attaching an excel file with 2 columns, SKU & Price. Then saying, if text field SKU= "APPLE" text field PRICE = "0.50". Only I don't want the user to have any inpurt options, I want to do this myself and then save a flat version to distribute in the company.
Any ideas on how this could be accomplished (if it even could be?) I've been searching for the past week.
Thank you in advance.
(I have Acrobat X Pro)

First, let me start off by saying thank you again for your help. I sincerely appreciate it.
I have placed the following code into the document-level section of the javascript editor:
var oFile = this.getDataObjectContents("Price.xls");
var strData = util.stringFromStream(oFile, "utf-8");
function ParseData( strData ){
var objCollection = {}
strData.replace(
new RegExp( "\\[(\\w+)=([^\\]]*)\\]", "gi" ),
function( $0, $1, $2 ){
objCollection[ $1 ] = $2;
return( objCollection );
// Custom Calculate script for price text field
(function () {
    // Get the value of the SKU field
    var sku = getField("SKU").valueAsString;
    // Look up the price
    var price = objCollection[sku];
    // Set the value of this field to the price if it's present,
    // otherwise blank this field
    event.value = price || "";
And I have created a field SKU, which I placed a valid SKU value into. I also created a blank field called event for the price to populate into, but I have a strong feeling that this was the wrong approach.
At any rate, I've recieved the following error in the javascript debugger:
ReferenceError: objCollection is not defined
89:Document-Level:ADBE::FileAttachmentsCompatibility
Any idea what I may be doing wrong?
Thanks again.

Similar Messages

  • How can i extract data from oracle table  to flat file or excel spread shee

    Hello,
    DB Version is 10.1.0.3.0
    How can i extract data from oracle table to flat file or excel spread sheet by using sub programs?
    Regards,
    D

    Here what I did
    SET NEWPAGE 0
    SET SPACE 0
    SET LINESIZE 80
    SET PAGESIZE 0
    SET ECHO OFF
    SET FEEDBACK OFF
    SET VERIFY OFF
    SET HEADING OFF
    SET MARKUP HTML OFF SPOOL OFF
    Sql> SPOOL bing
    select * from -------;
    SPOOL OFF;
    I do not see file.
    I also tried
    Sql> SPOOL /tmp/bing
    select * from -------;
    SPOOL OFF;
    But still not seeing the fie,

  • Urgent How can I pull data from Essbase into BW 3.5

    Hi All,
    Can anyone tell me the extraction mechanism to extract data from Essbase (Hyperion Sales cube) into BW 3.5. Is it possible to extract data using DB connect. As far as I know it cannot be used for BW 3.1C but what about 3.5. Any links or information is greatly appreciated.
    Thanks
    Padma

    Hi Padma,
    by chance I read this post, I hope the information on following web-blog would be helpful for you:
    /people/happy.tony/blog/2006/09/18/hyperion-essbase-data-extraction-transformation-and-loading
    Regards,
    Lilly

  • How to get a field from an attached excel/csv?

    I currently manage some price lists for the company I work for. They are graphical, and usually created in inDesign and then exported to pdf.
    I'm looking for a way to attach our company's prices in an excel sheet, (or delimited file) and be able to pull a price into the pdf.
    For example, attaching an excel file with 2 columns, SKU & Price. Then saying, if text field SKU= "APPLE" text field PRICE = "0.50". Only I don't want the user to have any inpurt options, I want to do this myself and then save a flat version to distribute in the company.
    I've been working on this for a few weeks. My javascript skills are really rough.
    So far, I have some code in my pdf that looks like this:
    (Price.csv is an attachment in the PDF)
    var oFile = this.getDataObjectContents("Price.csv");
    var sData = util.stringFromStream(oFile, "utf-8");
    function ParseData(sData){
    var oData = {};
    sData.replace(
    new RegExp( "\\[(\\w+)=([^\\]]*)\\]", "gi" ),
    function( $0, $1, $2 ){
    oData[ $1 ] = $2;
    return( oData );
    // Parse the data into an object
    var oData = ParseData(sData);
    // Custom Calculate script for price text field
    (function () {
        // Get the value of the SKU field
        var sku = getField("SKU").valueAsString;
        // Look up the price
        var price = oData[sku];
        // Set the value of this field to the price if it's present,
        // otherwise blank this field
        event.value = price || "";
        console.println(price);
    I have two text fields on the form. One that I have filled in a valid SKU, and a blank one named event.
    I seem to be getting an undefined error on prices. I am completely lost as to where to go from here.
    Does anyone have an idea of where I may be going wrong? I get that undefined error and nothing appears on my form.
    Thank you in advance.
    (I have acrobat X pro)

    First of all, "undefined" is not an error. It just says that the script ended without returning any values.
    I would suggest starting by debugging the code that reads the input file (you have to use a plain-text file, by the way, not an Excel spreadsheet). Make sure that oData actually contains the data you expect it to contain. If that works OK, start debugging your calculation script and see what's going on there...

  • How can I modify data from a Transparent Table without ABAP code.

    Hi,All
    How can I modify data from a Transparent Table (like TCURR),  and important thing is I want do all that with no ABAP code here. It is like that we always do that in a Oracle database use TOAD or PLSQL third party tools, with no script code here.
    I had fond that there is a way can do that:
    1, type 'se11',and Display Database table 'TCURR', click Contents, then click Execute to display all data
    2, type '/h' and let debugging on
    3, select one of this data then click 'Display',enter in debugging system.
    4, then make a breakpoint in the code. But... display a dialog let I type a 'ABAP Cmnds', I want to know what can be type in for that?
    and, My system is ECC6.
    thank you all
    Edited by: xuehui li on Aug 20, 2008 6:30 PM

    Hello,
    Your approach (with Vijay's suggestion) MAY work.  However, depending on how tight security is at the company that you are working at you may or may not be able to acutaly change the value of the SHOW field to EDIT.  This will be especially true if you are working in a Production environment.  Vijay's other comment is true as well.  This is not a recommended approach to change data (especially data with a financial impact like TCURR) in a production environment.  The auditors will not be impressed.
    Explore the option of a maintenace view or look at tcode TBDM to upload a file which includes daily rates from providers like Reuters or try tcode s_bce_68000174 which is a maintenance view on TCURR.
    Regards
    Greg Kern

  • How can you transfer data from one ipod to another ?

    How can you transfer data from one ipod to another ipod ?

    The geniusbar told me what to do, I understood but there is still a problem for me >:/ It's not showing up though. Like "device."  Nothing is happening, and I tried as soon as I got home. Then after half an hour, then an hour, then 3 hours. My problem is that it's not showing up! It's stuck in recovery mode! There's still like 25% battery. So I have no idea why.

  • How can I transport data from one client to another client?

    How can I transport data from one client to another client? 
    Regards,
    Subho

    hmmm, CTS = cutomizing transport?
    If you have a customizing table, there are still two possibilities.
    1. customize in DEV system and transport
    2. customize right there where you need it.
    this depends on how the maintainance view is built. If it is a simple customizing table and you get not asked for a TR when customizing a new record or changing an existing one, you hit possibility 2.

  • How can I get Data from the Sound cart in Labview? Does a VI exist?

    How can I get Data from the Sound cart in Labview? Does a VI exist?

    Yes, there are VIs for acquiring data from Sound cards. And examples too. If you don't have LabVIEW yet, do a search on NI's site for example VIs.
    Khalid

  • How can i store data from a pc to TC

    how can I backup data from a PC to TC

    Get a suitable backup software..
    Windows backup is of course useless. But you should already know that. It will not work on any version less than pro anyway.. due to MS deciding people with home versions should never use networks. ???
    That is why there is one million and one third party backup software that do work with network drives. Look up reviews of what works well. for the price you want to pay and get it.. Drive Image was a popular one. I must have a copy somewhere I bought .. then changed to Mac..
    There are plenty of free ones.. I do use macrium reflect.. does disk image only unless you pay the license.. but works super well.. particular for restore.. which people kind of forget.. the value of backup is how well does it restore.
    Use ethernet if possible.
    Note that mixing TM and data on the TC is not necessarily a great idea if you are also running Macs.

  • How can i get data from another database SQL Server use database link from

    I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • How can I migrate data from an old MBA to a new one without having access to the screen of the old one? The screen of the old MBA is damaged !

    How can I migrate data from an old MBA to a new one without having access to the screen of the old one? The screen of the old MBA is damaged !

    If your "older" MBA has a Thunderbolt port then it isn't that old. See Target Disk Mode about how it's used. Note that without a monitor you won't be able to tell from the screen when it has fully started, and if it succeeded in starting in TDM. If it did, then the hard drive should appear on the Desktop of your new computer. You can then access it to transfer your files. You can even use Migration Assistant or any backup utility to transfer data. Just don't try to transfer system files.

  • How can i get data from a maintance view?

    Hi all.
        Can you give me some suggestion about 'How can i get data from a maintance view?'?
         Thanks
         Best regard

    hi
    good
    go through this link
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ecdf446011d189700000e8322d00/content.htm
    thanks
    mrutyun^

  • How can we post data from CRM to SAP using ABAP proxies???

    Hi ,
      Can anyone hep me to create interface for the following scenario How can we post data from CRM to SAP using ABAP proxies???, can I find any document ???????
    Thanks in advance
    Andy

    Andy,
    Please look at these weblogs.
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    /people/ravikumar.allampallam/blog/2005/03/03/creating-purchase-order-idoc-through-xi
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    These should give a good idea about implementing Proxies.
    Regards,
    Ravi

  • How can I migrate data from SQL Server 6,5 to Oracle 8?

    We have a web site based on Microsoft SQL Server 6.5.Now we plan
    to migrate the database to Oracle 8.
    We have redesigned the tables structure and created tables under
    Oracle 8, so we only need to migrate data from SQL Server.
    We've exported data from SQL Server to text files.
    How can we import data from files and restore to Oracle tables.
    Is there a solution which let us to import data for particular
    table columns,not all columns?
    We'll be appreciated if somene can give suggestions.
    Regards
    Michael
    null

    Thank you for your reply.
    I'll try the Oracle sqlloader utility first.
    Regards
    Micahel
    Oracle Migration Workbench Team wrote:
    : Michael,
    : Oracle sqlloader is user for this sort of operation, see
    : Oracle8i Utilities
    : Release 8.1.5
    : A67792-01
    : available online through Oracle Technology Network.
    : The Oracle Migration Workbench can be used to create bcp and
    : sqlloader scripts, though since you have altered the schema
    these
    : scripts would need to be altered by hand after generation.
    : Some thought has been put into redesigning table structures in
    : the Oracle Migration Workbench, but currently it looks like
    this
    : reengineering will be left to be done by other tools, eg
    Oracle
    : Designer, once the SQLServer database has been duplicated with
    as
    : little change as possible onto Oracle.
    : Hope that helps,
    : Turloch
    : Oracle Migration Workbench Team
    : Michael (guest) wrote:
    : : We have a web site based on Microsoft SQL Server 6.5.Now we
    : plan
    : : to migrate the database to Oracle 8.
    : : We have redesigned the tables structure and created tables
    : under
    : : Oracle 8, so we only need to migrate data from SQL Server.
    : : We've exported data from SQL Server to text files.
    : : How can we import data from files and restore to Oracle
    tables.
    : : Is there a solution which let us to import data for
    particular
    : : table columns,not all columns?
    : : We'll be appreciated if somene can give suggestions.
    : : Regards
    : : Michael
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • How can i convert data from DBF to oracle database 10g?

    Sir,
    How can i convert data from DBF to oracle database 10g?

    I assume you at least know how to dump the contents of foxpro dbf file into CSV format.
    Regarding SQL*Loader, hope this demo makes it a bit clear to you...
    http://www.princeton.edu/~storacle/sqlloader_demo.shtml
    I agree that it is an old web page (references Oracle 8.0.5) but basics remain the same.
    If it is still unclear to you after referring above link, then get an Oracle consultant.

Maybe you are looking for

  • How to convert a PFX file into mobileconfig format?

    Hi, I'm trying to automate the task of creating a mobileconfig file with a client certificate in it. I understand that this is some kind of base64 encoding, but I don't get what they're encoding. My PFX files are protected with a password (Although I

  • Change output codepage of BACS files

    Hi All, I am smoothing out BACS processing methods and notice that part of the job here is to open the BACS files produced by SAP and resave the file as ANSII encoding from unicode (the files are saved to the App server as opposed to temse). this is

  • Not suggesting words as you type?

    All of a sudden when I am texting on my phone it is not suggestiig the words as I type.... Like the suggestion option is off or something. HELP ... it is taking me FOREVER to send a 2 sentence text !!!!

  • Uninstall java 6 Yosemite (Java for OS X 2014-001)

    In order to run certain Apps and an Uninstaller from an older app under OS X 10.10, I was requested to install Java 6 (legacy), which I did successfully (Java for OS X 2014-001). But now, that I do not need Java any more I would like to uninstall it.

  • Where is the error support link now??

    There used to be very good knowledge base when esupport was there... http://primussupport.hyperion.com/esupport/esupport/consumer/esupport.asp? But now no esupport.... there is somesort of knowledge base in the new oracle metalink but i cannot find a