Display column name in exported .xls

Hello,
I found the following code which works perfectly to export data from Forms in .xls.
procedure ExportToExcel is
APPLICATION OLE2.OBJ_TYPE;
WORKBOOKS OLE2.OBJ_TYPE;
WORKBOOK OLE2.OBJ_TYPE;
WORKSHEETS OLE2.OBJ_TYPE;
WORKSHEET OLE2.OBJ_TYPE;
ARGS OLE2.LIST_TYPE;
CELL OLE2.OBJ_TYPE;
J INTEGER;
K INTEGER;
file_name_cl VARCHAR2(32767);
user_cancel EXCEPTION;
BEGIN
file_name_cl := CLIENT_GET_FILE_NAME('C:\rep2excel', 'MyExport.xls', 'XLS Files (.xls)|*.xls|', NULL, SAVE_FILE, TRUE);
file_name_cl := SUBSTR(file_name_cl,1,LENGTH(file_name_cl));
IF file_name_cl IS NULL THEN
MESSAGE('INSIDE EXCEPTION STATEMENT');
RAISE user_cancel;
END IF;
--MESSAGE('STARTING TRIGGER');
APPLICATION := OLE2.CREATE_OBJ('Excel.Application');
OLE2.SET_PROPERTY(APPLICATION,'Visible',True);
WORKBOOKS := OLE2.GET_OBJ_PROPERTY(APPLICATION, 'WORKBOOKS');
WORKBOOK := OLE2.INVOKE_OBJ(WORKBOOKS, 'ADD');
WORKSHEETS := OLE2.GET_OBJ_PROPERTY(WORKBOOK, 'WORKSHEETS');
WORKSHEET := OLE2.INVOKE_OBJ(WORKSHEETS, 'ADD');
GO_BLOCK('ELEVI');
FIRST_RECORD;
J:=1;
K:=1;
WHILE :SYSTEM.LAST_RECORD = 'FALSE'
LOOP
FOR K IN 1..9 --form has 9 columns
LOOP
If not name_in(:system.cursor_item) is NULL Then
args:=OLE2.create_arglist;
OLE2.add_arg(args, j);
OLE2.add_arg(args, k);
cell:=OLE2.get_obj_property(worksheet, 'Cells', args);
OLE2.destroy_arglist(args);
OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
OLE2.release_obj(cell);
End If;
NEXT_ITEM;
END LOOP;
J:=J+1;
NEXT_RECORD;
END LOOP;
-- for the last record
for k in 1..9
loop
If not name_in(:system.cursor_item) is NULL Then
args:=OLE2.create_arglist;
OLE2.add_arg(args, j);
OLE2.add_arg(args, k);
cell:=OLE2.get_obj_property(worksheet, 'Cells', args);
OLE2.destroy_arglist(args);
OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
OLE2.release_obj(cell);
End If;
next_item;
end loop;
OLE2.Release_Obj(worksheet);
OLE2.Release_Obj(worksheets);
-- Save the Excel file created
args := OLE2.Create_Arglist;
OLE2.Add_Arg(args,'c:\temp\test.xls');
OLE2.Invoke(workbook, 'SaveAs', args);
OLE2.Destroy_Arglist(args);
-- release workbook
OLE2.Release_Obj(workbook);
OLE2.Release_Obj(workbooks);
OLE2.Release_Obj(application);
MESSAGE('RIGHT BEFORE END');
END;But the cells are filled with data starting from the 1st line. I wanna, in Excel, on the 1st line, with bold characters, the name of the columns. How can i do that? So the records should start from the 2nd line.
Any ideas?
Thanks!

hi
check this.
PROCEDURE pr_Forms_to_Excel(p_block_name IN VARCHAR2 DEFAULT NAME_IN('system.current_block')) IS
-- Declare the OLE objects
application OLE2.OBJ_TYPE;
workbooks OLE2.OBJ_TYPE;
workbook OLE2.OBJ_TYPE;
worksheets OLE2.OBJ_TYPE;
worksheet OLE2.OBJ_TYPE;
cell OLE2.OBJ_TYPE;
range OLE2.OBJ_TYPE;
range_col OLE2.OBJ_TYPE;
-- Declare handles to OLE argument lists
args OLE2.LIST_TYPE;
-- Declare form and block items
form_name VARCHAR2(100);
f_block VARCHAR2(100);
l_block VARCHAR2(100);
f_item VARCHAR2(100);
l_item VARCHAR2(100);
cur_block VARCHAR2(100) := NAME_IN('system.current_block');
cur_item VARCHAR2(100) := NAME_IN('system.current_item');
cur_record VARCHAR2(100) := NAME_IN('system.cursor_record');
item_name VARCHAR2(100);
baslik VARCHAR2(100);
row_n NUMBER;
col_n NUMBER;
filename VARCHAR2(100);
BEGIN
-- Start Excel
application:=OLE2.CREATE_OBJ('Excel.Application');
OLE2.SET_PROPERTY(application, 'Visible', 'True');
-- Return object handle to the Workbooks collection
workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
-- Add a new Workbook object to the Workbooks collection
workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
-- Return object handle to the Worksheets collection for the Workbook
worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
-- Get the first Worksheet in the Worksheets collection
-- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 1);
worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
OLE2.DESTROY_ARGLIST(args);
-- Return object handle to cell A1 on the new Worksheet
go_block(p_block_name);
baslik := get_block_property(p_block_name,FIRST_ITEM);
f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM);
l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
first_record;
LOOP
item_name := f_item;
row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
col_n := 1;
LOOP
IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND
get_item_property(item_name,VISIBLE)='TRUE'
THEN
-- Set first row with the item names
IF row_n=1 THEN
baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(cell, 'Value', baslik);
OLE2.RELEASE_OBJ(cell);
END IF;
-- Set other rows with the item values
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n+1);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
END IF;
OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
OLE2.RELEASE_OBJ(cell);
END IF;
IF item_name = l_item THEN
exit;
END IF;
baslik := get_item_property(item_name,NEXTITEM);
item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
col_n := col_n + 1;
END LOOP;
EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
NEXT_RECORD;
END LOOP;
-- Autofit columns
range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
OLE2.INVOKE( range_col,'AutoFit' );
OLE2.RELEASE_OBJ( range );
OLE2.RELEASE_OBJ( range_col );
-- Get filename and path
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args, p_block_name );
OLE2.ADD_ARG( args,'Excel Workbooks (*.xls, *.xls');
filename := OLE2.INVOKE_CHAR( application,'GetSaveAsFilename',args );
OLE2.DESTROY_ARGLIST( args );
-- Save as worksheet
IF NVL(filename,'0')<>'0' THEN
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args,filename );
OLE2.INVOKE( worksheet,'SaveAs',args );
OLE2.DESTROY_ARGLIST( args );
END IF;
-- Close workbook
--OLE2.INVOKE( workbook ,'Close');
-- Release the OLE objects
OLE2.RELEASE_OBJ(worksheet);
OLE2.RELEASE_OBJ(worksheets);
OLE2.RELEASE_OBJ(workbook);
OLE2.RELEASE_OBJ(workbooks);
--OLE2.INVOKE(application, 'Quit');
OLE2.RELEASE_OBJ(application);
-- Focus to the original location
go_block(cur_block);
go_record(cur_record);
go_item(cur_block||'.'||cur_item);
END;check out the following link there is one flash clip i hope it will help u too.
http://www.oracle.com/technology/products/reports/htdocs/getstart/demonstrations/excel/viewlet.html
sarah

Similar Messages

  • Need to display column names in a dynamic page

    Hi
    I am displaying some rows returned from an sql querry in a dynamic page ...I hv written the sql querry between <ORACLE> AND </ORACLE> TAGS...The problem is ,i am not able to display the column names ...Why ? pl help....
    ram

    You must to use the htp package. Example:
    <ORACLE>
    begin
    htp.tableopen('1','CENTER',null,null,'BORDER="1"');
    htp.tableheader('NParte','CENTER');
    htp.tableheader('Descripcisn','CENTER');
    htp.tableheader('Precio/Unit','CENTER');
    htp.tableheader('Servicio','CENTER');
    htp.tableheader('IVA','CENTER');
    htp.tableheader('Total','CENTER');
    for cursor_cotiza in (select
    r.Nparte as Nparte, r.Descripcion as Descripcion,
    r.preciounit as preciounit,
    NVL(f.servicio,0) as servicio,
    round((0.145)*r.preciounit,3) as IVA,
    round((0.145)*r.preciounit,3) + r.preciounit +
    NVL(f.servicio,0) as PrecioTotal
    from
    carryin.repuestos r,
    carryin.casos c, carryin.facturacion f
    where r.NCaso =:NCaso
    and r.Ncaso=c.NCaso
    and c.Ncaso=f.Ncaso(+)
    and f.servicio(+)<>0
    union
    select
    r.Nparte as Nparte, r.Descripcion as Descripcion,
    r.preciounit as preciounit,
    NVL(f.servicio,0) as servicio,
    round((0.145)*r.preciounit,3) as IVA,
    round((0.145)*r.preciounit,3) + r.preciounit +
    NVL(f.servicio,0) as PrecioTotal
    from
    carryin.casosneq r,
    carryin.facturacion f
    where r.NCaso =:NCaso
    and r.Ncaso=f.Ncaso(+)
    and f.servicio(+)<>0
    ) loop
    htp.tableRowOpen('CENTER','CENTER');
    htp.tableData(cursor_cotiza.Nparte,'CENTER');
    htp.tableData(cursor_cotiza.Descripcion,'CENTER');
    htp.tableData(cursor_cotiza.preciounit,'CENTER');
    htp.tableData(cursor_cotiza.servicio,'CENTER');
    htp.tableData(cursor_cotiza.IVA,'CENTER');
    htp.tableData(cursor_cotiza.PrecioTotal,'CENTER');
    htp.tableRowClose;
    end loop;
    htp.tableclose;
    end;
    </ORACLE>
    This example show a table with header and borders. You must to see this package for more information.

  • ALV Report - displaying column name in two fields.

    Dear All,
                 I am working on ALV report , report is ready but now i have to format it according to client requirment, in which have to show column name in two row like.
    supppose there is field by name
    "Date of receipt of processed Goods"
    can i display it like
    "Date of receipt of
    processed Goods "
    Assured points for suitable answer.
    Looking foward to your response.
    Best Regards,
    Gulrez Alam

    Hi Ellery,
    As Philipp said, there is no need for populating the field using PL/SQL. You would just need to go to the Paper Layout in the Reports Editor, click on "Text" in the Drawing toolbar, drag it to the appropriate place in your layout to create the field, and write what you want in that field. Below that, you can create the field(s) which will display the actual totals. I'm assuming that creating the totals field is not a problem.
    Navneet.

  • ADF swing: JTabbedPane does not display column names.

    Hi all,
    I have created an ADF Panel, which allows the user to run a few simple queries against an Oracle database done using ADF view objects and ADF view links and ADF application module.
    From the data control area I drag and drop a view link containing a query into a JTabbedPane. But when I run the ADF panel, JTabbedPane does not display the column headers from the SQL as opposed to JScrollPane which does.
    Suppose you do a select * from departments(dep_id, manager, state_cd), you will see all column headers meaning dep_id, manager, state_cd, and under each column the corresponding data which was retuned by the SQL if you use JScrollPane. But if you use you use JTabbedPane then you would only see the data which was retuned by the SQL without seeing the column header names meaning dep_id, manager, state_cd.
    What do I need to do to make JTabbedPane display columns headers?
    I would appreciate your input.
    Thanks.
    Bobby A.

    Hi,
    JScrollPane should be used. You can add this into a JTabbedPane if you like. Not all Swing panel show table headers
    Frank

  • Display column name in sql*plus

    Hi,
    How to display full column name?
    there are n no of tables, i have to query the tables but i want the column name to be displayed fully. for example
    SQL> desc control
    Name Null? Type
    CODE NOT NULL VARCHAR2(255)
    LOAD_PERIOD_START_DATETIME DATE
    SQL> select code,load_period_start_datetime from control;
    CODE
    LOAD_PERIOD
    AAA
    01-AUG-2007
    SQL> col load_period_start_datetime format a30
    SQL> /
    CODE
    LOAD_PERIOD_START_DATETIME
    AAA
    01-AUG-2007
    SQL>
    As it is only one column i can set with 'col <column_name> format a 30'
    if there are n no of coumns from n no tables then how do i get the full column name?
    Please help me.
    Thanks

    Hi,
    you can get all the column's for a TABLE from all_tab_columns this VIEW, why dont you write as script which will generate the commands.
    Could you please tell us why do you want to display the compete COLUMN NAME in SQL plus.
    Thanks

  • How to display Column Names of a Database Table in JSP

    Dear All,
    I want to display all the attribute names(column names) of a database table on JSP.
    [ ex:  mytable contains : ( EmpId,EmpName,Dept ). This should be display as  EmpId--text box                    
    EmpName--text box
    Dept----textbox
    please note , i don't want to display values,but only column names

    Yeah make use of methods like
    ResultSet DatabaseMetaData.getColumns(String catalog, String schemaPattern, String tableName, String columnNamePattern)
    else use
    String ResultMetaData.getColumnName(int column_index)
    search google i'm sure u wud get thousands of example on it... :)

  • Invalid Column name during export

    When a FULL or USER level export is taken after the export is completed the following error appears.
    ORA-00904 Invalid Column name
    When I take table level export it complets successfully.
    I had run catalog.sql, catproc.sql and catexp.sql.
    Mohan
    null

    Hi,
    I normaly get this error when using an export utility that has different version from the DB, normally when using an export utility of a version above the DB version.
    I hope this will be useful for You.
    Bye Max
    null

  • JTable can't display column names and scroll bar in JDialog !!

    Dear All ,
    My flow of program is JFrame call JDialog.
    dialogCopy = new dialogCopyBay(frame, "Bay Name Define", true, Integer.parseInt(txtSourceBay.getText()) ,proVsl ,300 ,300);
    dialogCopy.setBounds(0, 0, 300, 300);
    dialogCopy.setVisible(true);        Then,I set the datasource of JTable is from a TableModel.
    It's wild that JTable can diplay the data without column names and scroll bar.
    I have no idea what's going wrong.Cause I follow the Sun Tutorial to code.
    Here with the code of my JDialog.
    Thanks & Best Regards
    package com.whl.panel;
    import com.whl.vslEditor.vslDefine;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.Frame;
    import javax.swing.JDialog;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    public class dialogCopyBay extends JDialog {
        vslDefine glbVslDefine;
        int lvCnt = -1;
        JTable tableCopyBay;
        int bgnX = 0;
        int bgnY = 30;
        int tableWidth = 100;
        int tableHeight = 100;
        public dialogCopyBay(Frame frame, String title, boolean modal, int sourceBay,
                vslDefine pVslDefine, int ttlWidth, int ttlHeight) {
            super(frame, title, true);
            Container contentPane = getContentPane();
            System.out.println("dialogCopyBay Constructor");
            glbVslDefine = null;
            glbVslDefine = pVslDefine;
            copyBayModel copyBay = new copyBayModel((glbVslDefine.getVslBayStructure().length - 1),sourceBay);
            tableCopyBay = new JTable(copyBay);
            tableCopyBay.setPreferredScrollableViewportSize(new Dimension(tableWidth, tableHeight));
            JScrollPane scrollPane = new JScrollPane(tableCopyBay);
            scrollPane.setViewportView(tableCopyBay) ;
            tableCopyBay.setFillsViewportHeight(true);
            tableCopyBay.setBounds(bgnX, bgnY, tableWidth, tableHeight);
            tableCopyBay.setBounds(10, 10, 100, 200) ;
            contentPane.setLayout(null);
            contentPane.add(scrollPane);
            contentPane.add(tableCopyBay);
        class copyBayModel extends AbstractTableModel {
            String[] columnNames;
            Object[][] dataTarget;
            public copyBayModel(int rowNum ,int pSourceBay) {
                columnNames = new String[]{"Choose", "Bay Name"};
                dataTarget = new Object[rowNum][2];
                for (int i = 0; i <= glbVslDefine.getVslBayStructure().length - 1; i++) {
                    if (pSourceBay != glbVslDefine.getVslBayStructure().getBayName() &&
    glbVslDefine.getVslBayStructure()[i].getIsSuperStructure() == 'N') {
    lvCnt = lvCnt + 1;
    dataTarget[lvCnt][0] = false;
    dataTarget[lvCnt][1] = glbVslDefine.getVslBayStructure()[i].getBayName();
    System.out.println("lvCnt=" + lvCnt + ",BayName=" + glbVslDefine.getVslBayStructure()[i].getBayName());
    public int getRowCount() {
    return dataTarget.length;
    public int getColumnCount() {
    return columnNames.length;
    public String getColumnName(int col) {
    return columnNames[col];
    public Object getValueAt(int rowIndex, int columnIndex) {
    return dataTarget[rowIndex][columnIndex];
    public Class getColumnClass(int c) {
    return getValueAt(0, c).getClass();
    public boolean isCellEditable(int row, int col) {
    if (col == 1) {
    // Bay Name Not Allow To modify
    return false;
    } else {
    return true;
    public void setValueAt(Object value, int row, int col) {
    dataTarget[row][col] = value;
    fireTableCellUpdated(row, col);

    Dear DB ,
    I am not sure what you mean.
    Currently,I don't undestand which code is error.
    And I also saw some example is add JTable and JScrollPane in JDialog.
    Like Below examle in Sun tutorial
    public class ListDialog extends JDialog implements MouseListener, MouseMotionListener{
        private static ListDialog dialog;
        private static String value = "";
        private JList list;
        public static void initialize(Component comp,
                String[] possibleValues,
                String title,
                String labelText) {
            Frame frame = JOptionPane.getFrameForComponent(comp);
            dialog = new ListDialog(frame, possibleValues,
                    title, labelText);
         * Show the initialized dialog. The first argument should
         * be null if you want the dialog to come up in the center
         * of the screen. Otherwise, the argument should be the
         * component on top of which the dialog should appear.
        public static String showDialog(Component comp, String initialValue) {
            if (dialog != null) {
                dialog.setValue(initialValue);
                dialog.setLocationRelativeTo(comp);
                dialog.setVisible(true);
            } else {
                System.err.println("ListDialog requires you to call initialize " + "before calling showDialog.");
            return value;
        private void setValue(String newValue) {
            value = newValue;
            list.setSelectedValue(value, true);
        private ListDialog(Frame frame, Object[] data, String title,
                String labelText) {
            super(frame, title, true);
    //buttons
            JButton cancelButton = new JButton("Cancel");
            final JButton setButton = new JButton("Set");
            cancelButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    ListDialog.dialog.setVisible(false);
            setButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    ListDialog.value = (String) (list.getSelectedValue());
                    ListDialog.dialog.setVisible(false);
            getRootPane().setDefaultButton(setButton);
    //main part of the dialog
            list = new JList(data);
            list.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
            list.addMouseListener(new MouseAdapter() {
                public void mouseClicked(MouseEvent e) {
                    if (e.getClickCount() == 2) {
                        setButton.doClick();
            JScrollPane listScroller = new JScrollPane(list);
            listScroller.setPreferredSize(new Dimension(250, 80));
    //XXX: Must do the following, too, or else the scroller thinks
    //XXX: it's taller than it is:
            listScroller.setMinimumSize(new Dimension(250, 80));
            listScroller.setAlignmentX(LEFT_ALIGNMENT);
    //Create a container so that we can add a title around
    //the scroll pane. Can't add a title directly to the
    //scroll pane because its background would be white.
    //Lay out the label and scroll pane from top to button.
            JPanel listPane = new JPanel();
            listPane.setLayout(new BoxLayout(listPane, BoxLayout.Y_AXIS));
            JLabel label = new JLabel(labelText);
            label.setLabelFor(list);
            listPane.add(label);
            listPane.add(Box.createRigidArea(new Dimension(0, 5)));
            listPane.add(listScroller);
            listPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    //Lay out the buttons from left to right.
            JPanel buttonPane = new JPanel();
            buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.X_AXIS));
            buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
            buttonPane.add(Box.createHorizontalGlue());
            buttonPane.add(cancelButton);
            buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
            buttonPane.add(setButton);
    //Put everything together, using the content pane's BorderLayout.
            Container contentPane = getContentPane();
            contentPane.add(listPane, BorderLayout.CENTER);
            contentPane.add(buttonPane, BorderLayout.SOUTH);
            pack();
        public void mouseClicked(MouseEvent e) {
            System.out.println("Mouse Click");
        public void mousePressed(MouseEvent e) {
            throw new UnsupportedOperationException("Not supported yet.");
        public void mouseReleased(MouseEvent e) {
            throw new UnsupportedOperationException("Not supported yet.");
        public void mouseEntered(MouseEvent e) {
            throw new UnsupportedOperationException("Not supported yet.");
        public void mouseExited(MouseEvent e) {
            throw new UnsupportedOperationException("Not supported yet.");
        public void mouseDragged(MouseEvent e) {
            throw new UnsupportedOperationException("Not supported yet.");
        public void mouseMoved(MouseEvent e) {
            throw new UnsupportedOperationException("Not supported yet.");
         * This is here so that you can view ListDialog even if you
         * haven't written the code to include it in a program.
    }

  • Not displaying column names in dynamic pages?

    I'd like to use a dynamic page as a detail page. In doing this I need a bit more freedom of design than what I now know is possible. Most important - I only need to print out the values returned by the SQL, not the column names as well. And I need to define the colors and fonts of the html table tags surrounding the returned values. How?
    It seems a bit strange that I am allowed to change the look and feel of the surrounding page elements through defining my own templates, and then have Oracle define how the elements placed in the templates are to appear.

    Hi,
    It is not possible to change the format the output coming from the <oracle> tags.
    Thanks,
    Sharmila

  • Urgent : Change in displayed column name of the Metadata

    Hi friends,
    I am required to dispaly a field called "Ansprechpartner" in my layout set.
    As I did not get any corresponding Metadata for it in the ContentManagement,
    I used the owner field instead. But the Deutche name for it on doing language change is "VerantWortlicher".
    Now it is required that the same data under owner column is dispalyed with the change in column name from VerantWortlicher to Ansprechpartner.
    I tried changing the key label in metadata but in vain.
    Please help me out...
    Sweta.

    Hi,
    I would recommand to duplicate the owner property instead of changing it to show a different label.
    So the steps should be:
    1. Duplicate the owner and create your own
    2. Follow the Changing Labels for Properties tutorial ro change label:
    http://help.sap.com/saphelp_nw70/helpdata/en/65/6fc63ed4027f6be10000000a114084/frameset.htm
    3. Show this property in your CollectionRenderer instead of owner
    Greetings,
    Praveen Gudapati
    [Points are always welcome for helpful answers]

  • Displaying Column name in Forms

    Dear All,
    I have a list item in my form populated with diff. table names I want to display all fieldnames of a table in another list as user select any table in first list.
    In sql We can see this by desc tablename but I am not getting any clue how to do it in Forms
    Can anyone help in this regard ?
    thanks in advance

    You could write a query using user_tab_columns, all_tab_columns or dba_tab_columns depending on your needs:
    select column_name,data_type
    from all_tab_columns
    where table_name = yourtable
    Depending on how tables are set up in your database you may have to add "and owner = ownername" in the where caluse.
    Hope this helps.

  • Displaying Column name in a text field

    I am running a report in a spreadsheet format using the across orientation..
    the last column is a total total of the previous columns and I need to display a title 'weekly totals' at the top of this column,,
    I am trying to write code to return a text string
    'Weekly Totals'to populate this field/
    I have tried the following
    declare
    title_name varchar2(20);
    begin
    title_name:=('Weely Sales Totals');
    return title_name;
    end;
    thanks

    Hi Ellery,
    As Philipp said, there is no need for populating the field using PL/SQL. You would just need to go to the Paper Layout in the Reports Editor, click on "Text" in the Drawing toolbar, drag it to the appropriate place in your layout to create the field, and write what you want in that field. Below that, you can create the field(s) which will display the actual totals. I'm assuming that creating the totals field is not a problem.
    Navneet.

  • Display column name with Group by

    Hi,
    I am having a table with a column series which is repeating.
    When i want to get all the unique series and its count, in the normal sql, I am using
    select series,count(1) from temp_table group by series;
    But the same is not working in the case of SQLX,
    I want <root><series><name count="8">series1</name><name count="18">series2</name></series></root> kind of output.
    But when i use SQLX query,
    select XMLElement("root",XMLElement("series",XMLAgg(XMLElement("name", ... group by series
    it is returning more than one record.
    How to get the desired result??
    Thanks
    Guru

    I wanted to know whether it is possible to get the count in the sqlx itself, Can anybody point me to any SQLX query for that?

  • Display column value as column name

    Hi,
    I have a requirement to display column names as column values and vice versa. Pls suggest how to do this.
    Test data
    create table oratest as select 'saurabh' "name",23 "age" from dual;
    SQL> select * from oratest;
    name           age
    saurabh         23Expected output
    saurabh         23
    name           age

    Ok, I've only got 10g here at the minute, so this is what I'd do...
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2    v_v_val     VARCHAR2(4000);
      3    v_n_val     NUMBER;
      4    v_d_val     DATE;
      5    v_ret       NUMBER;
      6    c           NUMBER;
      7    d           NUMBER;
      8    col_cnt     INTEGER;
      9    f           BOOLEAN;
    10    rec_tab     DBMS_SQL.DESC_TAB;
    11    col_num     NUMBER;
    12    v_rowcount  NUMBER := 0;
    13    v_name      VARCHAR2(20);
    14    v_age       NUMBER;
    15    v_sql       VARCHAR2(4000);
    16    v_str       VARCHAR2(250);
    17    v_und       VARCHAR2(250);
    18  BEGIN
    19    select "name", "age"
    20    into   v_name, v_age
    21    from   oratest;
    22    v_sql := 'SELECT ''name'' as "'||v_name||'", ''age'' as "'||v_age||'" from dual';
    23    c := DBMS_SQL.OPEN_CURSOR;
    24    DBMS_SQL.PARSE(c, v_sql, DBMS_SQL.NATIVE);
    25    d := DBMS_SQL.EXECUTE(c);
    26    DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
    27    --
    28    -- Bind local return variables to the various columns based on their types
    29    FOR j in 1..col_cnt
    30    LOOP
    31      CASE rec_tab(j).col_type
    32        WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); -- Varchar2
    33        WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);      -- Number
    34        WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);     -- Date
    35      ELSE
    36        DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);  -- Any other type return as varchar2
    37      END CASE;
    38    END LOOP;
    39    -- Display the header
    40    FOR j in 1..col_cnt
    41    LOOP
    42      v_str := v_str || rpad(rec_tab(j).col_name,30,' ')||' ';
    43      v_und := v_und || rpad('-',30,'-')||' ';
    44    END LOOP;
    45    v_str := rtrim(v_str);
    46    v_und := rtrim(v_und);
    47    DBMS_OUTPUT.PUT_LINE(v_str);
    48    DBMS_OUTPUT.PUT_LINE(v_und);
    49    --
    50    -- This part outputs the DATA
    51    v_str := '';
    52    LOOP
    53      v_ret := DBMS_SQL.FETCH_ROWS(c);
    54      EXIT WHEN v_ret = 0;
    55      v_rowcount := v_rowcount + 1;
    56      FOR j in 1..col_cnt
    57      LOOP
    58        CASE rec_tab(j).col_type
    59          WHEN 1  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
    60                       v_str := v_str||rpad(v_v_val,30,' ')||' ';
    61          WHEN 2  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
    62                       v_str := v_str||lpad(to_char(v_n_val,'fm999999999999'),30,' ')||' ';
    63          WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
    64                       v_str := v_str||rpad(to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),30,' ')||' ';
    65        ELSE
    66          DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
    67          v_str := v_str||rpad(v_v_val,30,' ')||' ';
    68        END CASE;
    69      END LOOP;
    70      v_str := rtrim(v_str);
    71      dbms_output.put_line(v_str);
    72    END LOOP;
    73    DBMS_SQL.CLOSE_CURSOR(c);
    74* END;
    SQL> /
    saurabh                        23
    name                           age
    PL/SQL procedure successfully completed.
    SQL>Now, with 11g you can actuall create the DBMS_SQL cursor from the top part of the code...
    18  BEGIN
    19    select "name", "age"
    20    into   v_name, v_age
    21    from   oratest;
    22    v_sql := 'SELECT ''name'' as "'||v_name||'", ''age'' as "'||v_age||'" from dual';
    23    c := DBMS_SQL.OPEN_CURSOR;
    24    DBMS_SQL.PARSE(c, v_sql, DBMS_SQL.NATIVE);And using the new function in 11g's DBMS_SQL package called dbms_sql.to_refcursor and convert the DBMS_SQL cursor to a REF CURSOR which you can then use in your applications (if that's the way you need to go)...
    http://www.oracle.com/technology/oramag/oracle/07-nov/o67asktom.html
    Whatever route you take though, you won't do this simply in SQL as the column names of a query are required to be known before any data is retrieved when a query (cursor) executes. You can see that when you use the DBMS_SQL package, where the query has to be parsed and the column names and descriptions are determined before any fetching of data.

  • Export from SP list to Excel: Excel doesn't show changed colum name. It shows only the original column names, which would be done by the column creation.

    Hello,
    I have an excel list with some columns. I changed the name of some of the column. When I export this list to excel, I always get the first column name, which was created by the creation of the column, and not the new one.
    Is there some possibility to export a SP list to export with the new column names?
    I'm waiting for your help,
    BR
    Damian

    Hi Damian,
    I tested in my environment, change the column name and export to excel list, the exported field name is the correct one.
    Please check the column name from somewhere else from site UI, you could check from SharePoint designer or powershell script.
    [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
    $site= New-Object Microsoft.SharePoint.SPSite ("http://siteurl")
    $web=$site.OpenWeb()
    $list=$web.Lists["CustomList"]
    $list.Fields |select ID, title, internalname| more
    In addition, I wonder if the issue occurs to all lists or one specific list. If the issue only occurs to one list, please try to save this list as template and create a new list based on this list and test the issue again.
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • How do you set up a wireless router for laptops only?

    Recently I purchased the Lynksys WRT54G2 router for my home.  My wife and I both have laptops and NO desktop computer.  How do I hook up the router to work on both our laptops since we dont have a desktop computer?  Thanks.

  • How do I get my HP 7525 scanned photos to show up in my Windows Photo Gallery?

    When I scan photos on my HP 7525, they show up in Documents on my Dell PC. I want them in my Windows Photo Gallery. How can I make make this happen? My PC is connected to the printer with a USB cable. Thanks for any help you can offer.

  • Messages to iPad, messages to iPad

    Im using a macbookpro late 2011 and I just updated to OS X Mountain Lion and I'm trying to use messages to send stuff to my friend's Ipad. But instead of showing up on messages, it shows up on Google Talk. Everytime I try to use messages, it either s

  • Upgrade J2ee Engine 1.4.2_06 to 1.4.2_11

    Hi, In our production XI3.0 SP16 server j2ee engine sutting down if we run many jobs at a time. Currently we are using j2ee 1.4.2_06 , this problem happend due to j2ee engine unstability. SAP note says that need to upgrade j2ee from 1.4.2_06 to 1.4.2

  • HT4990 What if I want the card to arrive on a particular day?

    I am using the Cards application, and I really like it, but I want the cards to arrive on a specific day.  Can you do that?