Need to download a CSV/Excel file to a table in the page of the OFA

I have a table of products can be changed on a page of the OFA. I provide this table with the button 'Download', clicking on, the user must be able to locate the file excel/csv(It contain some products) local office and be able to download it in the products table.

No idea how this can be done?

Do we need to use messageFileUpload > get DataObject > > convert StringBuffer > > > and divide it into lines > > > > insert each line through VO > > > > > refresh the VO?

Who is the process or do we not have any other process. If Yes can you please report it to a few examples of messageFileUpload?

Thank you
Sicard.

' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
{
super.processFormRequest (pageContext, webBean);
OAApplicationModule m = pageContext.getApplicationModule (webBean) (OAApplicationModule);
OAViewObjectImpl vo = am.findViewObject("XxCholaCsvDemoVO1") (OAViewObjectImpl);
If ("Go".equals (pageContext.getParameter (EVENT_PARAM)))
{
DataObject fileUploadData (DataObject) = pageContext.getNamedDataObject ("FileUploadItem");
String fileName = null;
String contentType = null;
Long fileSize = null;
Integer fileType = new Integer (6);
BlobDomain uploadedByteStream = null;
BufferedReader in = null;

Try
{
fileName = (String) fileUploadData.selectValue (null, "UPLOAD_FILE_NAME");
contentType = (String) fileUploadData.selectValue (null, "UPLOAD_FILE_MIME_TYPE");
uploadedByteStream = (BlobDomain) fileUploadData.selectValue (null, fileName);
in = new BufferedReader (new InputStreamReader (uploadedByteStream.getBinaryStream ()));

file = new Long size (uploadedByteStream.getLength ());
System.out.println ("FileSize" + FileSize);
}
catch (NullPointerException ex)
{
throw new OAException ("Please select a file to download", OAException.ERROR);
}

try {}

Open the CSV file for reading

String lineReader ="";

t length = 0;

String linetext [];

While (((lineReader = in.readLine ())! = null)) {}

Split delimited data and
If (lineReader.trim () .length () > 0)
{
System.out.println ("lineReader" + lineReader.length ());
LineText = lineReader.split(",");

t ++ ;

Print the current line current

System.out.println (t + "-" +)
LineText [0]. Trim() + "-" + linetext [1] .trim () + ' - ' +.
LineText [2]. Trim() + "-" + linetext [3] .trim () + ' - ' +.
LineText [4]. Trim() + "-" + linetext [5] .trim ());
If (! vo.isPreparedForExecution ()) {}
vo.setMaxFetchSize (0);
vo.executeQuery ();
}
Line = vo.createRow ();
row.setAttribute ("Column1", linetext [0] .trim ());
row.setAttribute ("Column2", linetext [1] .trim ());
row.setAttribute ("Column3", linetext [2] .trim ());
row.setAttribute ("Column4", linetext [3] .trim ());
VO. Last();
VO. Next();
vo.insertRow (row);

}

}

}

catch (IOException e)
{
throw new OAException (e.getMessage, OAException.ERROR);
}
}
ElseIf (Upload".equals (pageContext.getParameter (EVENT_PARAM))) {" "}
am.getTransaction () .commit ();
throw new OAException ("Uploaded SuccessFully", OAException.CONFIRMATION);

}
}
}

Tags: Oracle Applications

Similar Questions

  • I need to import a simple Excel file in InDesign, but it must be free of error, what are the system requirements of InDesign and Excel?

    I need to import a simple Excel file in InDesign, but it must be free of error, what are the system requirements of InDesign and Excel?

    but it must be free of errors

    Do you mean without errors in the text or formatting? When you place an Excel doc, the Place dialog box allows you to display Import Options. You can choose to place as a non formatted table and apply to any InDesign Table Style.

  • Is it possible to import Openscript OTM tests like a large CSV/excel file

    Hello

    Can you please tell me if it is possible to import Openscript OTM tests like a large CSV/excel file?

    Thank you
    Megha

    Hello Megha
    You want to import test OpenScript from a CSV file right cases?
    If you take a look at the menu in OTM: project-> import data-> select an xls or csv file, you can see that you can import only manual test cases.

    So the only option would be to try to create test cases automated using SQL directly in the scheme of the OTM.
    I've never done this (I did for requirements & manual test case).

    JB

  • I lost my media and I need to download Photoshop elements 9... I have the serial number

    I lost my media and I need to download Photoshop elements 9... I have the serial number

    PSE 7, 8, 9 - http://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-7-8-9-downloads.html

  • How to export data to excel that has 2 tables with the same number of columns and the column names?

    Hi everyone, yet once landed upward with a problem.

    After trying many things to myself, finally decided to post here...

    I created a form in form builder 6i in which clicking on a button, the data gets exported to the excel sheet.

    It works very well with a single table. The problem now is that I cannot do the same with 2 tables.

    Because the tables have the same number of columns and the columns names.

    Here are the 2 tables with column names:

    Table-1 (MONTHLY_PART_1) Table-2 (MONTHLY_PART_2)
    SL_NOSL_NO
    MODELMODEL
    END_DATEEND_DATE
    U-1U-1
    U-2U-2
    U-4U-4
    ..................
    ..................
    U-20U-20
    U-25U-25

    Given that the tables have the same column names, I get the following error :

    402 error at line 103, column 4

    required aliases in the SELECT list of the slider to avoid duplicate column names.

    So how to export data to excel that has 2 tables with the same number of columns and the column names?

    Should I paste the code? Should I publish this query in 'SQL and PL/SQL ' Forum?

    Help me with this please.

    Thank you.

    Wait a second... is this a kind of House of partitioning? Shouldn't it is a union of two tables instead a join?

    see you soon

  • When I use the mail merge with excel file, after I press ok the progress bar indicates "NaN", mail project window crashes. My record is nice little CVS n

    When I use the mail merge with excel file, after I press ok of the progress bar indicates "NaN", mail project window crashes. My file is in the correct format and small size (4-column 4 raws). I use an English version of thunderbird after accidentally, I installed one in my tongue.

    I am attaching the screenshot

    I solved the problem
    has been st@pid excel

    I created a CSV file in openoffice calculator and everything went smoothly

  • I need to download 3 SrvcPck for WinXP, on a CD, to the other PC,

    I have a windows XP PC, and it is in a setting of Novell (in a network to a server, but not to the other PC). It will be online, but not stay.   My remote says I need Service Pack 3.  Also, I need to download to a CD and then transfer it onto my PC.   Thank you!  Howard

    E-mail address is removed from the privacy *.

    Get the XP sp3 update here--> http://www.microsoft.com/en-us/download/details.aspx?id=24

    Read this--> http://msmvps.com/blogs/harrywaldron/archive/2008/05/08/windows-xp-sp3-read-all-prerequisites-for-a-successful-installation.aspx

    Restart twice after installing sp3.

    You should not have this step, but make the method 2 anyway--> http://support.microsoft.com/kb/943144

    Visit Windows Update and get 100 + post-sp3 critical updates

  • How can I download more than one file in a folder in the creative cloud?

    How can I download for example 10 files in a folder on my desk in a single step in a folder in my creative cloud?

    You can select multiple files in the Windows Explorer dialog box by using the CTRL key, or in the Finder of Mac OS X using the Cmd key. Once you have several files just click the button transfer. Or use drag-and - drop from the desktop to the browser.

    If you use Internet Explorer it does not support the download of multiple files. It is by design by Microsoft.

  • Copy/move an excel file from local pc to the application server

    This topic must be discussed and resolved.
    I searched this topic and found so many thread that I got confused.

    Please someone post here useful and good link so that it can be my use...

    my version of the form is 10g.

    Thank you in advance.

    Hello
    How would you copy the file to the client from the client CMD prompt?
    Use the CMD command even with CLIENT_HOST of Webutil in forms.

    See you soon,.

  • Need to download CS5.5 Production Premium (STE) [was: tired of the evasive download]

    I am running on a Windows Vista system, and I'm trying to access a link to download Adobe Creative Suite Production Premium (student teacher Edidtion) 5.5. I had previously downloaded to your computer then, but we had the hard drive crash and wipe since then.

    I am aware that there is another site with "impeccable" instructions on how to download the old versions of programs, but those that didn't work no matter how I tried them. Could someone please send me a link to a downloadable version of the software I paid for? Thank you.

    I am aware that there is another site with "impeccable" instructions on how to download the old versions of programs, but those that didn't work no matter how I tried them.

    If you are referring to the site prodesigntools.com, this is the URL only I know through which you can download older versions of Adobe software.

    http://prodesigntools.com/Adobe-CS5-5-direct-download-links.html

    Very important Instructions on this page are pretty easy to follow if you follow before you click on the download links.

    After that, the download links will work.

  • I bought 5 LR earlier and now I need to download on my macbook and I don't have the serial number? How can I get the serial number to use this program?

    @

    Hello

    Please see: -.

    http://helpx.Adobe.com/x-productkb/global/find-serial-number.html

  • the page was updated phone and when I FTP'd "modified files" it has never changed the page

    I wasn't ready to charge the phone part of Muse but already added a logo and contact info.  When I saw that it was on my phone, I'm back in Muse and added a block of text indicating that we are updating the mobile site.  When I FTP'd the "modified files" page never changed.  Any idea?  I checked my diapers and everything.  After that I added the block I returned in Muse and changed the wording.  After ftping the updated files the new he writes on it and there are now two layers of text on the other!  Ugh!  So I thought I would remove both.  Evil.  They are always there.  Any clue?

    Select "All Files" when you do the FTP download.

    Muse is based only on the information contained in the muse_manifest.xml file to determine which files have been changed since Muse last downloaded files. If you add, change, or remove files from your Muse site will be completely unaware of these changes and you will need to download with select "All Files" in order to get the Muse back in sync with what files (and file versions) are on your site.

    Muse takes this approach because check manually that all the files on FTP changes for each FTP download would be very slow.

  • need help on download of CSV files

    Hi all

    I need to download a csv file in the table through browse file button. To do this, I created the process and function below. This method works perfectly fine when the file size is small. But I need to download the file size of 16 MB and when I try to download this file it give error wwv_flow.accept. Any expert from the TOP please help me about this error. As I am very new to the APEX, and I need to achieve this as soon as possible. Please provide any solution, I will be really grateful to the person.

    function

    create or replace function hex_to_decimal
    -This function is based on one by Connor McDonald
    -http://www.jlcomp.demon.co.uk/faq/base_convert.html
    (P_hex_str in varchar2) return number
    is
    number of v_dec;
    v_hex varchar2 (16): = '0123456789ABCDEF ';
    Start
    v_dec: = 0;
    for indx in 1... Length (p_hex_str)
    loop
    v_dec: = v_dec * 16 + instr (v_hex, upper (substr(p_hex_str,indx,1)))-1;
    end loop;
    Return v_dec;
    end hex_to_decimal;


    Process of

    DECLARE
    v_blob_data BLOB;
    v_blob_len NUMBER;
    V_POSITION NUMBER;
    v_clob_data CLOB: = 'nothing. '
    dest_offset NUMBER: = 1;
    offset NUMBER: = 1;
    blob_csid NUMBER: = dbms_lob.default_csid;
    lang_ctx INTEGER: = dbms_lob.default_lang_ctx;
    caveat INTEGER;



    v_raw_chunk RAW (10000);
    v_char char (1);
    number of c_chunk_len: = 1;
    v_line VARCHAR2 (32767): = NULL;
    v_data_array wwv_flow_global.vc_arr2;
    number of v_rows;
    number of v_sr_no: = 1;


    BEGIN


    delete from scg_recievables2;


    -Read data from wwv_flow_files
    Select blob_content from v_blob_data
    of wwv_flow_files
    where last_updated = (select max (last_updated) in the wwv_flow_files where UPDATED_BY =: APP_USER)
    and id = (select max (id) in the wwv_flow_files where updated_by =: APP_USER);



    v_blob_len: = dbms_lob.getlength (v_blob_data);
    V_POSITION: = 1;


    -Read and convert binary to a char
    WHILE (v_position < = v_blob_len) LOOP
    DBMS_LOB.converttoclob (v_clob_data, v_blob_data, v_blob_len, dest_offset, offset, blob_csid, lang_ctx, warning);
    v_char: = dbms_lob.getlength (v_clob_data);


    v_line: = v_line | v_char;
    V_POSITION: = v_position + c_chunk_len;
    -When a whole line is retrieved < / span >
    IF v_char = Chr (10) THEN
    -Convert comma to: use of wwv_flow_utilities
    v_line: = REPLACE (v_line, ';', ' :');)
    -Converting each column separated by: in the data table
    v_data_array: = wwv_flow_utilities.string_to_table (v_line);
    If IsNumber (substr (v_data_array (9), 1, 1)) = 1 then
    v_data_array (9): = substr (v_data_array (9), 1, 11);
    on the other
    v_data_array (9): = January 1, 1900 ";
    end if;
    v_data_array (9): = NVL (v_data_array (9),'' 01-JAN-1900);
    -Insert data into the target table
    EXECUTE IMMEDIATE ' insert into scg_recievables2 (Account_receivable_number, the_account_number, bill_history_tran, service_number, item_type, the_amount_billed, the_remaining_amount, source_of_payment)


    values (: 1,: 2:3:4: 5: 6: 7: 8,:' 9)
    USING
    v_data_array (1),
    v_data_array (2),
    v_data_array (3),
    v_data_array (4),
    v_data_array (5),
    v_data_array (6),
    v_data_array (7),
    v_data_array (8);
    -Remove
    v_line: = NULL;
    v_sr_no: = v_sr_no + 1;
    END IF;


    END LOOP;
    END;

    You're probably delay with your web server. Check the server logs to see if there are errors...

    Thank you

    Tony Miller
    Webster, TX

    A lady came up to me on the street, pointed at my suede jacket and said: "do you not know that a cow was murdered for that jacket?
    ' I didn't know there are witnesses ', I replied: "now, I'll have to kill you too. '

  • Download the excel file in an oracle through plsql table

    Hello

    I need to import data from excel file in an oracle table.

    Can someone help me to do this?

    Thanks in advance...

    If you use a file with the extension XLS or XLSX then you will need to use heterogeneous services to establish a connection between the file and the oracle db. Following is a writing represent asktom on it

    https://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:4406709207206 #18830681837358

    If you use a file with CSV extension, then you can use the external table or SQL Loader to load the file.

  • Please help to download a CSV file on APEX by browsing file

    Hi all

    I need to download a csv file in the table through browse file button. To do this, I created the process and function below. This method works perfectly fine when the file size is small. But I need to download the file size of 16 MB and when I try to download this file it give error wwv_flow.accept. Any expert from the TOP please help me about this error. As I am very new to the APEX, and I need to achieve this as soon as possible. Please provide any solution, I will be really grateful to the person.


    _ Function

    create or replace function hex_to_decimal
    -This function is based on one by Connor McDonald
    -http://www.jlcomp.demon.co.uk/faq/base_convert.html
    (P_hex_str in varchar2) return number
    is
    number of v_dec;
    v_hex varchar2 (16): = '0123456789ABCDEF ';
    Start
    v_dec: = 0;
    for indx in 1... Length (p_hex_str)
    loop
    v_dec: = v_dec * 16 + instr (v_hex, upper (substr(p_hex_str,indx,1)))-1;
    end loop;
    Return v_dec;
    end hex_to_decimal;


    _ Process

    DECLARE
    v_blob_data BLOB;
    v_blob_len NUMBER;
    V_POSITION NUMBER;
    v_clob_data CLOB: = 'nothing. '
    dest_offset NUMBER: = 1;
    offset NUMBER: = 1;
    blob_csid NUMBER: = dbms_lob.default_csid;
    lang_ctx INTEGER: = dbms_lob.default_lang_ctx;
    caveat INTEGER;



    v_raw_chunk RAW (10000);
    v_char char (1);
    number of c_chunk_len: = 1;
    v_line VARCHAR2 (32767): = NULL;
    v_data_array wwv_flow_global.vc_arr2;
    number of v_rows;
    number of v_sr_no: = 1;

    BEGIN

    delete from scg_recievables2;

    -Read data from wwv_flow_files </span >
    Select blob_content from v_blob_data
    of wwv_flow_files
    where last_updated = (select max (last_updated) in the wwv_flow_files where UPDATED_BY =: APP_USER)
    and id = (select max (id) in the wwv_flow_files where updated_by =: APP_USER);


    v_blob_len: = dbms_lob.getlength (v_blob_data);
    V_POSITION: = 1;

    -Read and convert the binary for char </span >
    WHILE (v_position < = v_blob_len) LOOP
    DBMS_LOB.converttoclob (v_clob_data, v_blob_data, v_blob_len, dest_offset, offset, blob_csid, lang_ctx, warning);
    v_char: = dbms_lob.getlength (v_clob_data);

    v_line: = v_line | v_char;
    V_POSITION: = v_position + c_chunk_len;
    -When a whole line is retrieved < / span >
    IF v_char = Chr (10) THEN
    -Convert comma to: to use wwv_flow_utilities </span >
    v_line: = REPLACE (v_line, ';', ' :');)
    -Converting each column separated by: in the data table </span >
    v_data_array: = wwv_flow_utilities.string_to_table (v_line);
    If IsNumber (substr (v_data_array (9), 1, 1)) = 1 then
    v_data_array (9): = substr (v_data_array (9), 1, 11);
    on the other
    v_data_array (9): = January 1, 1900 ";
    end if;
    v_data_array (9): = NVL (v_data_array (9),'' 01-JAN-1900);
    -Insert data into the table target </span >
    EXECUTE IMMEDIATE ' insert into scg_recievables2 (Account_receivable_number, the_account_number, bill_history_tran, service_number, item_type, the_amount_billed, the_remaining_amount, source_of_payment)

    values (: 1,: 2:3:4: 5: 6: 7: 8,:' 9)
    USING
    v_data_array (1),
    v_data_array (2),
    v_data_array (3),
    v_data_array (4),
    v_data_array (5),
    v_data_array (6),
    v_data_array (7),
    v_data_array (8);
    -Remove
    v_line: = NULL;
    v_sr_no: = v_sr_no + 1;
    END IF;

    END LOOP;
    END;

    As mentioned, this disrupts the question, because a possible answer was published in the OTHER thread... Check your server logs, you probably delay... Preliminary discussions with a similar problem:

    Take a look at the httpd.conf file (or get your system administrator to look at it) and see what's on the value of TimeOut. You may need to increase in order to export large tables by APEX.

    http://www.apacheref.com/ref/http_core/timeout.html

    Thank you

    Tony Miller
    Webster, TX

    A lady came up to me on the street, pointed at my suede jacket and said: "do you not know that a cow was murdered for that jacket?
    ' I didn't know there are witnesses ', I replied: "now, I'll have to kill you too. '

Maybe you are looking for