Select csv files

Hi all,
I need to create one addon when i run my add on i need to select total csv file in selected path and i need to import all files one by one .  i am not getting how select all csv file because we do n't know file name just we know path where all file exist..
plz help me.

check http://support.microsoft.com/kb/186118
3rd example is what you are looking for (its for subdirectories, you may change ti for files).

Similar Messages

  • How to import data from CSV file into a table by using oracle forms

    Hi,
    I have a CSV file and i want to insert in oracle database in a table by using a button in oracle forms.
    the user can select CSV file by using open dialog .
    can any one help me to find method to make import and select file from the client machine ?
    thx.

    1. create table blob
    CREATE TABLE IB_LOVE
      DOC          BLOB,
      CONTRACT_NO  VARCHAR2(20 BYTE)                NOT NULL
    )2. use the code below to insert:
           INSERT INTO ordmgmt.ib_love
                       (contract_no, doc
                VALUES (:control.contract_no_input, NULL
           lb$result :=
             webutil_file_transfer.client_to_db (:b2.file_name, v_file_blob_name, v_col_blob_name,
                                                 'CONTRACT_NO = ' || :control.contract_no_input);
           :SYSTEM.message_level := 25;
           COMMIT;
           :SYSTEM.message_level := 0;3. use the code below to download
         if :control.CONTRACT_NO_INPUT is not null then
              vboolean :=   webutil_file_transfer.DB_To_Client_With_Progress(
                               vfilename,  --filename                       
                              'IB_LOVE', ---table of Blob item                       
                              'DOC',  --Blob column name                       
                              'CONTRACT_NO = ' || :CONTROL.CONTRACT_NO_INPUT, ---where clause to retrieve the record                       
                              'Downloading from Database', --Progress Bar title                       
                              'Wait to Complete'); --Progress bar subtitle  client_host('cmd /c start '||vfilename);
              client_host('cmd /c start '||vfilename);                 
         else
              errmsg('Please choose contract no');
         end if;4. use the code below to open file dialog
    x:= WEBUTIL_FILE.FILE_OPEN_DIALOG ( 'c:\', '*.gif', '|*.gif|*.gif|', 'My Open Window' ) ;
    :b2.FILE_NAME:=X;

  • Is there a way to select a certain box of elements from a csv file and read that into LabVIEW?

    Hello all, I was wondering if there was a way to select only a certain "box" of elements from a .csv file in LabVIEW? I have LabVIEW 2011 and my main goal is to take two arrays and graph them against each other. I can import the .csv file just fine and separate each row and each column to be its own, but say I have an 8X8 but want to graph the middle 4X5 or something like that. Is there any way to extract an array without starting at the beginning and without ending at the end? Thank you in advance.
    Solved!
    Go to Solution.

    Hi Szklanam,
    as a CSV file is just a TXT file with a different suffix you can read a certain number of lines of that file. So you can limit the number of rows in your resultung array. To limit the number of columns you still have to use ArraySubset, so maybe it's a lot easier to read the full CSV file and pick the interesting spots with ArraySubset...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can I export multiple selections in a list box into a .csv file?

    Hi all, I've created a form in Acrobat X with a list box enabled for multiple selections. When I try to export the filled out form into a .csv file, only the first selection shows up. Can anyone help me figure out how to get all selections to export? Thanks!

    Thank you for your quick response!
    Once a recipient fills out the form (which has two questions with list boxes and multiple selection enabled) they send the completed form back to me. When I open the completed form, I am given the option add the completed form to a reponse file which was set up when I distributed the form. When I open the reponse file, it lists all of the responses in rows, and the values that were chosen in the form are arranged in columns. In this file, the list boxe columns have multiple values, separated by commas (which is what I'm looking for). At this point there is an option to export into a .csv file or an .xml file. If I choose the .csv file and open in excel, only the first selection shows in the list box column rather than all selections that were initially made by the responder.

  • How to generate a second csv file with different report columns selected?

    Hi. Everybody:
    How to generate a second csv file with different report columns selected?
    The first csv file is easy (report attributes -> report export -> enable CSV output Yes). However, our users demand 2 csv files with different report columns selected to meet their different needs.
    (The users don't want to have one csv file with all report columns included. They just want to get whatever they need directly, no extra columns)
    Thank you for any help!
    MZ

    Hello,
    I'm doing it usually. Typically example would be in the report only the column "FIRST_NAME" and "LAST_NAME" displayed whereas
    in the csv exported with the UTL_FILE the complete address (street, housenumber, additions, zip, town, state ... ) is written, these things are needed e.g. the form letters.
    You do not need another page, just an additional button named e.g. "export_to_csv" on your report page.
    The csv export itself is handled from a plsql procedure "stored procedure" ( I like to have business logic outside of apex) which is invoked by pressing the button "export_to_csv". Of course the stored procedure can handle also parameters
    An example code would be something like
    PROCEDURE srn_brief_mitglieder (
         p_start_mg_nr IN NUMBER,
         p_ende_mg_nr IN NUMBER
    AS
    export_file          UTL_FILE.FILE_TYPE;
    l_line               VARCHAR2(20000);
    l_lfd               NUMBER;
    l_dateiname          VARCHAR2(100);
    l_datum               VARCHAR2(20);
    l_hilfe               VARCHAR2(20);
    CURSOR c1 IS
    SELECT
    MG_NR
    ,TO_CHAR(MG_BEITRITT,'dd.mm.yyyy') AS MG_BEITRITT ,TO_CHAR(MG_AUFNAHME,'dd.mm.yyyy') AS MG_AUFNAHME
    ,MG_ANREDE ,MG_TITEL ,MG_NACHNAME ,MG_VORNAME
    ,MG_STRASSE ,MG_HNR ,MG_ZUSATZ ,MG_PLZ ,MG_ORT
    FROM MITGLIEDER
    WHERE MG_NR >= p_start_mg_nr
    AND MG_NR <= p_ende_mg_nr
    --WHERE ROWNUM < 10
    ORDER BY MG_NR;
    BEGIN
    SELECT TO_CHAR(SYSDATE, 'yyyy_mm_dd' ) INTO l_datum FROM DUAL;
    SELECT TO_CHAR(SYSDATE, 'hh24miss' ) INTO l_hilfe FROM DUAL;
    l_datum := l_datum||'_'||l_hilfe;
    --DBMS_OUTPUT.PUT_LINE ( l_datum);
    l_dateiname := 'SRNBRIEF_MITGLIEDER_'||l_datum||'.CSV';
    --DBMS_OUTPUT.PUT_LINE ( l_dateiname);
    export_file := UTL_FILE.FOPEN('EXPORTDIR', l_dateiname, 'W');
    l_line := '';
    --HEADER
    l_line := '"NR"|"BEITRITT"|"AUFNAHME"|"ANREDE"|"TITEL"|"NACHNAME"|"VORNAME"';
    l_line := l_line||'|"STRASSE"|"HNR"|"ZUSATZ"|"PLZ"|"ORT"';
         UTL_FILE.PUT_LINE(export_file, l_line);
    FOR rec IN c1
    LOOP
         l_line :=  '"'||rec.MG_NR||'"';     
         l_line := l_line||'|"'||rec.MG_BEITRITT||'"|"' ||rec.MG_AUFNAHME||'"';
         l_line := l_line||'|"'||rec.MG_ANREDE||'"|"'||rec.MG_TITEL||'"|"'||rec.MG_NACHNAME||'"|"'||rec.MG_VORNAME||'"';     
         l_line := l_line||'|"'||rec.MG_STRASSE||'"|"'||rec.MG_HNR||'"|"'||rec.MG_ZUSATZ||'"|"'||rec.MG_PLZ||'"|"'||rec.MG_ORT||'"';          
    --     DBMS_OUTPUT.PUT_LINE (l_line);
    -- in datei schreiben
         UTL_FILE.PUT_LINE(export_file, l_line);
    END LOOP;
    UTL_FILE.FCLOSE(export_file);
    END srn_brief_mitglieder;Edited by: wucis on Nov 6, 2011 9:09 AM

  • Output SELECT statement to CSV file

    Can someone advise the best approach please
    I'm trying to create a CSV file from the output of a SELECT statement in ApEx as a PL/SQL block. I initially thought the simplest approach would be to use SPOOL and then execute the SELECT startment but I think this is a SQLPlus command and can't be used in PL/SQL.
    I then tried using the 'UTL_FILE.PUT' command which works for a single record but I'm not sure how to implement this where the SELECT returns multiple records.
    DECLARE
    fHandler UTL_FILE.FILE_TYPE;
    v_DAT VARCHAR(20);
    v_Handle VARCHAR2(20);
    BEGIN
    SELECT DATA INTO v_DAT FROM HIP_TEST;
    v_Handle := CONCAT('HIP_',CONCAT(TO_CHAR(sysdate,'yyyymmddhhmi'),'.csv'));
    fHandler := UTL_FILE.FOPEN('/nfsacademy/amp/live', v_Handle, 'w');
    UTL_FILE.PUTF(fHandler, v_DAT);
    UTL_FILE.FCLOSE(fHandler);
    EXCEPTION
    WHEN utl_file.invalid_path THEN
    raise_application_error(-20000, 'Invalid path. Create directory or set UTL_FILE_DIR.');
    END;

    Hi,
    You can try this.
    DECLARE
    fHandler UTL_FILE.FILE_TYPE;
    v_DAT VARCHAR(20);
    v_Handle VARCHAR2(20);
    BEGIN
    v_Handle := CONCAT('HIP_',CONCAT(TO_CHAR(sysdate,'yyyymmddhhmi'),'.csv'));
    fHandler := UTL_FILE.FOPEN('/nfsacademy/amp/live', v_Handle, 'w');
    FOR I IN (SELECT DATA FROM HIP_TEST)
    LOOP
         UTL_FILE.PUTF(fHandler, i.data);
    END LOOP;
    UTL_FILE.FCLOSE(fHandler);
    EXCEPTION
    WHEN utl_file.invalid_path THEN
    raise_application_error(-20000, 'Invalid path. Create directory or set UTL_FILE_DIR.');
    END;** NOT TESTED **
    Alternatively you can also use DBMS_OUTPUT.PUT_LINE.
    Regards,
    Avinash
    Edited by: Avinash Tripathi on Nov 17, 2009 3:35 PM

  • Select Query Results to a .csv file????

    Hello All,
    I have a question in Oracle, if anyone knows how to do this. Please help me.
    How can I get the results of select query in Oracle loaded into a Excel file (.csv) file.
    Thanks in Advance,
    Sarada.

    Hi Sarada,
    as a csv is nothing more than a list of Comma Separated Values your best shot is to simply read do this with your values. read each value in an iteration add them to a string / stringbuffer and add a "," between them. When you read then next line in the ResultSet you just add a carriage return to the end. Depending on what format you want your csv list in.
    After you written all of this into a String you write this out to a file (unless you want to do it slower and write them line by line whenever you read them).
    Hope this helps,
    Kalle

  • How to read and select only a specific lines from a CSV file. Pls help

    I have a java application to read a CSV file. I've already managed to read them all and output it to System.out.println(). Now the problem is I want to select a specific row of the records. How do I do it? Below is the codes i've typed.
    FileReader fr = new FileReader(fileName);
    BufferedReader inFile = new BufferedReader(fr);
    StringBuffer buf = new StringBuffer();
    String line = null;
    while ((line = inFile.readLine()) != null) {
    buf.append(line);
    buf.append("\n");
    String inString = buf.toString();
    System.out.println(inString);
    This is the record that i want to read. For example, I want to select n print out line "80,2.90,3.00,3.10,3.20,......."
    [Factor1]
    Time [s],0.00,0.10,0.20,0.30,0.40,0.50,0.60,0.70,0.80,0.90,1.00,1.10,1.20,1.30,1.40,1.50,1.60,1.70,1.80,1.90,2.00,2.10,2.20,2.30,2.40,2.50,2.60,2.70,2.80,2.90,3.00,3.10,3.20,3.30,3.40,3.50,3.60,3.70,3.80,3.90,4.00,4.10,4.20,4.30,4.40,4.50,4.60,4.70,4.80,4.90,5.00,5.10,5.20,5.30,5.40,5.50,5.60,5.70,5.80,5.90,6.00,6.10,6.20,6.30,6.40,6.50,6.60,6.70,6.80,6.90,7.00,7.10,7.20,7.30
    Phi-0 [dB],-0.86,-0.80,-0.80,-0.99,-0.56,-0.53,-0.95

    If you know how many bytes each line is, you can use RandomAccessFile to skip directly to the byte position corresponding to your desired line. Otherwise, you'll have to read each line and just ignore the ones you don't want.

  • Can't import csv file to Address Book - "file you selected not valid" error

    I'm trying to import a CSV file of names and addresses to Address Book but it keeps telling me "The file you selected does not appear to be a valid comma separated values (csv) file nor a valid tab delimited file."
    Even using this simple test data saved in a txt file:
    John,Doe,London
    Jane,Doe,Dallas
    Anyone know a reason why the file could be not valid?
    Thanks, Mark

    Your file needs to have the .csv extension on the end, so that Address Book knows how to interpret it.

  • HT2486 The selected file does not appear to be a valid comma separated values (csv) file or a valid tab delimited file. Choose a different file.

    The selected file does not appear to be a valid comma separated values (csv) file or a valid tab delimited file. Choose a different file.

    I guess your question is, "what's wrong with the file?"
    You're going to have to figure that out yourself, as we cannot see the file.
    Importing into Address book requires either a tab-delimited or a comma-delimited file. You can export out of most spreadsheets into a csv file. However, you need to make sure you clean up the file first.  If you have a field that has commas in the field, they will create new fields at the comma. So, some lines will have more fields than the others, causing issues like the error you saw.

  • Selective deletion frm DSO based on selection in csv file on AL11 directory

    Hi Experts,
    I have a requirement where I have to automate the Flat File Upload coming from AL11 SAP directory followed by the selective deletion from DSO with the selection in the Flat file (.csv) on the directory.
    The csv file having fixed name and column. We have to take first selection i.e. Date (single entry) from second column and Comp Code from the 4th column (multiple entry).
    based on both the selection i have to perform selective deletion and then file upload.
    Could anybody please help me to write code and steps.
    Thanking you.
    Regards
    Ajay

    check this where i have written in start routine
    CALL METHOD P_R_REQUEST->get_TGT
           RECEIVING
              R_TGT = I_TGT.
    CONCATENATE '/BIC/A' I_TGT '00' INTO ACT_TABLE.
    CONCATENATE '8' I_TGT '_VA' INTO ACT_TABLE_RSTSODS.
    DATA: SOURCE_PACKAGE1 LIKE LINE OF SOURCE_PACKAGE.
    READ TABLE SOURCE_PACKAGE INTO SOURCE_PACKAGE1 INDEX 1.
    DELETE FROM (ACT_TABLE) WHERE /BIC/ZVERSION =
    SOURCE_PACKAGE1-PL_VERSION.
    SELECT SINGLE ODSNAME_TECH FROM RSTSODS INTO ZDSNAME_TECH WHERE ODSNAME
    = ACT_TABLE_RSTSODS.
    DELETE FROM (ZDSNAME_TECH) WHERE /BIC/ZVERSION =
    SOURCE_PACKAGE1-PL_VERSION.

  • Select statement reults to a CSV file, refuses to run

    Hi,
    have this query that outputs to a CSV file, or at least it should.
    Any help resolving this will be greatfully recieved
    Thanks
    set feedback off
    set pages 0
    set lines 120
    spool /gtxappl/Stock_Mirroring/Results/pyfs_Demandstock_supply.csv
    select upper('item_id,shipnode_key,jda_demand')
    from dual;
    select a.item_id || ',' || b.shipnode_key || ',' || sum (b.quantity)
    from yfs_inventory_item a, yfs_inventory_demand b
    where b.demand_type = 'JDA_RSRV.ex'
    and b.inventory_item_key = a.inventory_item_key;
    group by a.item_id, b.Shipnode_KEY
    spool off

    Hi,
    sorry about that. Its running now, was using an older version of the script, this is not the correct one.
    Any idea as to how i could write a shell script so that an application called TWS can execute the SQL and be passed back a success or failure code, 0= success >0= error for a sript very similar to the one mentioned before hand?
    Thanks

  • How to dynamically and selectively update DSO based on values in a csv file

    Hi,
    I'm loading a csv file into a DSO. When loading the flat file in FULL mode I need to do a pseudo delete of records that were previously loaded but are not in the new flat file.
    Is it possible to dynamically determine the unique set of records (say Pk1, Pk2, Pk3) in the csv file and then set all the corresponding DSO records' quantities to 0 - maybe in a start routine??  After that, I can load the csv file with the correct quantities (effectively update and inserts).  The net result should be that the change log only be updated through to the next DSO.
    Example: Load 10 records yesterday. Today reload 9 records. 10th records must have quantity set to 0. Other 9 records will have quantity values set to those in today's csv file -  some will be the same & some will be different. The net change log of all 10 records must be loaded into the next DSO.
    Any suggestions on how to do this logic?
    Thanks!

    Hi Gregg,
    You can create one transformation from the DataStore to itself.  In the "Technical" rules group, set 0RECORDMODE = 'X' (before image) or 'R' (reverse).  Therefore, when you execute its corresponding DTP, all existing records shouldl be set to zero.
    Then, as a second step, you can execute the DTP which is related to the transformation between the DataStore and the DataSource, thus loading the new records.
    I hope this helps you.
    Regards,
    Maximiliano

  • How to use auto fit selection when downloading to csv file

    hi,
    I am working on reports, i need to download to a .csv file. I am using GUI_DOWNLOAD is there any option for it where text fits exactly in a single cell.
    For Eg:
    I excel there is an option (Format-column-Autofitselection).
    Then the column size increases or decreased according to the text size.

    Dear Josephine,
       There is no option the way you want of autofit. Rather while opening the CSV in excel u can do the required formatting.
    Regards,
    Deva.

  • Select from ODS into .CSV file

    hi guru's !
    I need to build an abap program that reads a number of fields from an ODS (table) and stores this result in a .CSV file.
    I have never done this before so any documentation or examples would be greatly appreciated !
    thanks alread !

    hi,
    http://help.sap.com/saphelp_nw04/helpdata/en/c7/dc833b2ab3ae0ee10000000a11402f/frameset.htm
    Regards,
    Sourabh

Maybe you are looking for

  • Cannot change Radix Labview 2010

    Good Afternoon, I'm trying to change the radix of an integer constant to Hex display in LabView 2010, as discussed in this post: http://forums.ni.com/t5/LabVIEW/How-can-I-create-a-hexadecimal-constant-in-LabVIEW/td-p/1008715 However, in the right cli

  • Installation of the patch 127576-03 for solaris 10 8/07 for Netra T2000

    I am new in Solaris/Unix systems. I need to install a new patch for solaris 10 8/07, which is the 127576-03. I want to read the install information and I have seen in this website, where I downloaded the patch, that the install information is held in

  • New Tab Contains History Even after clearing history and Privacy setting is set to "Never remember history"

    I am using Firefox 14.0.1 I currently have "Never remember history" selected in the Privacy section underneath Tools->Options. I have even used the clear all current history option. When I click the plus sign to open a new tab a history of the sites

  • "The iPod could not be restored. An unknown error occurred (1436)."

    My 3rd gen. iPod Nano was down because I accidentally disconnected the iPod from the PC without using the "removing the hardware safely" function. So, I reset the Nano then replug the it to the PC. When I was trying to restore the Nano as the iTunes

  • Speakers not found

    HI i have a problem with my speakers i have a pavillon dv7 (laptop) with windows7 and the speakers just randomly stopped working for some programs: the youtube videos and skype does not have sound but when i use facebook sound is allright. this is ki