Removing Column from exported excel in ALV

Hi,
I have displayed one ALV to user which displays first column for checkbox and second column for image.
When I export this ALV output to Excel using standard Export button, these two columns also get exported to Excel.
Is there a way by which I can remove these columns from exported excel.
Thanks,
Feroz

Hi,
Please try this -
When you use the settings link to hide the columns, use it and hide the columns that you don't want to export, then try to Export. Check wether these hidden columns are also shown in the Excel.
Or
One more thing, In the EXPORT button functionality, try to get the column references of the table and hide those ccolumns programatically and try to export it.
While showing to user give these columns while export hide these columns by the above way.
One more thing, when you are using the standard EXPORT button, Your code doesnot trigger. Please check it.
I don't know wether this will be of any help. Give it a try.
Regards,
Lekha.

Similar Messages

  • Add and remove columns from JTable

    Help me please!
    A try to remove column from JTable. It's removed, but when I try to add column in table, then I get all old (removed early) columns + new column....
    I completely confused with it.....
    Here is my code for remove column:
    class DelC implements ActionListener
              public void actionPerformed (ActionEvent e )
                   int [] HowManyColDelete = table.getSelectedColumns();
                   if (HowManyColDelete.length !=0)
                        TableColumnModel tableCModel = table.getColumnModel();
                        for (int i = HowManyColDelete.length-1; i>-1; i--)
                             table.getColumnModel().removeColumn (tableCModel.getColumn (HowManyColDelete [ i ]));
                   else
                          JOptionPane.showMessageDialog(JOptionPane.getRootFrame(), "Column is not selected!");
         }

    It's little ex for me, I just try understand clearly how it's work (table models i mean). Here is code. All action with tables take place through menu items.
    My brain is boiled, I've try a lot of variants of code, but did't get right result :((
    It's code represent problem, which I've describe above. If you'll try remove column and then add it again, it will be ma-a-a-any colunms...
    I understand, that my code just hide columns, not delete from table model....
    But now I have not any decision of my problem...
    Thanks a lot for any help. :)
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import javax.swing.table.DefaultTableModel;
    class JTableF extends JFrame
         Object [] [] data = new Object [0] [2];
         JTable table;
         DefaultTableModel model;
         String [] columnNames = {"1", "2"};
         TableColumnModel cm;
         JTableF()
              super("Table features");
              setDefaultLookAndFeelDecorated( true );
              setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
              JMenuBar MBar = new JMenuBar();
              JMenu [] menus =  {new JMenu("A"), new JMenu("B")};
              JMenuItem [] menu1 =  {new JMenuItem("Add row"), new JMenuItem("Delete row", 'D'),  new JMenuItem("Add column"), new JMenuItem("Delete column")};
              menu1 [ 0 ].addActionListener(new AddL());
              menu1 [ 1 ].addActionListener(new DelL());
              menu1 [ 2 ].addActionListener(new AddC());
              menu1 [ 3 ].addActionListener(new DelC());
              for (int i=0; i<menu1.length; i++)
                   menus [ 0 ].add( menu1 [ i ]);
              for (int i=0; i<menus.length; i++)
                   MBar.add(menus );
              JPanel panel = new JPanel ();
              model = new DefaultTableModel( data, columnNames );
              table = new JTable (model);
              cm = table.getColumnModel();
              panel.add (new JScrollPane(table));
              JButton b = new JButton ("Add row button");
              b.addActionListener(new AddL());
              panel.add (b);
              setJMenuBar (MBar);
              getContentPane().add(panel);
              pack();
              setLocationRelativeTo (null);
              setVisible (true);
         class DelC implements ActionListener
              public void actionPerformed (ActionEvent e )
                   int [] HowManyColDelete = table.getSelectedColumns();
                   if (HowManyColDelete.length !=0)
                        TableColumnModel tableCModel = table.getColumnModel();
                        for (int i = HowManyColDelete.length-1; i>-1; i--)
                             int vizibleCol = table.convertColumnIndexToView(HowManyColDelete [ i ]);
                             tableCModel.removeColumn (tableCModel.getColumn (vizibleCol));
                        //cm = tableCModel;
                   else
                        JOptionPane.showMessageDialog(JOptionPane.getRootFrame(), "Column is not selected!");
         class AddC implements ActionListener
              public void actionPerformed (ActionEvent e)
                   //table.setColumnModel(cm);
                   Object NewColumnName = new String();
                   NewColumnName = JOptionPane.showInputDialog ("Input new column name", "Here");
                   int i = model.getRowCount();
                   int j = model.getColumnCount();
                   Object [] newData = new Object [ i ];
                   model.addColumn ( NewColumnName, newData);
         class AddL implements ActionListener
              public void actionPerformed (ActionEvent e)
                   int i = model.getColumnCount();
                   Object [] Row = new Object [ i ];
                   model.addRow ( Row );
         class DelL implements ActionListener
              public void actionPerformed (ActionEvent e)
                   int [] HowManyRowsDelete = table.getSelectedRows();
                   if (HowManyRowsDelete.length !=0)
                        for (int k = HowManyRowsDelete.length-1; k>-1; k--)
                             model.removeRow (HowManyRowsDelete[k]);
                   else
                        JOptionPane.showMessageDialog(JOptionPane.getRootFrame(), "Row is not selected!");
         public static void main (String [] args)
              javax.swing.SwingUtilities.invokeLater(new Runnable()
                   public void run()
                        JTableF inst = new JTableF();

  • Read a Column from an Excel file

    Guys,
    Is there a way I can read a specific column from an excel file, use that data to query and select data from a table and then insert the output into another column of that same excel file.
    Please advise! Thanks

    > Is there a way I can read a specific column from an excel file, use that data to query and select data from a
    table and then insert the output into another column of that same excel file.
    Not easily. An Excel file is typically in a proprietary binary file format. Perhaps saved using the new MS Office XML format.. which would be possible to process via Oracle's XDB.
    But assuming it is in a binary format, you need "something else" to read and parse that file for you - like ODBC or DDE or COM/DCOM, etc.
    Oracle supports Heterogeneous Database Services. On a Windows Server, you can create a database link in Oracle that uses an ODBC driver to connect to an ODBC data source. There are ODBC drivers for Excel. However, this requires the data in the worksheet to be properly marked as a data table. Or did last time I looked at it about 2 years ago.
    You can also call external "interfaces" from PL/SQL using EXTPROC - such interfaces can be DLLs. Which means you do have access to the Win32 API and application APIs from PL/SQL. This can be used to access the content of an Excel file - DDE for example can quite easily do this (you use it to peek the contents of an Excel grid location), but requires Excel to be running and that spreadsheet to be loaded. DDE can also be used to poke contents (write something back to a cell in a spreadsheet).
    But using Oracle code to use an Excel file as a kind of database file... that IMO does not make a lot of sense. At all.

  • Customizing Audit Log Report - Adding/Removing Columns from Display

    Hi All -
    Has anyone tried adding/removing the columns from Out of Box Auditi Log report with minor customizations to the code/configuration files ? Right now , when the Audit Log report is executed, there are numbe of columns that appear on report (Server, Client IP etc) which are too technical for the client and requirement is remove some of these and add some more for the attributes that we are audit logging through Audit workflow service. If you have done something similar in the past, please provide me with some inputs. Any sample code, examples will be highly appreciated.

    Hello Gurus,
    I also have same kind of requirement.WE have to send a monthly report to customer where number of users created and deleted to be given to them.
    Its urgent.Please help
    Thanks in advance

  • Is it possible to see list history (e.g: which user removed column from list)

    Hello there,
    I know it is possible to see version history of items and pages, but what about the lists itself?
    For example:
    Is it possible to see which user added/removed a column from a list?
    Is it possible to see which user changed a certain view from a list?
    Thanks in advance!

    There's an auditing event fired when a user modifies content types or columns in a list. To make use of this you'll need to enable auditing if it's not already enabled.
    I'm not sure about the view and I'm having trouble trying to find information about it because most of the documentation talks about VIEWing the audit reports. :)
    Jason Warren
    @jaspnwarren
    jasonwarren.ca
    habaneroconsulting.com/Insights

  • Import Metadata Wizard won't remove columns from repository table

    Hello everybody!
    We are facing the following problem with an imported object in OWB:
    I have imported successfully a table into OWB. I can see in the OWB's "Data Object Editor" that the repository object is identical to the physical object.
    If I remove a column from the physical table in db and re-Import the table in OWB, the OWB "Import Metadata Wizard" understands that a column is removed and in the "Import Results" shows that column as "Preserved". However, in OWB's "Data Object Editor" the column is not removed!! Is there a step we are missing?
    Thanks in advance!!
    ps: we are using OWB 10gR2

    Yes you missed one step
    While Importing on
    Step 3 of 3 Summary and Import
    Click on Advance Import OPtion
    De select all the preserve option.
    (Mark it as helpful or correct if it is )
    Cheers
    Nawneet

  • Import a column from an excel spreadshee​t, then enable/dis​able boolean controls in a cluster based on imported values

    Greetings all. I have an application I've been developing and refining for some time.  Part of it entails an interactive periodic table of elements where the user can select multiple elements to include in a multi-element chemical standard.  The part I'm having difficulty with now is disabling multiple elements within the periodic table.  Specifically, what the scientist wants is to be able to reference an excel inventory that they keep of available on-hand single-element standards.  I need to be able to read in column A of that spreadsheet, build a distinct array of those elements listed (some are listed more than once) and then disable the boolean controls in my periodic table for those elements not in the array (or enable those elements which are in the array, whichever makes themost sense).  This way, the analyst cannot select elements in the periodic table for which thay have no on-hand inventory.  I see how to enable or disable all controls in a boolean cluster, and I see how to enable/disable a single control, but I'm looking for an elegant way to import the excel column, build an array of thsoe values and then enable only those values.  Any help is always appreciated.  Thanks again.

    hi
    try this
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.
    Attachments:
    Excel column read.vi ‏29 KB

  • How to remove banding from exported images (png, tiff) from illustrator layout with gradient

    is there any way to remove or reduce banding that I am getting in a layout I've done that contains a gradient? I am exporting raster images (png or tiff) and there is a noticeable stepping of tonalities, rather than a smooth shift
    thanks

    In an 8bit format like PNG you only have 1024 unique levels...
    1024 is 10 bits. 8 bits is 256.
    But PNG is an RGB 8-bit per channel format. That yields 256^3 (i.e.; 24-bit or 16.7 million) potential "levels" (colors).
    ...banding that I am getting in a layout...
    Banding that you are getting where?
    What are the specific color values involved?
    What is the final use?
    What will be the distance across the gradient in its final use?
    You have to consider whether the banding is actually in the raster image, or if it is merely an artifact of where/how the image is being viewed.
    Banding is not a simple matter of image color depth. Banding is a device-dependent phenomena. The banding you see on your monitor is not the same banding that will be seen on your grayscale laser printer; is not the same banding that will be seen on your CMYK inkjet printer; is not the same banding that will be seen on press. Banding in print is generally more a function of levels of gray (per separation) of the imaging device, and can vary depending on the halftone ruling (assuming conventional AM screening).
    Depending on the answers to the questions above, you may very well be fretting over nothing.
    JET

  • Select the name of the column from sheet Excel

    Hi everyone,
    i use vb.net with excel 
    First, i have a button "browse"
    which open a workbook.
    Second ,i  have a button "get
    the names of the sheets" which give me the name of the sheet in a combobox ,then i choose the sheet.
    Then i have an other button " get
    the column names " which give me the name of the columns of the table in a combobox .
    When i select the name of the column a new sheet add named the
    name of the column and which has the data of this column
    what i want is :
     when i select again the same column a messagebox will
    be shown "you have already select it "
    And when i go back to choose another sheet then another column
    will be open without getting any error
    this is the code of the combobox :
    Public Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
    xlWorkSheet = CType(xlWorkBook.Sheets(ComboBox1.Text), Excel.Worksheet)
    xlWorkSheet.Activate()
    xlApp.Visible = True
    With xlWorkSheet
    Dim key As String = CStr(DirectCast(ComboBox2.SelectedItem, KeyValuePair(Of Integer, String)).Key)
    Dim value As String = DirectCast(ComboBox2.SelectedItem, KeyValuePair(Of Integer, String)).Value
    Dim lastrow As Integer = xlWorkSheet.Cells.Rows.End(XlDirection.xlDown).Row
    Dim colletter As String = ColumnIndexToColumnLetter(CInt(key))
    exWS2 = DirectCast(xlWorkBook.Sheets.Add, Microsoft.Office.Interop.Excel.Worksheet)
    exWS2.Name = value
    xlWorkSheet.Range("A1:A" & lastrow.ToString).Copy(exWS2.Range("A1"))
    End With
    End Sub
    and if you want to know the code of the button here is :
    Public Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    Dim Excols As New Dictionary(Of Integer, String)
    xlWorkSheet = CType(xlWorkBook.Sheets(ComboBox1.Text), Excel.Worksheet)
    xlWorkSheet.Activate()
    If ComboBox2.Items.Count = Nothing Then
    With xlWorkSheet
    Dim LastCol As Integer = xlWorkSheet.Cells(1, xlWorkSheet.Columns.Count).End(XlDirection.xlToLeft).Column
    For x As Integer = 2 To LastCol
    Excols.Add(x, xlWorkSheet.Cells(1, x).value.ToString)
    Next
    ComboBox2.DataSource = New BindingSource(Excols, Nothing)
    ComboBox2.ValueMember = "Key"
    ComboBox2.DisplayMember = "Value"
    AddHandler ComboBox2.SelectedIndexChanged, AddressOf ComboBox2_SelectedIndexChanged
    End With
    Else
    MsgBox("Déja Pleine!", CType(MessageBoxIcon.Error, MsgBoxStyle))
    End If
    End Sub
    please help me 

    Hi
    >> when i select again the same column a message box will be shown "you have already select it
    Each time you select a value in the comobox , you could compare
     each cell’s value with the value you just selected in the first row. If  it is matched, then show the message box" you have already select it "
    >>And when i go back to choose another sheet then another column will be open without getting any error
    I am not sure the sentence’s meaning clearly, What do you mean about another column will be open?  what's the error , Can you clarify this more
    clear?
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Removing columns from the result of a query via SQL

    Hi
    I have written a SQL query that returns the following results:
    TableA
    A1.ColA A2.ColB
    1234 567
    567 1234
    I would like the query not to display the second row since the first row already has the required info.
    The SQL query is
    Select A1.ColA, A1.ColB
    from TableA A1,
    TableA A2
    where A1.ColA <> A2.ColB
    As you can see I'm comparing the values in the same column.
    Regards
    Bilal

    As I can see none of the previously mentioned solutions here work in the proper way, so you can try this:
    SQL> with t as (select 1234 colA, 5678 colB from dual union all
      2             select 5678 colA, 1234 colB from dual union all
      3             select 2 colA, 1 colB from dual union all
      4             select 1 colA, 3 colB from dual)
      5             select colA, colB
      6               from (select colA,
      7                            colB,
      8                            row_number() over(partition by least(colA, colB), greatest(colA, colB) order by colA) rn
      9                       from t)
    10              where rn = 1
    11  /
          COLA       COLB
             2          1
             1          3
          1234       5678

  • Exclude column from interactive report when exporting data

    Hello!
    Is it possible to exclude column from exporting (using bi publisher) in interactive report, but having in report. So in report it is, but in export result it isnt :). I know, that I can just not to select this column in "Action" menu before exporting, but then to select it to view in report. But is it possible not to export this column, but having it in report result?
    I Just have a checkbox in report, and I dont need to see it in export result.
    APEX 4.1.
    Thanks !
    Edited by: go0ze on Sep 28, 2012 1:40 AM

    Hi,
    Set condition type PL/SQL Expression to column and enter to Expression 1
    NVL(:REQUEST,'EMPTY') NOT IN('CSV', 'XLS', 'PDF', 'RTF', 'XML', 'HTMLD')Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Removed coloumns from the table

    How to get the removed columns from a table

    905310 wrote:
    How to get the removed columns from a tableYour question is not clear enough.
    As per my understanding you want to restore the deleting columns?
    What is the Database Version?
    If you have backup in dump file, import it.
    If you do not have any dumpfile, You have to restore from Latest backup(RMAN). Of course you have to restore database as you cannot restore objects(tables) from RMAN backup.

  • Adding/removing columns in jtable

    Hello everyone,
    i was looking for a way to add/remove columns from a jtable. The way i envision it working is... Initially have a predefined number of columns, of these only show the user say 5 of those on startup. but then provide a drop down (or list box etc) of the other column headings, so that when the user selects one... it adds it to the jtable. also to remove ..... is there a way to have a pop-up when the user right-clicks the table header and put a option to remove that column there? if not what is the best way to trigger a remove of a column? So i need a way to keep track of all the columns in case the user wants to add it again. anyone know how this can be done or any part of it?

    I need a intutive way for the user to remove a column from the gui (like with adding could be a dropdown box with column headers as labels).Create a custom ComboBoxModel. This model would simply contain TableColumns and display the header value in the combo box. The first combo box would display the currently showing columns. When you click on an item in the combo box:
    a) remove the TableColumn from the TableColumnModel
    b) remove the TableColumn from the model
    c) add the TableColumn to the "hidden" combo box model
    The same basic logic (but in reverse) would then apply when you click on the "hidden" combo box.

  • Auto Expand Html table when we paster data from Microsoft Excel sheet

    hi,
    I need copied data to my Html table.
    Actual requirement is like that when i copy selected rows with selected columns from Microsoft excel sheet and press "ctlr v" on my jsp page then table on jsp must be auto expand as data in excel sheet.
    Take an example.
    I copy 4 rows with 3 columns from excel sheet.
    I have JSP page with 1 row and 3 columns.
    when i press "ctrl v" on first cell of my jsp table then table should be auto expand to accommodate 4 rows of excel sheet.
    here i have some of the code which is near to this, this code just copy past only one row, but i need multiple rows.
    If need then please refer below code and if possible then give me the solution to auto expand HTML table on JSP
    Code to copy paste cell in to HTML Table
    <form>
    <table>
    <tr>
    <td><input type="text" name="t1_0" onchange="formatCells(this.value,'t1')"></td>
    <td><input type="text" name="t1_1"></td>
    <td><input type="text" name="t1_2"></td>
    <td><input type="text" name="t1_3"></td>
    <td><input type="text" name="t1_4"></td>
    </tr>
    <tr>
    <td><input type="text" name="t2_0" onchange="formatCells(this.value,'t2')"></td>
    <td><input type="text" name="t2_1"></td>
    <td><input type="text" name="t2_2"></td>
    <td><input type="text" name="t2_3"></td>
    <td><input type="text" name="t2_4"></td>
    </tr>
    </table>
    </form>
    <script type="text/javascript">
    function formatCells(xls,group){
    var arrGroup = xls.split(/\t/gi);
    for(var i=0;i<arrGroup.length;i++){
    document.forms[0].elements[group + "_" + i].value = arrGroup;
    </script>
    Thanks
    Chintan Patel

    Hi Ross,
    >> In our testing environment using both Excel 2010 and 2013 this file is imported successfully, so we cannot replicate.
    I suspect it is caused by the difference of web server security settings.
    KB: Error message when you use Web query to a secure Web page (HTTPS://) in Excel: "Unable to open"
    Hope it will help.
    By the way, this forum is mainly for discussing questions about Office Development (VSTO, VBA and Apps for Office .etc.). For Office products feature specific questions, you could consider posting them on
    Office IT Pro forum or Microsoft Office Community.
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • AddColumn() make removed column visible again. Pls help. :)

    I have a JTable which I need to remove and add column.
    // declaration of table and tablemodel
    DefaultTableModel tableMod = new DefaultTableModel (data, col);
    // data is Object[][] type, col is String[] type
    myTable = new JTable(defaultTableModel );
    DefaultTableColumnModel columnMod = (DefaultTableColumnModel)myTable.getColumnModel();
    My remove column code is :
    columnMod.removeColumn(columnMod.getColumn(1));
    My add column code is :
    tableMod.addColumn("three");
    My problem is : say my table has 2 columns initially
    "one" "two"
    after removeColumn(), the column will disappear from the JTable. like this
    "one"
    but when I addColumn() later, the removed column will appear again. like this
    "one" "two" "three"
    I think the problem is DefaultTableColumnModel is used to removeColumn but DefaultTableModel is used to addColumn, resulted in some kind of discrepancy, how to go about this? I know I can do perform addColumn() and removeColumn() on JTable, something like :
    remove -
    myTable.removeColumn(myTable.getColumnModel().getColumn( myTable.getSelectedColumn() ) );
    add -
    addedColumn = new TableColumn()
    myTable.addColumn(addedColumn);
    But when I do this addedColumn has a modelIndex of 0 , and anychanges to addedColumn will be reflected on first column(because modelIndex is 0) as well...which is what I don't want.
    Hope I'm making sense, any help appreciated.

    Ok, so heres my gripe with actually removing a column from a JTable : A JTable rebuilds its entire column model when it gets certain events (e.g. if the table model calls fireTableStructureChanged). This makes it unreliable to remove columns from the table by the method you give (though im not saying it cant be done, feel free to pursue that avenue if you like). Im just saying a more reliable way to do it is to have you own table model that knows exactly what the columns are to be in the JTable at any time. This way if the JTable rebuilds it column model it wont remake a column you removed.
    So heres the basics of removing and adding a column by changing the table model :
    A table model (derived from AbstractTableModel) needs to have three functions:
    public int getRowCount();
    public int getColumnCount();
    public Object getValueAt(int row, int column);So if you're at a time when you only want one column, getColumnCount() should return 1. If you want to say add two columns, then have getColumnCount() return 3. You would then also need to change what gets returned by getValueAt() so that it tells what is in the three columns appropriately. Also, whenever the number of columns is changed, you would need to fireTableStructureChanged(), to let the table know to rebuild it column model, with or without the columns you want added/removed.
    That is exactly what is done in the other post. I don't mean to not directly answer your question, i just don't think that removing and adding columns like that is how JTable is meant to be used, in MVC architechure. I dont really have any information about adding and removing columns because I've never even attempted to change a table that way. All i can say to that is that you have to figure out how JTable works, which I would try putting tons of System.out() calls telling me exactly what the column model looks like after certain changes(it indexes, etc..).
    Well i hope this helps in some small way...
    Josh

Maybe you are looking for

  • Ipw2200 intel wireless problem

    Okay i got everything working pretty well with netcfg and ipw2200 drive ecept one thing. If there is not network activity on the wireless card then it goes to sleep. Then once i go to google.com it takes forever ot load up because the card has to sta

  • Quick time won't open h264

    Hi everyone except jim cook! I have already been to the qt side and no help there, so maybe somebody here can help. I encoded a file from compressor 3. I used h264 and when it was done, I dbl, clkd to open in qt and it closed right away. So I tried t

  • Report on Sync Status

    Hi, I would like to know if its possible to get a report each day that shows the successful or unsuccessful status of the Software Update Point.  I can see it in the console under Monitoring, but I really need an email sent to me on a daily basis tha

  • STO between two company codes

    Hi, we are doing the inter company process between two company codes. i have one reference document, 1) how can we find the supplying plant sales area and receving plant sales area. 2)In spro settings "Assign sales organization - distribution channel

  • In LR4 I got a message: "There was an error working with the photo". Source?

    Is there a way of getting more info about the source of the error? It occurred when I clicked on a photo while in Library. Thanks!  Frank