Reg: Export data in excellent in 11g ADF application.

Hi all

We have developed an ADF 11 g application that retrieves the data from database in table form. Now, we have an obligation to export the data in an excel sheet.

Can someone help us please in this regard.

Thank you
Harsha

Hi Harsha,

You can use component to do so. Set the exportedId property to point to the table. You have options to export all the rows or only selected lines.







Good luck

Luc Bors

Tags: Java

Similar Questions

  • exporting data to Excel using XSSFWorkbook

    Hi everyone export data to Excel using XSSFWorkbook

    having error javax.el.ELException: means: lots of Java space now I need to change my code to BigGridDemo.java

    http://www.Docjar.org/HTML/API/org/Apache/POI/xssf/userModel/examples/BigGridDemo.Java.html

    http://Apache-POI.1045710.N5.Nabble.com/HSSF-and-XSSF-memory-usage-some-numbers-td4312784.html

    How can I change my code for BigGridDemo.java

    This is my code

    import com.bea.common.security.xacml.context.Result;

    import com.sun.jmx.snmp.Timestamp;

    to import java.io.FileNotFoundException;

    import java.io.IOException;

    import java.io.OutputStream;

    import java.util.HashMap;

    to import java.util.Iterator;

    import java.util.Map;

    Org.apache.poi.ss.usermodel import. *;

    Import javax.faces.context.FacesContext;

    Import org.apache.poi.hssf.usermodel.HSSFCell;

    Import org.apache.poi.hssf.usermodel.HSSFCellStyle;

    Import org.apache.poi.hssf.usermodel.HSSFDataFormat;

    Import org.apache.poi.hssf.usermodel.HSSFRow;

    Import org.apache.poi.hssf.usermodel.HSSFSheet;

    Import org.apache.poi.hssf.usermodel.HSSFWorkbook;

    Org.apache.poi import. *;

    Import org.apache.poi.hssf.util.HSSFColor;

    Import oracle.adf.model.BindingContainer;

    Import oracle.adf.model.BindingContext;

    Import oracle.adf.model.binding.DCBindingContainer;

    Import oracle.adf.model.binding.DCIteratorBinding;

    Import oracle.adf.view.rich.component.rich.data.RichTable;

    Import org.apache.poi.POIDocument;

    import org.apache.poi

    Import org.apache.poi.xssf.usermodel.XSSFWorkbook;

    Org.apache.poi.hssf.usermodel import. *;

    Import oracle.jbo.Row;

    Import oracle.jbo.RowSetIterator;

    Import oracle.jbo.ViewObject;

    Import org.apache.myfaces.trinidad.model.CollectionModel;

    Import org.apache.myfaces.trinidad.model.RowKeySet;

    Import org.apache.myfaces.trinidad.model.RowKeySetImpl;

    Import org.apache.poi.hssf.usermodel.HSSFRichTextString;

    Import org.apache.poi.ss.usermodel.Workbook;

    Import org.apache.poi.POIXMLDocumentPart;

    Import org.apache.poi.POIXMLDocument;

    Import org.apache.poi.hssf.usermodel.HSSFRow;

    Import org.apache.poi.hssf.usermodel.HSSFSheet;

    Import org.apache.poi.hssf.usermodel.HSSFWorkbook;

    public class PoiBean {}

    RicheTableau CustomTable;

    public PoiBean() {}

    }

    public static BindingContainer {} getBindingContainer()

    return (BindingContainer) JSFUtils.resolveExpression("#{bindings}");

    return (BindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    }

    public static DCBindingContainer getDCBindingContainer() {}

    return (DCBindingContainer) getBindingContainer ();

    }

    ' Public Sub generateExcel (FacesContext facesContext, OutputStream outputStream) throws IOException {}

    try {}

    Workbook = new XSSFWorkbook();  or new HSSFWorkbook();

    Spreadsheet sheet = workbook.createSheet("Fonts");

    Get all lines of an iterator

    /////////////////////////////////////////////////////////////////////////////////////////////////////

    Links DCBindingContainer = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    DCIteratorBinding dcIteratorBindings = bindings.findIteratorBinding("CustomClientView1Iterator");

    Line rowss = worksheet.createRow (0);

    ViewObject yourVO = dcIteratorBindings.getViewObject ();

    Get all the lines of a ViewObject

    RowSetIterator iter = yourVO.createRowSetIterator ("CustomClient");

    ITER. Reset();

    int rowCounter = 0;

    While (iter.hasNext ()) {}

    A cell = null;

    line oracle.jbo.Row = iter.next ();

    print header on the first line in excel

    If (rowCounter == 0) {}

    rowss = worksheet.createRow (rowCounter);

    int cellCounter = 0;

    {for (String colName: {row.getAttributeNames ())}

    cell = rowss.createCell (cellCounter);

    cellA1.setCellValue (colName);

    cellCounter ++;

    }

    }

    print the data from the second row in excel

    rowCounter ++;

    //////////////////////////////////////////////////////////////

    short j = 0;

    int cellCounter = 0;

    excelrow = (HSSFRow) worksheet.createRow ((int) i);

    rowss = worksheet.createRow (rowCounter);

    {for (String colName: {row.getAttributeNames ())}

    System.out.println ("Hello" + row.getAttribute (colName));

    System.out.println ("Hello" + name of column);

    cell = rowss.createCell (cellCounter);

    rowCounter ++;

    cell.setCellValue (new HSSFRichTextString (rs.getS));

    {if (! isBlank (colname))}

    If (colName.equalsIgnoreCase ("CcnCode")) {}

    cell.setCellValue (row.getAttribute (colName) m:System.NET.SocketAddress.ToString ());

    System.out.println ("column name" + colName + "row.getAttribute (colName) m:System.NET.SocketAddress.ToString ()" + row.getAttribute (colName) m:System.NET.SocketAddress.ToString ());

    }

    }

    logic for the cell formatting

    ElseIf (colName.equalsIgnoreCase ("CcnName")) {}

    cell.setCellValue (row.getAttribute (colName) m:System.NET.SocketAddress.ToString ());

    }

    make double if you want to convert as a result

    ElseIf (colName.equalsIgnoreCase ("CcnRegDate")) {}

    cell.setCellValue (row.getAttribute (colName) m:System.NET.SocketAddress.ToString ());

    }

    ElseIf (colName.equalsIgnoreCase ("CcnCancelDate")) {}

    {if (null! = Row.GetAttribute (colname))}

    cell.setCellValue (row.getAttribute (colName) m:System.NET.SocketAddress.ToString ());

    }

    } ElseIf (colName.equalsIgnoreCase ("CcnUndertaking")) {}

    {if (null! = Row.GetAttribute (colname))}

    cell.setCellValue (row.getAttribute (colName) m:System.NET.SocketAddress.ToString ());

    }

    }

    ElseIf (colName.equalsIgnoreCase ("CcnCode8")) {}

    {if (null! = Row.GetAttribute (colname))}

    cell.setCellValue (row.getAttribute (colName) m:System.NET.SocketAddress.ToString ());

    }                                                                                                            }

    on the other

    cell.setCellValue (row.getAttribute (colName) m:System.NET.SocketAddress.ToString ());

    cellCounter ++;

    }

    worksheet.createFreezePane (0, 1, 0, 1);

    }

    Workbook.Write (OutputStream);

    outputStream.flush ();

    }

    //}

    catch (Exception e) {}

    e.printStackTrace ();

    }

    }

    The demo "big grid" is obsolete and has been replaced by SXSSF, which is compatible with XSSF (seehttp://poi.apache.org/spreadsheet/how-to.html#sxssfthe new Halloween Document) API.

    Theoretically, all you need to do is replace "new XSSFWorkbook()" by "new org.apache.poi.xssf.streaming.SXSSFWorkbook ()" in your program.

    You better post any specific questions of POI on the forum of the user Apache POI (see mailing lists , Apache POI)

    Kind regards

    Alex

  • Export data to Excel does not work in the build (.exe)

    I'm new to LabView 2010, but made a small application which works as expected when run as a VI in the Labview environment. This is a simple data acquisition where the results are displayed in a waveform graph. I used the method "Export data to Excel" to present the request to transfer the results on the chart in an Excel file programmatically.

    However, when I build the application and run the exe, the application works very well outside the export to Excel. Excel does not start, and when I right click on the graph for "export data to Excel" manually, it doesn't work anymore. The data can be exported to the Clipboard and then pasted into Excel, which is doable, but not very elegant solution...

    Any thoughts?

    Hi CFNoergaard,

    This issue has been corrected in LabVIEW 2010 SP1.

    If you upgrade to this version, it should do the trick.

  • 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

  • Export data in Excel from pl/sql

    can someone please give me some code examples on how to export data from pl/sql to excel

    No, it's the problem. Oracle is unable to see the client directories (and it shouldn't). UTL_FILE works only in the directories of the server.

    Concerning
    Marcus

  • export data to excel (data split in leaves n)

    Hello

    Its possible to export data from forms (10g) and thus to divide all data in leaves of n. name of the leaves is from 1 to n. How to do this.
    TNX for all the good people who will try to solve this problem (and also read this post :))

    Sparkling Hi,

    You will find many solutions for export forms to Excel sheet data but splitting that data in leaves n be difficult, I think.

    Carole

  • Reg: Export data of the physical database system standby.

    Hi all

    We have a standard edition one 11 GR 1 material oracle environment, I need to export the data from the physical monitoring system.

    If anyone can suggest me, how to do it safely (up state).

    Kind regards

    Konda.

    Oracle Data Guard is available only as a feature of Oracle Database Enterprise Edition. It is not available with Oracle database Standard edition.

    Then you must export data only from primary or you use EXP instead of EXPDP on the standby database. Because EXPDP create a temporary table export process duration.

    Concerning

    Mr. Mahir Quluzade

  • How can I export data to excel

    Hi all

    I want to export the table rows in excel.so that the user can download. How can I do?

    There are two options.

    One is to use Apache poi and select which line you want to export.

    Another approach

    inside the exportCollectionListener use propertyListener as

    to = "#{pageFlowScope.hideSomeColumns} '"

    type = 'action' / >

    title = "Employee".

    filename = "EmployeeData.xls" / >

    to = "#{pageFlowScope.hideSomeColumns} '"

    type = 'action' / >

    and inside the columns, you can write an el in the visible property

    sortable = "false".

    headerText = "#{bindings." Employees1.hints.LastName.label}.

    ID = "c7".

    visible = "#{pageFlowScope.hideSomeColumns not true}" > "

    While a few columns will be exported.

    See here

    http://www.techartifact.com/blogs/2014/05/export-few-column-to-Excel-using-propertylistener-in-ADF.html

  • LR/carrier - how to export data to Excel columns synthesis?

    I am able to use the process token to select metadata that you wish to export.  I don't see a choice of export to something other than a file (summary.txt) .txt.  I expect another format which can be read by Excel or CSV.

    Copy the .txt file in an Excel spreadsheet results in a long string data selected in the first row.  How can I get the data columns (like file name, opening, shutter speed, etc) so that I can produce an Excel spreadsheet to search and sort the data?

    Or I go about it the wrong way?

    See my response to your other post: How do I export Lr/carrier for Excel format?

  • Exporting data to Excel discoverer - keep the format for numbers options

    Is it possible to keep the format options when you export an excel spreadsheet.

    I formatted numbers with 2 decimal places and using the 1000 separator, but in great numbers do not have the 1000 separator. For some reason any.

    Thank you

    Oddie

    Oddie-

    When we export out of our 10.1.2.3 Discoverer Plus the instance as a Microsoft Excel (.xls) workbook and open results with Excel 2007, we can see the format exactly as it is in the Scout report.

    When the user first opens the workbook, they see two worksheets - we the unformatted data, and contains macros formatting. At the top left, there is a warning from security - Macros have been disabled, with the Options button. By clicking on the Options button gives a choice to 'enable this content '. Once the user clicks the OK button, the Excel export will be formatted as the discoverer of report.

    -Tracy

  • Reg: 11g ADF application.

    Hi all

    We have developed an application in which we have a login page that uses a "connect" button (Gobutton).
    After giving the user name and password, is there a way to simply press the ENTER key click the gobutton to login to access the next page instead.

    Thank you
    Harsha

    Hello

    It is of course possible.
    If you have a goButton such as:

    Set the defaultCommand your form attribute to point to your button:

    Jack

  • Is it possible to export the data to excel without table?

    Is it possible to directly export data to excel from a view object?
    Currently I use af:tree to display data (this is a requirement). I have therefore no table in my page.
    I want to export lines of data corresponding to this tree to Excel.
    If I select export as tree id, then only the nodes are exported, in a single column. I would also like to other columns that are in its original Version.

    Someone help me please. I found ways to export of table, no VO.

    Thank you
    Jose

    Hello..
    I think that you can not directly from VO. In any case you can do it with rendered = false table, which will not show the table in page, but your condition is ok. (Drag and drop VOS as ADF Table to your page then he put false rendering)

    rendered = "false" >



    filename = "export_xls" title = "Export ADF faces" / >

    Hope it will be useful...

  • Do not export data from table to Excel

    Why the invoke node export data to Excel product empty Excel sheet with no data?

    If I manually highlight the table on the front panel control, and rerun the VI data get exported. How we highlights the data in the table automatically?

    I thought that at first too, but after testing (before that I posted ) I see the order does not matter.  Only the selection is copied to.  If nothing is selected the journal will be empty.

    Note: you can select cells programmatically using a property node (selection start and size of the selection).

    So it doesn't seem to be a bug...

  • Is it possible to export data from fields to fill in indesign?

    Just the basics:

    I'm on a mac, running CC

    We are PDF forms where users will type circulating information. Instead of copying and pasting data into indesign, we wanted to see if there was a way to export the data entered directly in indesign? I tried to export data in Excel, but we lack excel for mac 2011 and I wonder if there is a compatibility problem with exports (which must constantly be repaired). I also find that when the files are repaired, that the entire form is included.

    If I can't make a direct export to indesign is there a way I can only export the data to excel and create my own .csv to a data merge in indesign?

    Thank you

    Rich

    Yes, JavaScript is case-sensitive, so the name of a field must be used in the same way, it has been defined in the form. If you have a field named "Field 1", you can not access via "field 1" - these two names is different. ""

  • Universal export in the Excel process

    Hello

    I have to write a pl/sql procedure that exports data to Excel file in XML format. This procedure should be available for all large enough application pages, so I don't want to write from scratch for each report separately. I need more object-oriented way.

    You know a way to read the results of any region of APEX report and write it down / export to Excel using pl/sql process?

    I know how to write XML Excel files and I know I can find definitions of the region with the queries of the reports for the APEX_APPLICATION_PAGE_REGIONS, but I have no idea how deal, especially with the reports of pl/sql returns the query string. How to put these data in cursor, how to declare the cursor automatically type etc. Maybe I can use a function of APEX?

    Kind regards
    Przemek Staniszewski

    We have updated the package of the Dene to support regions with function of PL/SQL returning the query. It is available here:

    https://ISHARE.UCR.edu/xythoswfs/WebUI/_xy-1395824_1-t_0NXFlVF7

    One thing to note, in the procedure of source area you need to refer to element values using v ('P_ZZZ_NAME') instead of: PZZZ_NAME

Maybe you are looking for