Importing a CSV file into a table for Fiori

Hello,
I create a fiori application with sap web ide  and i need to import a csv file from my desktop and show its content into a table in my fiori application
Please could some one help me
Ameni,
Subject was edited by: Michael Appleby

Hello Jamie
Thank you ,
i try this code , i putted in my detail.view.xml this code :<l:VerticalLayout> <u:FileUploader id="fileUploader" name="myFileUpload" uploadUrl="upload/" width="400px" tooltip="Upload your file to the local server" uploadComplete="handleUploadComplete"/> <Button text="Upload File" press="handleUploadPress"/> </l:VerticalLayout>
and i put in detail.controller.js the 2 functions : handleUploadComplete and handleUploadPress
And when i run and i press in the button to load the file but it doesn't work !
Best Regards,
Ameni,

Similar Messages

  • Import a CSV-file into a new table?

    hi, im trying to import a csv file into a new tabel, but i just cant make it work :-O. what are the steps to do that? im using sql developer version1.1.2.25.
    thanks for helping :-)

    We do not support CSV import at this stage, we only support XLS import.
    Regards
    Sue

  • How to import an .csv file into the database?

    and can we code the program in JSP to import the.csv file into the database.

    It is better to use Java class to read the CSV file and store the contents in the database.
    You can use JSP to upload the CSV file to the server if you want, but don't use it to perform database operations.
    JSPs are good for displaying information on the front-end, and for displaying HTML forms, there are other technologies more suitable for the middle layer, back end and the database layer.
    So break you application into
    1) Front end - JSPs to display input html forms and to display data retrieved from the database.
    2) Middle layer - Servlets and JavaBeans to interact with JSPs. The code that reads the CSV file to parse it's contents should be a Java Class in the middle layer. It makes use of Java File I/O
    3) Database layer - Connects to the database using JDBC (Java Database Connectivity), and then writes to the database with SQL insert statements.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Keeping the above concepts in mind, first build a simple JSP and get it to work,
    then research on Google , for Java File I/O , discover how to read a file,
    Then search on how to readh a CSV file using Java.
    After researching you should be able to read the CSV file line by line and store each line inside a Collection.
    Then research on Google, on how to write to the database using JDBC
    Write a simple program that inserts something to a dummy table in the database.
    Then, read the data stored in the Collection, and write insert statements for each records in the collection.

  • Loading data from .csv file into Oracle Table

    Hi,
    I have a requirement where I need to populate data from .csv file into oracle table.
    Is there any mechanism so that i can follow the same?
    Any help will be fruitful.
    Thanks and regards

    You can use Sql Loader or External tables for your requirement
    Missed Karthick's post ...alredy there :)
    Edited by: Rajneesh Kumar on Dec 4, 2008 10:54 AM

  • Getting Issue while uploading CSV file into internal table

    Hi,
    CSV file Data format as below
         a             b               c              d           e               f
    2.01E14     29-Sep-08     13:44:19     2.01E14     SELL     T+1
    actual values of column   A is 201000000000000
                     and  columen D is 201000000035690
    I am uploading above said CSV file into internal table using
    the below coding:
    TYPES: BEGIN OF TY_INTERN.
            INCLUDE STRUCTURE  KCDE_CELLS.
    TYPES: END OF TY_INTERN.
    CALL FUNCTION 'KCD_CSV_FILE_TO_INTERN_CONVERT'
        EXPORTING
          I_FILENAME      = P_FILE
          I_SEPARATOR     = ','
        TABLES
          E_INTERN        = T_INTERN
        EXCEPTIONS
          UPLOAD_CSV      = 1
          UPLOAD_FILETYPE = 2
          OTHERS          = 3.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    am getting all columns data into internal table,
    getting problem is columan A & D. am getting values into internal table for both; 2.01E+14. How to get actual values without modifying the csv file format.
    waiting for your reply...
    thanks & regards,
    abhi

    Hi Saurabh,
    Thanks for your reply.
    even i can't double click on those columns.
    b'se the program needs be executed in background there can lot of csv file in one folder. No manual interaction on those csv files.
    regards,
    abhi

  • Question about reading csv file into internal table

    Some one (thanks those nice guys!) in this forum have suggested me to use FM KCD_CSV_FILE_TO_INTERN_CONVERT to read csv file into internal table. However, it can be used to read a local file only.
    I would like to ask how can I read a CSV file into internal table from files in application server?
    I can't simply use SPLIT as there may be comma in the content. e.g.
    "abc","aaa,ab",10,"bbc"
    My expected output:
    abc
    aaa,ab
    10
    bbb
    Thanks again for your help.

    Hi Gundam,
    Try this code. I have made a custom parser to read the details in the record and split them accordingly. I have also tested them with your provided test cases and it work fine.
    OPEN DATASET dsn FOR input IN TEXT MODE ENCODING DEFAULT.
    DO.
    READ DATASET dsn INTO record.
      PERFORM parser USING record.
    ENDDO.
    *DATA str(32) VALUE '"abc",10,"aaa,ab","bbc"'.
    *DATA str(32) VALUE '"abc","aaa,ab",10,"bbc"'.
    *DATA str(32) VALUE '"a,bc","aaaab",10,"bbc"'.
    *DATA str(32) VALUE '"abc","aaa,ab",10,"b,bc"'.
    *DATA str(32) VALUE '"abc","aaaab",10,"bbc"'.
    FORM parser USING str.
    DATA field(12).
    DATA field1(12).
    DATA field2(12).
    DATA field3(12).
    DATA field4(12).
    DATA cnt TYPE i.
    DATA len TYPE i.
    DATA temp TYPE i.
    DATA start TYPE i.
    DATA quote TYPE i.
    DATA rec_cnt TYPE i.
    len = strlen( str ).
    cnt = 0.
    temp = 0.
    rec_cnt = 0.
    DO.
    *  Start at the beginning
      IF start EQ 0.
        "string just ENDED start new one.
        start = 1.
        quote = 0.
        CLEAR field.
      ENDIF.
      IF str+cnt(1) EQ '"'.  "Check for qoutes
        "CHECK IF quotes is already set
        IF quote = 1.
          "Already quotes set
          "Start new field
          start = 0.
          quote = 0.
          CONCATENATE field '"' INTO field.
          IF field IS NOT INITIAL.
            rec_cnt = rec_cnt + 1.
            CONDENSE field.
            IF rec_cnt EQ 1.
              field1 = field.
            ELSEIF rec_cnt EQ 2.
              field2 = field.
            ELSEIF rec_cnt EQ 3.
              field3 = field.
            ELSEIF rec_cnt EQ 4.
              field4 = field.
            ENDIF.
          ENDIF.
    *      WRITE field.
        ELSE.
          "This is the start of quotes
          quote = 1.
        ENDIF.
      ENDIF.
      IF str+cnt(1) EQ ','. "Check end of field
        IF quote EQ 0. "This is not inside quote end of field
          start = 0.
          quote = 0.
          CONDENSE field.
    *      WRITE field.
          IF field IS NOT INITIAL.
            rec_cnt = rec_cnt + 1.
            IF rec_cnt EQ 1.
              field1 = field.
            ELSEIF rec_cnt EQ 2.
              field2 = field.
            ELSEIF rec_cnt EQ 3.
              field3 = field.
            ELSEIF rec_cnt EQ 4.
              field4 = field.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
      CONCATENATE field str+cnt(1) INTO field.
      cnt = cnt + 1.
      IF cnt GE len.
        EXIT.
      ENDIF.
    ENDDO.
    WRITE: field1, field2, field3, field4.
    ENDFORM.
    Regards,
    Wenceslaus.

  • Importing a csv file into addressbook

    So I did a search & found this question has come up quite often, but with the person having a slightly different problem, so here goes.
    I am trying to import a csv file into address book, when I go import -> text tile it comes up like it should do and I pick the file, if I select ok at this point, it will quite happily import all of the data no trouble (but in the wrong categories). So I make the changes to what I want ie. Phone other --> Phone (work). Then when I click ok, the button goes from blue to white but nothing happens.
    When I open the csv file in textedit I can see all the values separated by commas.
    Any Ideas?

    I too just had this problem. To clarify all fields work and you can map them. I found that the Outlook CSV file had two problems which were tripping up the AddressBook import function. Note these were both in street address fields so I suspect the poster who said that addresses don't work may have been having that problem.
    The CSV load program does not work if you have commas "," in your data. In my case this was very common for some European addresses as well as some company names. And then the second problem was if there was a carriage return or new line character in a field. This later one was a problem with the address fields. I suspect an AddressBook export to CSV might have this same issue. Specifically, when there were multiple lines to the street address, they had been entered as multiple lines in street address one, as opposed to entering them in multiple fields such as "street 1", "street 2", etc.
    To solve the problem I opened the CSV file using Numbers and did a global find and replace on: commas, substituting the string --- and on the newline character "¶" (ALT+Rreturn) with *.
    Note to reduce some of the remapping I also changed all of the labels with "business" in the header row of the CSV file to "work". This made it a little easier for the AddressBook import function to map fields more correctly.
    After these set of changes rather than the alternating blue then white with nothing behavior it cleanly loaded all of my names. I could then search for "---" and "*" in addressbook's search field to identify all addresses which I had to clean up.
    I hope that is helpful to someone else. The import function really does work. However, it is not robust enough to deal with certain oddities in one's data.

  • Importing a CSV file into AD 2012r2

    Hi Guys
    Just wondering if anyone can help, I am a newbie on scripting and finding it really difficult to understand how to import a csv file into AD
    I have created the CSV file with the following headers, see below but I am unable to write a powershell script to import them into AD which work, I have tried multiple help guides but still cannot do it for the life of me.
    Any help on this would be really appreciated 
    objectClass user
    cn Jo bloggs
    givenName jo
    sn blogs
    mail [email protected]
    sAMAccountname j.blogs
    AccountPassword Pa$$w0rd
    ChangePasswordAtLogon true
    PasswordNeverExpires false
    ou OU=staff,DC=test,DC=com

    Import-Csv C:\User.csv| %{New-ADUser -SamAccountName $_.SamAccountName `
    -UserPrincipalName $_.userprinicpalname `
    -Name $_.name `
    -Mail = $_.mail `
    -DisplayName $_.name `
    -GivenName $_.GivenName `
    -Path "OU=Test Users,DC=XXX,DC=XXX" `
    -PasswordNeverExpires $false `
    -ChangePasswordAtLogon $true `
    -AccountPassword (ConvertTo-SecureString "test41;" -AsPlainText -force) `
    -Enabled $True -PasswordNeverExpires $True -PassThru ` }
    help New-ADUser -Examples
    You can try the below sample code
    Regards Chen V [MCTS SharePoint 2010]

  • Uploading CSV file into internal table

    Hi,
    I want to upload a CSV file into internal table.The flat file is having values as below:
    'AAAAA','2003-10-11 07:52:37','167','Argentina',NULL,NULL,NULL,NULL,NULL,'MX1',NULL,NULL,'AAAA BBBB',NULL,NULL,NULL,'1',NULL,NULL,'AR ',NULL,NULL,NULL,'ARGENT','M1V','MX1',NULL,NULL,'F','F','F','F','F',NULL,'1',NULL,'MX','MMI ',NULL
    'jklhg','2004-06-25 08:01:57','456','hjllajsdk','MANAGUA   ',NULL,NULL,'265-5139','266-5136 al 38','MX1',NULL,NULL,'hjgkid GRÖBER','sdfsdf dfs asdfsdf 380 ad ased,','200 as ads, sfd sfd abajao y 50 m al sdf',NULL,'1',NULL,NULL,'NI ',NULL,NULL,NULL,'sdfdfg','M1V','dds',NULL,NULL,
    Here I can not even split at ',' because some of the values are having value like NULL and some have values with comma too,
    The delimiter is a quote and the separator is a comma here.
    Can anyone help on this?
    Thanks.
    Edited by: Ginger on Jun 29, 2009 9:08 AM

    As long as there can be a comma in a text literal you are right that the spilt command doesn't help. However there is one possibility how to attack this under one assumption:
    - A comma outside a text delimiter is always considered a separator
    - A comma inside a text delimiter is always considered a comma as part of the text
    You have to read you file line by line and then travel along the line string character by character and setting a flag or counter for the text delimiters:
    e.g.
    "Text","Text1, Text2",NULL,NULL,"Text"
    String Index  1: EQ " => lv_delimiter = 'X'
    String Index  2: EQ T => text literal (because lv_delimiter = 'X')
    String Index  3: EQ e => text literal (because lv_delimiter = 'X')
    String Index  4: EQ x => text literal (because lv_delimiter = 'X')
    String Index  5: EQ t => text literal (because lv_delimiter = 'X')
    String Index  6: EQ " => lv_delimiter = ' ' (because it was 'X' before)
    String Index  7: EQ , => This is a separator because lv_delimiter = ' '
    String Index  8: EQ " => lv_delimiter = 'X' (because it was ' ' before)
    String Index  9: EQ T => text literal (because lv_delimiter = 'X')
    String Index 10: EQ e => text literal (because lv_delimiter = 'X')
    String Index 11: EQ x => text literal (because lv_delimiter = 'X')
    String Index 12: EQ t => text literal (because lv_delimiter = 'X')
    String Index 13: EQ 1 => text literal (because lv_delimiter = 'X')
    String Index 14: EQ , => text literal (because lv_delimiter = 'X')
    String Index 15: EQ T => text literal (because lv_delimiter = 'X')
    Whenever you hit a 'real' separator (lv_delimiter = ' ') you pass the value of the string before that up to the previous separator into the next structure field.
    This is not an easy way to do it, but if you might have commas in your text literal and NULL values I gues it is probably the only way to go.
    Hope that helps,
    Michael

  • Is there a way to import a .csv file into Numbers?

    Can I import a .csv file into Numbers?

    Yes, you can import csv (character-separated-values) into Numbers.
    If the csv file is comma-separated, then in Numbers you can try File > Open and navigate to the file and open it.
    If you don't get the results you want, then try this CSV to Tabs on Clipboard Automator Service (Dropbox download) instead.
    To install, double-click the .workflow package and, if necessary, click 'Open Anyway' in System Preferences > Security & Privacy.
    Thereafter to use:
    In Finder (not Numbers) navigate to the .csv file.
    Right-click on the file and choose 'CSV to Tabs on Clipboard' under Services in the contextual menu.
    Follow the prompts (trying different separators if needed).
    Click once in a Numbers cell.
    Command-v to paste.  The Numbers table will expand automatically as needed.
    These steps are quicker and easier than they sound. Just a few clicks and a keyboard entry.
    SG

  • Loading data from .csv file into existing table

    Hi,
    I have taken a look at several threads which talk about loading data from .csv file into existing /new table. Also checked out Vikas's application regarding the same. I am trying to explain my requirement with an example.
    I have a .csv file and I want the data to be loaded into an existing table. The timesheet table columns are -
    timesheet_entry_id,time_worked,timesheet_date,project_key .
    The csv columns are :
    project,utilization,project_key,timesheet_category,employee,timesheet_date , hours_worked etc.
    What I needed to know is that before the csv data is loaded into the timesheet table is there any way of validating the project key ( which is the primary key of the projects table) with the projects table . I need to perform similar validations with other columns like customer_id from customers table. Basically the loading should be done after validating if the data exists in the parent table. Has anyone done this kind of loading through the APEX utility-data load.Or is there another method of accomplishing the same.
    Does Vikas's application do what the utility does ( i am assuming that the code being from 2005 the utility was not incorporated in APEX at that time). Any helpful advise is greatly appreciated.
    Thanks,
    Anjali

    Hi Anjali,
    Take a look at these threads which might outline different ways to do it -
    File Browse, File Upload
    Loading CSV file using external table
    Loading a CSV file into a table
    you can create hidden items in the page to validate previous records before insert data.
    Hope this helps,
    M Tajuddin
    http://tajuddin.whitepagesbd.com

  • Import an excel file into a table

    Anybody can help me on importing a big text file (i.e. an excel file) into a table without using SQL Loader?
    Thnx in advance

    user5181307 wrote:
    There is another method where in you can edit the listener file to make an entry for separate service. then create a database link and tns entry to use the service to access the Excel.What you are referring to is called Heterogeneous Services and allows Oracle to treat something as an External database.
    For Excel files you would do it like this...
    1- Go to Control Panel>Administrative Tools>Data Sources (ODBC)>System DSN and create a data source with appropriate driver. Name it EXCL.
    2- In %ORACLE_HOME%\Network\Admin\Tnsnames.ora fie add entry:
    EXCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.0.24)(PORT = 1521))
    (CONNECT_DATA =
    (SID = EXCL)
    (HS = OK)
    Here SID is the name of data source that you have just created.
    3- In %ORACLE_HOME%\Network\Admin\Listener.ora file add:
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = <hs_sid>)
    (ORACLE_HOME = <oracle home>)
    under SID_LIST_LISTENER like:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = d:\ORA9DB)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = ORA9DB)
    (ORACLE_HOME = d:\ORA9DB)
    (SID_NAME = ORA9DB)
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = EXCL)
    (ORACLE_HOME = D:\ora9db)
    Dont forget to reload the listener
    c:\> lsnrctl reload
    4- In %ORACLE_HOME%\hs\admin create init<HS_SID>.ora. For our sid EXCL we create file initexcl.ora.
    In this file set following two parameters:
    HS_FDS_CONNECT_INFO = excl
    HS_FDS_TRACE_LEVEL = 0
    5- Now connect to Oracle database and create database link with following command:
    SQL> CREATE DATABASE LINK excl
    2 USING 'excl'
    3 /
    Database link created.
    Now you can perform query against this database like you would for any remote database.
    SQL> SELECT table_name FROM all_tables@excl;
    TABLE_NAME
    DEPT
    EMP... however, from the sounds of the original question the OP is referring to a flat file of data (like a CSV file) and not really an Excel file (.xls) which is a proprietary binary format that you won't be able to read with SQL*Loader or External Tables.
    The best method for the OP's requirements would appear to be external tables which were introduced with 9i.

  • Import a CSV file into specific cells

    Hello,
    I have created a simple Numbers template and I want to import a csv file with its values entering specific cells in an automated way.
    I think the best way to automate this process would be an AppleScript that does the following:
    Selects the csv file;
    Parses the values inserting them into the the Numbers template i.e. value1 to cell B2, value2 to cell B3 etc.
    Unfortunately I know very little about AppleScript, does anyone have any experience in this area that they could pass on?
    My idea would be to place the csv values in an array, and loop through the array entering the values in B2, B3 etc.
    Many thanks in advance!
    Dougie

    Here is a script doing the full job in a single call.
    --{code}
    --[SCRIPT csv-to-selected-cell]
    Enregistrer le script en tant que Script : csv-to-selected-cell.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Utilisateurs:<votreCompte>:Bibliothèque:Scripts:Applications :Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Sélectionner la première cellule du bloc où vous souhaitez insérer les valeurs extraites d'un fichier CSV.
    Aller au menu Scripts , choisir Numbers puis choisir “csv-to-selected-cell”
    Le script demande de naviquer jusqu’au fichier CSV.
    Il en lit le contenu,
    remplace les séparateurs (";" ou ",") par des TABs
    copie les données dans le presse-papiers
    colle dans la table.
    --=====
    L’aide du Finder explique:
    L’Utilitaire AppleScript permet d’activer le Menu des scripts :
    Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case “Afficher le menu des scripts dans la barre de menus”.
    Sous 10.6.x,
    aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
    puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
    --=====
    Save the script as a Script: csv-to-selected-cell.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Select the first cell of the block where values extracted from a CSV file must be inserted.
    Go to the Scripts Menu, choose Numbers, then choose “csv-to-selected-cell”
    The script urge you to navigate to the CSV file.
    It read its contents,
    replace the delimiters (";" or ",") by TAB  chars
    copy the datas in the clipboard
    paste in the table.
    --=====
    The Finder’s Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the “Show Script Menu in menu bar” checkbox.
    Under 10.6.x,
    go to the General panel of AppleScript Editor’s Preferences dialog box
    and check the “Show Script menu in menu bar” option.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2012/01/18
    --=====
    on run
              local dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2, lesValeurs
              my activateGUIscripting()
    Extract parameters describing the target cell *)
              set {dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
    Choose the source CSV file *)
      choose file of type {"csv"}
    Get the file’s contents *)
              set lesValeurs to read result
    Grab the delimiter in use *)
              if lesValeurs contains ";" then
              else
              end if
    Replace the delimiter in use by TAB *)
              my remplace(lesValeurs, result, tab)
    Move the 'normalized' datas to the clipboard *)
      set the clipboard to result
    Reset the target cell in case something changed *)
              tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
                        set selection range to range (name of cell colNum1 of row rowNum1)
              end tell
    Paste matching style *)
              my raccourci("Numbers", "v", "cas")
    end run
    --=====
    set { dName, sName, tName,  rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    on get_SelParams()
              local d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2
              tell application "Numbers" to tell document 1
                        set d_Name to its name
                        set s_Name to ""
                        repeat with i from 1 to the count of sheets
                                  tell sheet i to set maybe to the count of (tables whose selection range is not missing value)
                                  if maybe is not 0 then
                                            set s_Name to name of sheet i
                                            exit repeat
                                  end if -- maybe is not 0
                        end repeat
                        if s_Name is "" then
                                  if my parleAnglais() then
                                            error "No sheet has a selected table embedding at least one selected cell !"
                                  else
                                            error "Aucune feuille ne contient une table ayant au moins une cellule sélectionnée !"
                                  end if
                        end if
                        tell sheet s_Name to tell (first table where selection range is not missing value)
                                  tell selection range
                                            set {top_left, bottom_right} to {name of first cell, name of last cell}
                                  end tell
                                  set t_Name to its name
                                  tell cell top_left to set {row_Num1, col_Num1} to {address of its row, address of its column}
                                  if top_left is bottom_right then
                                            set {row_Num2, col_Num2} to {row_Num1, col_Num1}
                                  else
                                            tell cell bottom_right to set {row_Num2, col_Num2} to {address of its row, address of its column}
                                  end if
                        end tell -- sheet…
                        return {d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2}
              end tell -- Numbers
    end get_SelParams
    --=====
    on parleAnglais()
              local z
              try
                        tell application "Numbers" to set z to localized string "Cancel"
              on error
                        set z to "Cancel"
              end try
              return (z is not "Annuler")
    end parleAnglais
    --=====
    on decoupe(t, d)
              local oTIDs, l
              set oTIDs to AppleScript's text item delimiters
              set AppleScript's text item delimiters to d
              set l to text items of t
              set AppleScript's text item delimiters to oTIDs
              return l
    end decoupe
    --=====
    replaces every occurences of d1 by d2 in the text t
    on remplace(t, d1, d2)
              local oTIDs, l
              set oTIDs to AppleScript's text item delimiters
              set AppleScript's text item delimiters to d1
              set l to text items of t
              set AppleScript's text item delimiters to d2
              set t to "" & l
              set AppleScript's text item delimiters to oTIDs
              return t
    end remplace
    --=====
    on activateGUIscripting()
      (* to be sure than GUI scripting will be active *)
              tell application "System Events"
                        if not (UI elements enabled) then set (UI elements enabled) to true
              end tell
    end activateGUIscripting
    --=====
    ==== Uses GUIscripting ====
    This handler may be used to 'type' text, invisible characters if the third parameter is an empty string.
    It may be used to 'type' keyboard raccourcis if the third parameter describe the required modifier keys.
    I changed its name « shortcut » to « raccourci » to get rid of a name conflict in Smile.
    on raccourci(a, t, d)
              local k
      activate application a
              tell application "System Events" to tell application process a
                        set frontmost to true
                        try
                                  t * 1
                                  if d is "" then
      key code t
                                  else if d is "c" then
      key code t using {command down}
                                  else if d is "a" then
      key code t using {option down}
                                  else if d is "k" then
      key code t using {control down}
                                  else if d is "s" then
      key code t using {shift down}
                                  else if d is in {"ac", "ca"} then
      key code t using {command down, option down}
                                  else if d is in {"as", "sa"} then
      key code t using {shift down, option down}
                                  else if d is in {"sc", "cs"} then
      key code t using {command down, shift down}
                                  else if d is in {"kc", "ck"} then
      key code t using {command down, control down}
                                  else if d is in {"ks", "sk"} then
      key code t using {shift down, control down}
                                  else if (d contains "c") and (d contains "s") and d contains "k" then
      key code t using {command down, shift down, control down}
                                  else if (d contains "c") and (d contains "s") and d contains "a" then
      key code t using {command down, shift down, option down}
                                  end if
                        on error
                                  repeat with k in t
                                            if d is "" then
      keystroke (k as text)
                                            else if d is "c" then
      keystroke (k as text) using {command down}
                                            else if d is "a" then
      keystroke k using {option down}
                                            else if d is "k" then
      keystroke (k as text) using {control down}
                                            else if d is "s" then
      keystroke k using {shift down}
                                            else if d is in {"ac", "ca"} then
      keystroke (k as text) using {command down, option down}
                                            else if d is in {"as", "sa"} then
      keystroke (k as text) using {shift down, option down}
                                            else if d is in {"sc", "cs"} then
      keystroke (k as text) using {command down, shift down}
                                            else if d is in {"kc", "ck"} then
      keystroke (k as text) using {command down, control down}
                                            else if d is in {"ks", "sk"} then
      keystroke (k as text) using {shift down, control down}
                                            else if (d contains "c") and (d contains "s") and d contains "k" then
      keystroke (k as text) using {command down, shift down, control down}
                                            else if (d contains "c") and (d contains "s") and d contains "a" then
      keystroke (k as text) using {command down, shift down, option down}
                                            end if
                                  end repeat
                        end try
              end tell
    end raccourci
    --=====
    --[/SCRIPT]
    --{code}
    Yvan KOENIG (VALLAURIS, France) mercredi 18 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k
    My iDisk is : http://public.me.com/koenigyvan

  • Import a CSV file into contacts

    I am trying to import a CSV file; a comma seperated list of email addresses. When I try to import them into contacts, contacts attempts to combine the entire email list as seperate fields of a single contact. What am I doing wrong? I am trying to import just the list of email addresses so that each email address is a seperate contact. The list does not have names or addresses, just emails. Please help.

    Hey IAmWallace!
    I have an article here that can address this question for you and tell you how to import these email addresses:
    Address Book 6.x: Import contacts
    http://support.apple.com/kb/PH4648
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • Loading a CSV file into a table as in dataworkshop

    Data Workshop has a feature to load a CSV file and create a table based on it, similarly i want to create it in my application.
    i have gone through the forum http://forums.oracle.com/forums/thread.jspa?threadID=334988&start=60&tstart=0
    but could not download all the files(application , HTMLDB_TOOLS package and the PAGE_SENTRY function) couldnt find the PAGE_SENTRY function.
    AND when i open this link http://apex.oracle.com/pls/apex/f?p=27746
    I couldn't run the application. I provided a CSV file and when I click SUBMIT, I got the error:
    ORA-06550: line 1, column 7: PLS-00201: identifier 'HTMLDB_TOOLS.PARSE_FILE' must be declared
    tried it in apex.oracle.com host as given in the previous post.
    any help pls..,
    any other method to load data into tables.., (similar to dataworkshop)

    hi jari,
    I'm using the HTMDB_TOOLS to parse my csv files,It works well for creating a report, but if i want to create a new table and upload the data giving error *"missing right parenthesis"*
    I've been looking through the package body and i think there is some problem in the code,
            IF (p_table_name is not null)
            THEN
              BEGIN
                execute immediate 'drop table '||p_table_name;
              EXCEPTION
                WHEN OTHERS THEN NULL;
              END;
              l_ddl := 'create table '||p_table_name||' '||v(p_ddl_item);
              htmldb_util.set_session_state('P149_DEBUG',l_ddl);
              execute immediate l_ddl;
              l_ddl := 'insert into '||p_table_name||' '||
                       'select '||v(p_columns_item)||' '||
                       'from htmldb_collections '||
                       'where seq_id > 1 and collection_name='''||p_collection_name||'''';
              htmldb_util.set_session_state('P149_DEBUG',v('P149_DEBUG')||'/'||l_ddl);
              execute immediate l_ddl;
              RETURN;
        END IF;it is droping table but not creating new table.
    P149_DEBUG contains create table EMP_D (Emp ID number(10),Name varchar2(20),Type varchar2(20),Join Date varchar2(20),Location varchar2(20))and if i comment the
              BEGIN
                execute immediate 'drop table '||p_table_name;
              EXCEPTION
                WHEN OTHERS THEN NULL;
              END;
              l_ddl := 'create table '||p_table_name||' '||v(p_ddl_item);
              htmldb_util.set_session_state('P149_DEBUG',l_ddl);
              execute immediate l_ddl;then it is working well, i.e i enter the exsisting table name then i works fine, inserting the rows.
    but unable to create new table
    can you pls help to fix it.
    Regards,
    Little Foot

Maybe you are looking for