Export To Excel from a VC Iview

Hi all,
I tried to  Export the data to an Excel  from a Table in a VC iView....I have created a Button on the Toolbar of table and added relavent code to do the exporting...But when i click on the button on iam getting the following error...
Portal Runtime Error
An exception occurred while processing a request for :
iView : N/A
Component Name : N/A
iView not found: pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/iviews/com.sap.ip.bi.bex.
Exception id: 04:23_14/04/08_0006_171933750
See the details for the exception ID in the log file
Do i have to change the Permissions for the above iview?
Any answers would be rewarded...
Thanks & Regards,
P.Navakanth

Hi Reddy,
it has been some time ago you have posted this issue so I'm not sure if you still need a solution for this issue.
Anyway, I assume you have found the manual regarding the export to excel, csv and pdf for Visual Composer (https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/47fe4fef-0d01-0010-6f87-ed8ecb479123)
We also had issues with the export funcationality described in the document. I don't recall the exact error message.
Just some advice:
Copy the code from the document into Notepad. Then, make sure you re-arrange the code into 1 single line (remove all enters). Then, copy the code into the formula editor of the hyperlink action. Don't forget to define a store (e.g. reptname) but that is explained in the document as well.
Regards,
Sven

Similar Messages

  • Exporting to Excel from Aria People Search

    Is it possible to export to Excel from Aria People Search.
    I would like to output the Org Chart (built in) and the Tree (I created) to an Excel file.
    Does anyone know how to do this?
    Thanks,
    Tom

    Hi,
    If you are using 10g, then OLE2 is supported. However, it will be executed in the App Server Machine.
    If you want to do the operation in the Client machine (as how it was done in the Client / Server), you need to use Client_OLE (Which is part of WebUtil).
    Look at
    http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm
    for more details on WebUtil.
    HTH.
    Regards,
    Arun

  • Any method to Import & Export to Excel from Client Side

    Hi,
    Is there any method to Import and Export to Excel from the Client side. I have one procedure to export to Excel , but the excel file will be opened in the Application Server only, even if it executed from the client side. Also this procedure will not work if OLE2 chnaged CLIENT_OLE2. I am writing my procedure, Is there any idea to get it in the client side.
    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);
    ExcelFontId OLE2.list_type;
    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
    ------updated by faisal-to give Bold font-----
    --FOR k IN 1 .. 3 LOOP
         args := OLE2.create_arglist;
         OLE2.add_arg(args, 1);
         OLE2.add_arg(args, col_n);
         cell := OLE2.get_obj_property(worksheet, 'Cells', args);
         OLE2.destroy_arglist(args);
         --cell_value := OLE2.get_char_property(cell, 'Value');
         ExcelFontId := OLE2.get_obj_property(Cell, 'Font');
         OLE2.set_property(ExcelFontId, 'Bold', 'True');
    --END LOOP;
    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;
    Thanks in advance.
    Rizly Faisal

    Alternatively you could use OLE2 to do the bulk of the importing and exporting and then use the webutil file transfer functions to move the file to the client and then simply open the file there...That might be more efficient in terms of performance as well.
    Regards
    Grant

  • Export to Excel from Report region (pl/sql returning sql query)

    Hello all,
    I have encountered an interesting problem. I have an HTMLDB application with a lot of sql reports coded straight inside the report region. In order to better organize my reports, I decided to
    1. make all my report regions of type "Pl/Sql function returning SQL query"
    2. create a package inside my database schema which houses all reports as pl/sql functions returning VARCHAR2, the string returned being the report query
    3. just calling "return package_name.function_name" from inside my report region of type "Pl/sql function returning SQL query".
    This technique seemed to work perfectly. The reports were being returned as expected. I was then asked to provide the "Export to Excel" capability to all my reports. This seemed like a piece of cake using HTML DB's "Export to Excel" extension. However, the "export to excel" does not function correctly when my reports are inside a package in the database. HTML DB tries to export but inside the excel spreadsheet, instead of seeing row data, I see:
    <pre>failed to parse SQL query:
    ORA-00936: missing expression
    <!-- select a.username, b.table_name, 'View Row Data' from schema_browser_user_list a, all_tables b where a.user_id = and a.username = b.owner order by b.table_name asc
    --!>
    </pre>
    I am building my query string inside of my package functions by using a combination of literal strings and concatenating them with some parameter values being passed in. It seems that the HTML DB engine which exports the report to excel does not properly understand the concatenation of variables as can be seen by the empty space to the right of the equal sign in the "a.user_id = " clause. Does anybody have any input as to whether this is a known issue or if I am doing something wrong? Thanks a lot for your time.
    - Kenny R.

    James,
    Thanks for the quick reply. I think you mis-understood what I'm doing. All I'm doing is creating packaged functions which return VARCHAR2. The VARCHAR2 that they return is the report query. With this technique, I no longer have to type the query into the HTML DB report region. Instead, I make the report region a "Pl/sql function returning sql query" and make the following call: return package_name.function_name(some_application_items passed in as parameters)
    This makes for a much more organized html db app. The problem is that the "export to excel" function does not correctly interpret the VARCHAR2 that my packaged functions are returning. Is this a better explanation? Thanks again for your time.
    - Kenny R.

  • Export to Excel from PL/SQL Procedure

    Hello,
    I am creating a report using PL/SQL and html code. Once the report is display, I click on "Export to Excel" button. it should open the new window with Excel. The window opens in Excel, but no data. I have following code
    as the first statement in the procedure.
    OWA_UTIL.MIME_HEADER ('application/vnd.ms-excel', FALSE);
    and this is the script
    <script language="JavaScript">
    var param_list
    l_param_list := l_param_list || '&p_app_main_id=' || p_app_main_id;
         l_param_list := l_param_list || '&p_from_date=' || p_from_date ;
         l_param_list := l_param_list || '&p_to_date=' || p_to_date ;
    htp.prn('
    param_list = ''');
    htp.prn( l_param_list);
    htp.prn('''
    function NewWindow(mypage,myname,w,h,scroll){
    var win = null;
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings = ''height=''+h+'',width=''+w+'',top=''+TopPosition+'',left=''+LeftPosition+'',scrollbars=''+scroll+'',resizable''
    win = window.open(mypage,myname,settings)
    win.focus();
    function ExportToExcel() {
    var wndname = ''ExpCodeMoveRep'';
    var wndw = screen.width-10;
    var wndh = screen.height-10;
    var wattr = ''scrollbars=yes,toolbar=yes,resizable=yes,menubar=yes'';
    var wndurl = ''pm_codemove_report?p_output=E'';
    wndurl = wndurl + param_list;
         NewWindow(wndurl,wndname,wndw,wndh,wattr);
    </script>
    My submit is
    htp.prn('
    <p align="center">
    <input type="button" class="printbutton" value="Close" class="button" OnClick="window.close();"> 
    <input type="button" class="printbutton" value="Export To Excel" class="button" OnClick="ExportToExcel();">');
    Can anyone tell me what is wrong.
    I have the same code in another schema and it is working fine. Both schema are on the same server. Do they have any set up on appserver in DAD file to be able to see the data in Excel?
    Thanks
    Yagna

    Thank you for your answer dccase!
    I decided to go with on demand process. I have trouble with calling procedure from (button URL - javascript:popupURL('#OWNER#.exportXML')) pop window which cause "Forbidden, The requested operation is not allowed" error. I read that this is because I'm using XE edition and there is no HTMLDB_PUBLIC_USER role in XE.
    Now, I use on demand process and button URL link:
    javascript:popupURL('f?p=&APP_ID.:0:&APP_SESSION.:APPLICATION_PROCESS=PLSQL_Export_XML:NO::')
    It is working. Now I have to find solution to automatically close popup window :-)
    Thanks!
    Marko

  • Error while exporting to excel from a JSP page on Win XP

    Hi,
    I have used the below code to output the content from jsp to excel file, its working fine until we noticed an error on computers with Windows XP installed. The application is working fine on Win 2k systems. Please help.
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-disposition", "attachment;filename=Report.xls");

    My problem was somewhat similar....
    I got some help from...http://www.javaworld.com/javaworld/jw-10-2006/jw-1019-xmlexcel.html?page=1...
    This is my code in servlet...
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet spreadSheet = wb.createSheet("Users");
    spreadSheet.setColumnWidth((short) 0, (short) (256 * 25));
    spreadSheet.setColumnWidth((short) 1, (short) (256 * 25));
    // Creating Rows
    HSSFRow row = spreadSheet.createRow(0);
    HSSFCell cell = row.createCell((short) 1);
    cell.setCellValue("Year 2005");
    cell = row.createCell((short) 2);
    cell.setCellValue("Year 2004");
    HSSFRow row1 = spreadSheet.createRow(1);
    HSSFCellStyle cellStyle = wb.createCellStyle();
    cellStyle.setBorderRight(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderLeft(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderBottom(HSSFCellStyle.BORDER_MEDIUM);
    cell = row1.createCell((short) 0);
    cell.setCellValue("Revenue ($)");
    cell = row1.createCell((short) 1);
    cell.setCellValue("25656");
    cell = row1.createCell((short) 2);
    cell.setCellValue("15457");
    FileOutputStream output = new FileOutputStream(new File("/tmp/Users.xls"));
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "attachment;filename=Users.xls");
    ServletOutputStream out = response.getOutputStream();
    wb.write(output);
    output.flush();
    output.close();
    forward = null;
    In firefox i get the download dialog box but not able to open in from there,i need to save it and then open. In IE i dont get the dialog box instead the excell open inside the browser......Please help me to open a excel sheet onclick on a link "Export to excel" in jsp......
    Thanks in advance...

  • Can't export to Excel from SAP after upgrade

    Hi there,
    We couldn't export to Excel after upgrading SAP from 2007B PL15 to 8.81 Pl07.
    We tried all workstations as well as server itself and encountered below error upon exporting to Excel.
    "AutoOpen.xls cannot be accessed. The file may be corrupted, loated on a server that is not responding, or read only."
    Microsoft Excel Folder under "General Settings >> Path tab" has been defined.
    If you have a solution or workaround for the above error, kindly share with me.
    Thank you.
    Regards,
    Yadana

    Dear Yadana,
    Check this forum
    Re: Export to excel doesn't work anymore
    Regards
    Mangesh Pagdhare.

  • Exporting Into Excel from Crystal Reports 8.0.1.0

    Post Author: Manoj
    CA Forum: Exporting
    Hi, I am using Seagate Crystal Reports 8.0.1.0 along with my VB application. System was exporting into Excel on Older Versionsof Windows like 98 and all. But in XP, after exporting if i open the exported file, either i get a message like Cannot Read From Fileor A Blank Sheet in the Excel. I have already tried copying the U2*.dll from the crystal folder to System/System32 folder but it is notexporting. Somebody please help... RgdsManoj

    Sage is an OEM partner. For any database issues please ask Sage for assistance.

  • Why authorization needed when accesing an export in excel from Bex

    Hi Experts,
    Before upgrade to version 7.0 when our user export a report to excel is
    neccessary enter user and password, the issue is that not everybody
    have a user therefore so they cannot see the excel.
    This problem is due to the icons are in the server and in the excel
    there are links to these icons of the server.(for example the icon of the hierarchy node)
    If you configurate the excel to not load the icons the issue disappears
    In Microsoft Excel
    Select tools->Options->General->Web Options->General tab
    and unmark the flag "Load pictures from Web pages"
    But this solution is not always available for all users due to different excel plug-ins installed in their local computers.
    Our questions are:
    1.- How can we avoid these icons in the future?
    2.- Why these problems occurs since the upgrade to SAP BW 7.0?
    3.- Is there any option to insert the icons instead of having links?
    Thanks in advance

    Hi Reddy,
    it has been some time ago you have posted this issue so I'm not sure if you still need a solution for this issue.
    Anyway, I assume you have found the manual regarding the export to excel, csv and pdf for Visual Composer (https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/47fe4fef-0d01-0010-6f87-ed8ecb479123)
    We also had issues with the export funcationality described in the document. I don't recall the exact error message.
    Just some advice:
    Copy the code from the document into Notepad. Then, make sure you re-arrange the code into 1 single line (remove all enters). Then, copy the code into the formula editor of the hyperlink action. Don't forget to define a store (e.g. reptname) but that is explained in the document as well.
    Regards,
    Sven

  • Export to Excel from Reports produces corrupt file format

    Whenever I choose to export to excel results of custom reports I am unable to open the file as I am told the file format is corrupt. The contents show as containing xml data and even changing the extension from xls to xml does not get me anywhere.
    If I save the report and then download I am still informed the file format does not match the extension but the fie will open in Excel.

    Hi,
    Please raise a ticket or provide the URL if the issue is still there.
    Kind Regards,
    Alex

  • Export to Excel from WEB - How to restrict amount of data

    Hi
    We have a standard web template w. the option to export to excel. Is there anyway we can restrict / disable this button if the number of rows in the query/dataprovider is more than X.
    The reason why I'm asking is that if one or several users export a large amount of data from our BI portal to a local excel file the portal sometimes crash.
    br,
    Kaare

    This, can only be achieved by modifying the WEB template which is used at your client.
    If its standard template 0ANALYSIS_PATTERN , change the logic for the button export to excel and embedded the code to thorogh an error if report output exceeds certain limit.
    Deepak

  • How to remove values formatting in export to excel from ALV grid

    Hi all,
    I have small issue, I have ALV Grid with some data, but the problem is with columns containing e.g. gross amounts, because it is displayed in the grid as e.g. 1.764,81, and after export to excel it is still in this format (with dot and comma), so excel doesn't treat it as numeric value but as text, and then when I try to calculate total on the column then this values are not taken to the total. Do you know if that is possible to remove column formatting?
    kind regards,
    Marcin

    I replied too soon to Peter's suggestions.  For some reason, I was able to add new info. to my first new row, but not the second.  However, I finally figured out the problem.
    I found the Help Center page on: "Here are ways to change custom formats and apply changes to table cells:"
    To change the elements associated with a custom format that’s been applied to cells, select the cells and click Show Format in the Format pane of the Table inspector.
    I saw that the "cell format" was listed as "automatic," so I changed it to "Custom;" then left the new custom window at it's default settings. Now my cells would accept pasted info. without spreading it through the lower rows.  Whatever automatic was in the table, it was not what I wanted. Doing this to other new cells, solved my problem.  Thanks again.

  • Maximum number of rows export to excel from WebI

    Hello,
    I have a WebI Report in BO 4 SP6 which has 14 columns and 80,000 rows. I opened the report in WebI (Internet explorer) and clicked on the export icon but nothing happened. this report was being run for a month 201301.
    So I modified the same report with 1 week's data which is 4500 rows and when I exported it to excel 2007 and it worked.
    My questions are:
    1- how do I export 80,000 rows of data to excel?
    2- what servers/services are responsible for exporting data to excel?
    3- any other opinions that you can share which might help me.
    PS: I have not test this in rich client since rich client is not being used by users, Users only use WebI.
    Regards,
    samique

    After you click on export to excel. wait for some time for the pop up to come up.... Even after some time  if it doesn't come up and throw a timeout error "Missing sEntry parameter", then you can try by increasing the time limit. But I won't recommend this since, this is happening due to huge volume of data.
    Below thread might help you
    Error when exporting WebI to PDF
    If you export it using rich client, you can clearly see that the file size is too large.. It was 45 MB in my case. So I requested my user to put some filters and then do an export to excel.

  • Error: Invalid Export dll when exporting to Excel from VB,NET 2008

    Version: Crystal Report 2008
    Front End: Visual Basic 2008
    Hello,
    I am trying to export a report to Microsoft Excel [2003] when I get the error "Error in File_Temp......Invalid Export dll or export format".
    from the Windows Form Viewer.
    I have looked in C:\Program Files\Common Files\Business Objects\3.0\bin and found crxf_xls.dll and crxf_xls_res_en.dll, but am not sure if these dlls' are the error source.
    Do these dll files need to be reregistered? Re-installation hasn't worked.
    Thanks
    eburton

    Duplicate

  • Export to Excel from Database using JSP

    Hi Experts,
    I'm using below jsp code to export from an Oracle table to Excel using JSP.
    Every time I run this code I get the exception - "java.lang.OutOfMemoryError: Java heap space".
    I need to download around 8000+ records of the table containing 60 columns.
    I have increased Heap space but still the exception. Below is the code for your reference (I have mentioned only 30 columns where as there are 60 columns in actual). Pls help me what could be the other possible ways or suggest me any alternate code.
    Pls note - Some of the terms like "<serverip>", MySchema, myfile, COL names are changed for confidentiality.
    "D:\\Myfolder\\Excelfolder\\Final.xls" exists my the local machine.
    The code works until some 4000 records & after that throws the exception.
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@<serverip>:1521:WISTGDEV", "user", "user@123");
    Statement statement = connection.createStatement();
    String filename = "C:\\Myfolder\\Excelfolder\\Final.xls";
    String strQuery1 = ("select * from Myschema.myfile");
    ResultSet rs = statement.executeQuery(strQuery1);
    HSSFWorkbook hwb = new HSSFWorkbook();
    HSSFSheet sheet = hwb.createSheet("sheet1");
    HSSFRow rowhead = sheet.createRow((short)0);
    rowhead.createCell((short) 0).setCellValue("COL1");
    rowhead.createCell((short) 1).setCellValue("COL2");
    rowhead.createCell((short) 2).setCellValue("COL3");
    rowhead.createCell((short) 3).setCellValue("COL4");
    rowhead.createCell((short) 4).setCellValue("COL5");
    rowhead.createCell((short) 5).setCellValue("COL6");
    rowhead.createCell((short) 6).setCellValue("COL7");
    rowhead.createCell((short) 7).setCellValue("COL8");
    rowhead.createCell((short) 8).setCellValue("COL9");
    rowhead.createCell((short) 9).setCellValue("COL10");
    rowhead.createCell((short) 10).setCellValue("COL11");
    rowhead.createCell((short) 11).setCellValue("COL12");
    rowhead.createCell((short) 12).setCellValue("COL13");
    rowhead.createCell((short) 13).setCellValue("COL14");
    rowhead.createCell((short) 14).setCellValue("COL15");
    rowhead.createCell((short) 15).setCellValue("COL16");
    rowhead.createCell((short) 16).setCellValue("COL17");
    rowhead.createCell((short) 17).setCellValue("COL18");
    rowhead.createCell((short) 18).setCellValue("COL19");
    rowhead.createCell((short) 19).setCellValue("COL20");
    rowhead.createCell((short) 20).setCellValue("COL21");
    rowhead.createCell((short) 21).setCellValue("COL22");
    rowhead.createCell((short) 22).setCellValue("COL23");
    rowhead.createCell((short) 23).setCellValue("COL24");
    rowhead.createCell((short) 24).setCellValue("COL25");
    rowhead.createCell((short) 25).setCellValue("COL26");
    rowhead.createCell((short) 26).setCellValue("COL27");
    rowhead.createCell((short) 27).setCellValue("COL28");
    rowhead.createCell((short) 28).setCellValue("COL29");
    rowhead.createCell((short) 29).setCellValue("COL30");
    int index=1
    String name="";
    while(rs.next())
    System.out.println("Inside while");
    HSSFRow row = sheet.createRow((short)index);
    row.createCell((short) 0).setCellValue(rs.getString(2));
    row.createCell((short) 1).setCellValue(rs.getString(3));
    row.createCell((short) 2).setCellValue(rs.getString(4));
    row.createCell((short) 13).setCellValue(rs.getFloat(5));
    row.createCell((short) 4).setCellValue(rs.getString(6));
    row.createCell((short) 5).setCellValue(rs.getString(7));
    row.createCell((short) 6).setCellValue(rs.getInt(8));
    row.createCell((short) 7).setCellValue(rs.getString(9));
    row.createCell((short) 8).setCellValue(rs.getString(10));
    row.createCell((short) 9).setCellValue(rs.getString(11));
    row.createCell((short) 10).setCellValue(rs.getString(12));
    row.createCell((short) 11).setCellValue(rs.getFloat(13));
    row.createCell((short) 12).setCellValue(rs.getFloat(14));
    row.createCell((short) 13).setCellValue(rs.getFloat(15));
    row.createCell((short) 14).setCellValue(rs.getFloat(16));
    row.createCell((short) 15).setCellValue(rs.getFloat(17));
    row.createCell((short) 16).setCellValue(rs.getFloat(18));
    row.createCell((short) 17).setCellValue(rs.getFloat(19));
    row.createCell((short) 18).setCellValue(rs.getFloat(20));
    row.createCell((short) 19).setCellValue(rs.getFloat(21));
    row.createCell((short) 20).setCellValue(rs.getFloat(22));
    row.createCell((short) 21).setCellValue(rs.getString(23));
    row.createCell((short) 22).setCellValue(rs.getString(24));
    row.createCell((short) 23).setCellValue(rs.getString(25));
    row.createCell((short) 24).setCellValue(rs.getString(26));
    row.createCell((short) 25).setCellValue(rs.getString(27));
    row.createCell((short) 26).setCellValue(rs.getString(28));
    row.createCell((short) 27).setCellValue(rs.getString(29));
    row.createCell((short) 28).setCellValue(rs.getString(30));
    index++;
    rs.close();
    FileOutputStream fileOut = new FileOutputStream(filename);
    hwb.write(fileOut);
    fileOut.close();
    connection.close();
    catch(Exception e)
    System.out.println(e.getMessage());
    e.printStackTrace();
    Thanks in advance,
    Venky
    Edited by: Venky_86 on Apr 15, 2009 12:06 AM

    Its is an obvious thing...POI is known to need a lot of memory (the reason for that is most likely the OLE document format, which is quite complex).
    I would have used something like the below to see if that can address my client's requirement.
    public exportExcel(String fileName){
       Connection connection = null;
       Statement statement = null;
       ResultSet rs = null;
       PrintWriter out = null;
       int index=1;
       try{
         out = new PrintWrite(new FileWriter(fileName));
         connection = DbUtils.getConnection();
         statement = connection.createStatement();
         rs = statement.executeQuery("select * from Myschema.myfile");
         out.prinln("<table>");
         out.println("<th>COL1</th>");
         out.println("<th>COL2</th>");
         out.println("<th>COL3</th>");
         out.println("<th>COL4</th>");
         out.println("<th>COL5</th>");
         out.println("<th>COL6</th>");
         out.println("<th>COL7</th>");
         out.println("<th>COL8</th>");
         out.println("<th>COL9</th>");
        out.println("<th>COL30</th>");
         out.println("<thead>");
         out.println("<tbody>");
         while(rs.next()){
              out.println("<td>"+index+"</td>");
              out.println("<td>"+rs.getString(2)+"<td>");        
              out.println("<td>"+rs.getString(3)+"<td>");        
              out.println("<td>"+rs.getString(4)+"<td>");        
              out.println("<td>"+rs.getString(5)+"<td>");        
              out.println("<td>"+rs.getString(6)+"<td>");        
              out.println("<td>"+rs.getString(7)+"<td>");        
              out.println("<td>"+rs.getString(8)+"<td>");        
              out.println("<td>"+rs.getString(9)+"<td>");        
              out.println("<td>"+rs.getString(30)+"<td>");        
         out.println("</tbody>")     
         out.println("</table>");    
         out.flush(); 
       }catch(Exception exp){
           exp.printStackTrace();
       }finally{
           if(out != null)
            try{out.close();}catch(Exception e){}
             if(rs != null)
               try{rs.close();}catch(Exception e){}
            if(statement != null)
               try{statement.close();}catch(Exception e){}
             if(connection != null)
               try{connection.close();}catch(Exception e){}
    }and you can simply export the file using the method
    ApplicationUtils.getInstance().exportExcel("c:/export/myapp/ApplicationTable.xls");If you are using Office 2000 and above you should able open it as an excel worksheet without any problems.
    Hope that help :)
    REGARDS,
    RaHuL

Maybe you are looking for

  • Writing selections in  alv list header

    Hi, in alv list header i have to show the values entered in selection screen. ex. Current year    : 2008 current period  : 03 report ID          : R_123 company code : I BT  AA to BB                         I BT  CC to DD                         I EQ

  • Handling Enter Key in Editable ALV Grid using REUSE_ALV_GRID_DISPLAY

    Hello All, I have seen a number of threads on captioned issue and everyone of them say to create FCODE for Enter in the Screen's PF Status and then handle the event. But the catch is when you hit Enter key in ALV Grid, it will not trigger any FCODE a

  • Apps not installing... help?

    I found that I haven't been able to upgrade my apps or download new apps since yesterday. This has happened before and a reset settings worked, yet this time it doesn't... The only way I the apps to finish upgrading is to go on iTunes or use my wifi

  • Latency Delay X

    I have a SERIOUS problem. I run a recording studio, a small one. I have an artist who has recorded 2 out of 8 songs for an album that I have been paid to produce. I use Sonar 4 (cakewalk) for recording. I now have out of nowhere a delay in my sound t

  • How to list referenced graphics and their captions

    The book contains a slew of referenced graphics, which I can of course list with a LOR. Most of the graphics are followed by a caption, and I can list the captions with a LOF or a LOP. However - it would be really handy, for this project, to have a c