Extracting data from Excel To Illustrator javascript or vbscript

Hi all-
I was wondering if there was a way to extract data from Excel to be used in Illustrator. I know there is an option of variables and xml, and I don't want that. I've seen and tried out how to read illustrator and write to excel, and I get that.  What I would like to do is pretty much the opposite:
1.Pre-fill in an Excel file(.xls,.csv, doesn't matter) with data such as a filename in column 1 and (Replacement Text) in column 2 and close manually.
2. Run script(VBSCRIPT,Javascript, doesn't matter)
3.For each column in Excel file where cell in first column is not empty, open Illustrator Template with placeholder of "DWG" textframe and replace the frame titled "DWG" with Replacement text from Excel in Column2.
4, Save each to a PDF file and name file with text from Excel Column1(Filename)
In a nutshell, there will be a single illustrator template with a premade textFrame with a name of "DWG". Excel will contain two columns, one for the filename to be named and one for the relative text to replace with the placeholder in AI. I hoped I explained this well enough without causing too much confusion. Thanks in advance.
Filename
Replacement Text
test1.pdf
DWG01
test2.pdf
DWG02
test3.pdf
DWG03
test4.pdf
DWG04

As text… \n is new line character and \r is return character. I can't remember which excel uses but they both equate to a line/paragraph… I very quickly threw together an example for you…
#target Illustrator
textToPDF();
function textToPDF() {
          if ( app.documents.length == 0 ) { return; }
          var doc, csvFile, i, fileArray, opts;
          csvFile = File( '~/Desktop/ScriptTest/Test.csv' );
          if ( !csvFile.exists ) { return; }
          fileArray = readInCSV( csvFile );
          doc = app.activeDocument;
          opts = new PDFSaveOptions();
          opts.pDFPreset = '[Press Quality]';
          // Here we loop the main array
          for ( i = 0; i < fileArray.length; i++ ) {
                    // Here we get the second item of sub array i
                    doc.textFrames.getByName( 'DWG' ).contents = fileArray[i].[1];
                    // Here we get the first item of sub array i
                    doc.saveAs( File( fileArray[i].[0] ), opts );
function readInCSV( fileObj ) {
          var fileArray, thisLine, csvArray;
          fileArray =[];
          fileObj.open( 'r' );
          while( !fileObj.eof ) {
                    thisLine = fileObj.readln();
                    csvArray = thisLine.split( ',' );
                    fileArray.push( csvArray );
          fileObj.close();
          return fileArray;
I haven't tested it but it should be close…?

Similar Messages

  • How to extract data from XML file with JavaScript

    HI All
    I am new to this group.
    Can anybody help me regarding XML.
    I want to know How to extract data from XML file with JavaScript.
    And also how to use API for XML
    regards
    Nagaraju

    This is a Java forum.
    JavaScript is something entirely different than Java, even though the names are similar.
    Try another website with forums about JavaScript.
    For example here: http://www.webdeveloper.com/forum/forumdisplay.php?s=&forumid=3

  • Can BAM extract data from Excel Sheet?

    Hi,
    Thanks for seeing my message.
    We have huge data in the form of Excel sheet with large number of regular updates every day.
    Can BAM read Excel sheet so I can make a dash board reflecting lot of KPI's to track?
    regards,

    BAM Excel View is a report type in BAM. It does not retrieve data. You might be able to use a BPEL file adapter to read the file and publish data to BAM.

  • Import data from Excel to list in Sharepoint Online site

    I need to upload data from excel to SharePoint list in SharePoint online site.
    I can extract data from excel but how can i connect to the SharePoint online site and upload the data programmatically from a console exe.
    Kindly advice.
    Anand B

    Hi Anand,
    You can export data from Excel or Access to a SharePoint list if you are using tables.
    http://office.microsoft.com/en-in/excel-help/export-an-excel-table-to-a-sharepoint-list-HA010131472.aspx#BMexporttable

  • How to Extract data from a Request management tool to Apex to avoid working on Excel reports

    Client uses a ticketing tool,I donot know what is the database for the tool,but I would like to know the best way to extract data from the tool to pex so that we can eliminate working on Excel reports.These excel reports are basically the open request log,resolved tickets,aging tickets etc,currently we work on many excel reports,can we achieve this in Apex ,if so how do we achieve this.Then we would like to use this report and prepare multiple charts,how the above two requirements can be mapped.

    A very important function for the system will be - one sends an email in certain format to a dummy email address, then some data will be extracted from the email based on the pre-defined format and inserted into the database my APEX application is using.
    Any idea on how I can make it happen please? I agree that this is not really an Apex question, but a more general PL/SQL question.
    There are many approaches, all boiling down to one of these two:
    1) Push: Some process in the mail server sends/forwards information to your database when new mail arrives.
    The language/tools used to do this, and the way it would connect to your database, depends on your environment (what is your operating system? mail server? existing middleware/tools? security protocols used? etc.).
    2) Pull: Some process in the database contacts the mail server and polls for new information.
    Ie. some PL/SQL code would communicate with the mail server. Again, it depends on your environment (what is your operating system? mail server? existing middleware/tools? security protocols used? etc.).
    For example, if you are using Exchange 2007 or newer, it has a web services API:
    http://msdn.microsoft.com/en-us/library/dd877045.aspx
    The challenge here will be to build the correct SOAP requests from PL/SQL, and to handle the security protocols used.
    - Morten
    http://ora-00001.blogspot.com

  • Use ODI to Extract Data from Hyperion Planning & Budgeting report to Excel

    Hello
    Can someone tell me please how to Extract Data from (Financial Reporting in) Hyperion Planning & Budgeting into Excel Using ODI?
    Would the steps be the same as Creating an ODI Project and Interface: Exporting a Flat File to a Flat File? If not, why?
    Best Regards.
    Edited by: Saturday on May 26, 2012 9:55 PM

    Where do you think the financial reports get their data from? Financial Reports pull data from data sources such as Essbase, HFM.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Problem in Excel after extracting data from SAP Report

    Hello,
    I have a problem with Excel file after extracting it from one of the SAP report.
    When my client extracted data from SAP in to excel he is coming across minus symbol on both sides of the number.
    for ex:        -447492177-
    When i extracted same SAP report in to excel i didnt face any such problem.
    Please share your inputs on what could be the problem.

    1. Make sure your client and you are using the same version of Microsoft Excel
    2. Let your client try to OPEN the exported xls file from a existed workbook instead of double-clicking the file directly.
    Atom

  • Extract program to extract data from SAP into multiple worksheets of excel

    Hi , I am currently facing an issue.
    Extracting the data during data extraction, conversion into an excel and also into multiple worksheets withing a excel file.
    What is the function which can help me. Also how do you give refernce to multiple worksheets to be created withing a excel file (which is the destination)
    Any sample program extracting data from SAP tables into a excel with multiple worksheet will be of immense help
    Please respond. Appreciate it.
    Rgds
    Madhu

    Hi Madhu,
    Here is the program for creating the excel file and creating the multiple worksheets.
    *& Report  ZEXCEL_UPLOAD2
    REPORT  ZEXCEL_UPLOAD2.
    INCLUDE ole2incl.
    DATA: application TYPE ole2_object,
           workbook TYPE ole2_object,
           sheet TYPE ole2_object,
           cells TYPE ole2_object.
    CONSTANTS: row_max TYPE i VALUE 256.
    DATA index TYPE i.
    DATA: BEGIN OF itab1 OCCURS 0, first_name(10), END OF itab1.
    DATA: BEGIN OF itab2 OCCURS 0, last_name(10), END OF itab2.
    DATA: BEGIN OF itab3 OCCURS 0, formula(50), END OF itab3.
    *START-OF-SELECTION
    START-OF-SELECTION.
      APPEND: 'Peter' TO itab1, 'Ivanov' TO itab2,
                                  '=Sheet1!A1 & " " & Sheet2!A1' TO itab3,
                'John' TO itab1, 'Smith' TO itab2,
                                  '=Sheet1!A2 & " " & Sheet2!A2' TO itab3.
      CREATE OBJECT application 'excel.application'.
      SET PROPERTY OF application 'visible' = 0.
      CALL METHOD OF application 'Workbooks' = workbook.
      CALL METHOD OF workbook 'Add'.
    Create first Excel Sheet
      CALL METHOD OF application 'Worksheets' = sheet
                                   EXPORTING #1 = 1.
      CALL METHOD OF sheet 'Activate'.
      SET PROPERTY OF sheet 'Name' = 'Sheet1'.
      LOOP AT itab1.
        index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
        CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
        SET PROPERTY OF cells 'Value' = itab1-first_name.
      ENDLOOP.
    Create second Excel sheet
      CALL METHOD OF application 'Worksheets' = sheet
                                   EXPORTING #1 = 2.
      SET PROPERTY OF sheet 'Name' = 'Sheet2'.
      CALL METHOD OF sheet 'Activate'.
      LOOP AT itab2.
        index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
        CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
        SET PROPERTY OF cells 'Value' = itab2-last_name.
      ENDLOOP.
    Create third Excel sheet
      CALL METHOD OF application 'Worksheets' = sheet
                                   EXPORTING #1 = 3.
      SET PROPERTY OF sheet 'Name' = 'Sheet3'.
      CALL METHOD OF sheet 'Activate'.
      LOOP AT itab3.
        index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
        CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
        SET PROPERTY OF cells 'Formula' = itab3-formula.
        SET PROPERTY OF cells 'Value' = itab3-formula.
      ENDLOOP.
    Save excel speadsheet to particular filename
      CALL METHOD OF sheet 'SaveAs'
                      EXPORTING #1 = 'c:\temp\exceldoc1.xls'     "filename
                                #2 = 1.                          "fileFormat
    Closes excel window, data is lost if not saved
    SET PROPERTY OF application 'visible' = 0.
    **Quick guide to some of the OLE statements for OLE processing in this program as well as a few other ones.
    Save Excel speadsheet to particular filename
    CALL METHOD OF sheet 'SaveAs'
                    EXPORTING #1 = 'C:\Users\dprasad\Desktop\excel_sheet.xls'     "filename
                              #2 = 1.                          "fileFormat
    Save Excel document
    CALL METHOD OF sheet 'SAVE'.
    Quits out of Excel document
    CALL METHOD OF sheet 'QUIT'.
    Closes visible Excel window, data is lost if not saved
    SET PROPERTY OF application 'visible' = 0.

  • Extracting data From PDF to Excel

    I have inherited a large library of PDF invoices which I need to extract data from into excell - or some other spreadsheet. The other option is to open up thousands of pdf documents and run the numbers by hand which is just dumb. I am new to acrobat and an entire afternoon of trial by fire / google hasn't gotten me very far - so even pointers in the right direction are appriciated.
    Ideally I would like to tell Acrobat what data is important on each document (can I use the form tool to do this?), extract the data from the relevant files (batch processing tool I presume?), compile the data and extract it to a CSV.
    It looks like the functionality is here I am just unsure how it all needs to fit together. Any Suggestions?

    Hi,
    There is software out there that will convert PDFs to excel... look for ABBYY or Able to extract... If you have a lot of files that are the same merge them together before using the software. Remember that if the data is created from a scanned image then the results will only be as good as the ability of the OCR engine contained in the software. You can play with the software to create tables, etc...

  • Extract data from Java to Excel

    Apologies for my ignorance in this field but is it possible to extract data from a Java based application (stock charts and the like) directly into Excel? If so could someone please contact me and explain the process in very simple terms as i have no idea how Java works :o)
    Many thanks.
    Gilsey

    Actually I should qualify my "Yes" answer. It is possible for a Java application to output data to Excel (using Jakarta POI for example). Whether it is possible to persuade an existing Java application to do that depends on the application. If it has been programmed to do it, then yes. Or if it has an underlying database where it stores its data, and you have access to that database, it might be possible to extract data from the database into Excel. Otherwise the programming of the application would have to be changed.

  • Extract data from Oracle in excel file

    Hi,
    I have a requirement where in I need to extract data from Oracle in excel file and the excel worksheet name should be "Data".
    for eg. excel file name "AR Data_DDMMYY" and excel worksheet name "Data"
    I have used the UTL_FILE API to extract the tab delimited data which can be opened in excel but it is not exactly an excel file as the worksheet name is same as the file name.
    I tried using utl_file.fcopy and frename.
    Is there any way to do this using PLSQL?
    select * from v$version;
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    "CORE     10.2.0.5.0     Production"
    TNS for HPUX: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - ProductionSample Code:
    declare
    cursor c is
    select * from scott.emp;
    v varchar2(100);
    f utl_file.file_type;
    file_name varchar2(100) := 'AR Data.xls';
    dir varchar2(50) := 'CESDIR191710';
    --select * from dba_directories
    begin
    f := utl_file.fopen(dir, file_name, 'W');
    v := 'EMPNO'||chr(9)||'ENAME'||chr(9)||'JOB'||chr(9)||'SAL'||chr(9)||'HIREDATE'||chr(9)||'DEPTNO';
    utl_file.put_line(f, v);
    for i in c
    loop
    v := i.empno||chr(9)||i.ename||chr(9)||i.job||chr(9)||i.sal||chr(9)||i.hiredate||chr(9)||i.deptno;
    utl_file.put_line(f, v);
    end loop;
    utl_file.fclose(f);
    --utl_file.frename(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls', false);
    utl_file.fcopy(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls');
    end;Thanks
    Imran

    Imran Soudagar wrote:
    Hi,
    I was able to generate the excel 2007 file with the data using the package from below link;
    http://technology.amis.nl/2011/02/19/create-an-excel-file-with-plsql/
    but the requirement is to generate excel 2003 file.
    I tried changing the .xlsx to .xls and it gives a note while opening the file "The file you are trying to open, abc.xls, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"Then you have three options:
    1) stop using anton's package and find another one that supports the old and deprecated version of Excel 2003
    2) write your own package to produce an Excel file.
    3) Upgrade your version of Excel to a recent version
    I tried the programs from other links on the forum but I am still getting this message. The client does not want this message to be displayed as the excel file works as an input to another system.
    Can anyone help me with the issue?
    Also, is it true that the programatically generated excel file is actually an xml file which is renamed to .xls and hence it shows the message while opening such files?Yes, Excel supports several different formats for it's files. By default, if you save an XLS files from Excel, it writes it out in a Microsoft proprietary binary format, which you would be hard pushed to replicate easily from PL/SQL. Excel also has the ability to save it's files as XML format, which is more readable and easier to produce programatically, whilst still allowing you to have multiple sheets, formulas and formatting included in it. That's the format that most people who need formatting and multiple sheets opt for when programatically generating their data as excel workbooks. (There's also an SLYK format that people used to use before that, but it's not as flexible)
    If you want to write your own, the easiest thing to do is to start with a blank workbook in Excel, and put in your basic requirements e.g. a couple of named sheets, and some data in different formats (number, date, text etc.) and different formatting options etc. Save that file in XML format from Excel and then open up the file using notepad/wordpad to look at the structure. There'll be a whole load of redundant rubbish Microsoft put in there, but you should be able to figure out the basic structure of XML required to give you what you want.

  • Extracting data from Microsoft Excel spreadsheet

    Hi,
    I am currently developing an application that requires to extract data from Microsoft Excel spreadsheet. Is that possible to archieve it?
    If it is possible,your precious guidience will be much appreciated.
    Thank you.

    There are several approaches.
    1) Export the data from the Excell in "CSV" format, which is simple enough to read as an ordinary text file.
    2) Use the open source POI package, which reads and writes XSL files (amongst other popular formats).
    3) Use the JDBC/ODBC bridge and the Windows ODBC driver which allows and Excell file to be treated as a database. (More details in above reference).
    4) Use another open source package to connect to Excell via the COM+ interface, and access data therein.
    Personally I favour the POI package.

  • 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,

  • Is it possibke to extract import data from excel file not csv type

    I am getting training from somebody, who is telling me the excel file has to be type csv only to extract and import the excel data for creating infoobjects, is that true.
    Please kindly provide steps, if any one has steps to extract the excel data while creating info object.
    I am going thru an excersise for creating info objects, but while brining the excel csv file data to info objects do i again need to create each field column and its attributes etc.
    Thank you all for the helpful info.

    Hi
    If you want to load data from excel to BW(Info Objects or data source), then file should be in excel format. to import the data system directly import it into excel sheet(normal one)
    to load the data you should have all values and attributes in your excel sheet which you have created in BW system.
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4096b8fc-6be7-2a10-618e-b02a5e5e798f
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0a556c6-f9e6-2a10-b58d-c68e42c26370
    check the above two, those are very useful
    Regards,
    Venkatesh

  • Upload data from Excel to BI

    Hi 2 all,
    Can anyone please send me the complete steps for uploading of data from excel to BI??
    Also tell me that when we use DSO or when we use infocube? and if we design query in query designer then we use info cube fields or DSO fields??
    Please respond.
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

    Hi,
    there is no separate Tcode for 3.5 environment... but in RSA1 itself they give 3.X functionality also.. So, if you want to follow the 3.5 procedure you can go thru that... in the Infosource tab--> select your info area -->and right clcik it.. ->in that create INFOSOURCE 3.X.. for that just right clcik ur CUBE or DSO and --> Additional functions --> Update Rules.. and like that you can follow the same procedure which you done in 3.5..
    and for data loading in BI 7.0 from fla file means
    fisrt create one Cube or DSO with the same structure which you have in flatfile..
    and activate it..
    ->now comes to Datasource tab> create one Datasource here you need to select type of data for example.. select Transactional data --> and menntion your flatfile name in extraction tab- and file type and eneter your info object names in FIELDS tab --> and load preview data Activate it..
    now select your datasource and create info package and schedule it.. now your data will loded in to PSA level...
    > and now comes to info provider select your cube.. and right clcik it.. and create transformations.,. and activate it..
    > and create DTP -- Activate it.. and Execute it..
    1)Create datasource. Here u can set/check the Soucre System fields.
    2)Create Transformation for that datasource. (no more update rules/transfer rules)
    2.1) While creating transformation for DS it will ask you for data target name, so just assign where u want to update ur data.
    DataSource -> Transformation -> (DTP)-->Data Target
    Now if you want to load data into data target from Source System Datasource:
    1) Create infopackage for that data source. If you are creating infopackage for new datasources, it will only allow you update upto PSA, all other options u can see as disabled.
    2)Now Create DTP (Data Transfer Process) for that data source.
    3) NOw schdule the Infopackage, once the data is loaded to PSA, you can execute your DTP which will load data to data target.
    Data Transfer Process (DTP) is now used to load data using the dataflow created by the Transformation. Here's how the DTP data load works:
    1) Load InfoPackage
    2) Data gets loaded into PSA (hence why PSA only is selected)
    3) DTP gets "executed"
    4) Data gets loaded from PSA into the data target once the DTP has executed
    1) Create a data source
    RSA1->Source Systems->FILE(File)->PC_FILE(Filesourcesystem)->Create Application Component(optional)-Create Data source
    2) Create the data provider
    3) Create Transformation
    Right click on the data provider, choose 'create transformation' and choose your data source (give relevant data source and its type)
    Just connect the relavant fields between your data source and data provider.
    4) Create DTP
    Then Double click on the DTP node created under yous transformations. choose the extraction mode
    5) Load the data: there are 2 ways:
    you can run the infopackage and DTP separately or create a process chain consisting of these infopackage and DTP and run.
    Also check /people/sankar.kumar/blog/2006/10/11/loading-text-filestxt-into-bw-with-hex-option for hex option
    Thanks,
    Sankar M

Maybe you are looking for