Using servelet to output excel

Hi
im trying to use servelt to output the existing excel sheet. iv used
response.setContentType("application/vnd.ms-excel");
          response.setHeader("Content-disposition","attachment;filename="+filepath);
The problem is i wonder how i can export the data from the existing file.
thanx
mmantee

Jakarta POI make that MicroSoft format file.
http://jakarta.apache.org/poi/
above url is Jakarta POI site.
Good luck~!! ^^

Similar Messages

  • Use desformat=spreadsheet output Excel,print percent setting not 100%,why?

    In version 10.1.2
    use desformat=spreadsheet output excel,
    Open the excel file,and print view,the print percent lower 100%,
    how to set report file,make output excel print view 100%?
    thanks for any help!
    lind

    Be sure you put the heading the same size as your column because otherwise it will not insert the diffent columns in seperate columns in excell

  • Use desformat=spreadsheet output excel,number fields can not right align

    overview and PDF right align,it's ok.but excel all field left align.
    why?

    Be sure you put the heading the same size as your column because otherwise it will not insert the diffent columns in seperate columns in excell

  • Scheduling a report with output (excel) to file location

    Able to schedule a webi report and output format to excel and destination to file location.
    Report is running at scheduled time/interval and writing the output excel file onto file location on BO server. The issue is, its creating the file extension in uppercase (ex: testfile.XLS). Is there a way to control the file extension to be lowercase.
    Also tried to force "testfile.xls" (with extension in lowercase) in the instance title of report scheduler but still creating extension with uppercase (ex: testfile.XLS).
    Any pointers ??
    Environment - BO XIR3.1

    Hi,
    I believe you can do this by switching the view to Excel and turning off the use job server defaults. You can then enter the name and extension as well as the destination folder.
    Regards
    Alan

  • On cleanuing up COM object when using Microsoft.Office.Interop.Excel

    When using Microsoft.Office.Interop.Excel the COM objects that are created by the code must be released using System.Runtime.InteropServices.Marshal.ReleaseComObject().
    Most of the time it's pretty clear when a new COM object is created such as:
    Excel._Application excelApp = null;
    Excel._Workbook wb = null;
    Excel._Worksheet ws = null;
    Excel.Range newRange = null;
    try
    // four COM objects are created below
    excelApp = new Excel.Application();
    wb = excelApp.Workbooks.Add();
    ws = (Excel.Worksheet)wb.Worksheets.Add();
    newRange = (Excel.Range)ws.Range["A1","A30"];
    // do these line of cod create new COM object?
    newRange.Font.Bold = true;
    newRange.Borders.Color = borderColor;
    finally
    if (excelApp != null) Marshal.ReleaseComObject(excelApp)
    if (wb != null) Marshal.ReleaseComObject(wb)
    if (ws != null) Marshal.ReleaseComObject(ws)
    if (newRange != null) Marshal.ReleaseComObject(newRange)
    In the above code I create four COM objects in the first part that need to be released when I'm finished with them. But it's not clear if the other two lines of code create a new COM object or not.  If they do then my code needs to look more
    like this:
    Excel._Application excelApp = null;
    Excel._Workbook wb = null;
    Excel._Worksheet ws = null;
    Excel.Range newRange = null;
    Excel.Font fnt = null;
    Excel.Borders bds = null;
    try
    // four COM objects are created below
    excelApp = new Excel.Application();
    wb = excelApp.Workbooks.Add();
    ws = (Excel.Worksheet)wb.Worksheets.Add();
    newRange = (Excel.Range)ws.Range["A1","A30"];
    // do these line of cod create new COM object?
    fnt = newRange.Font
    fnt.Bold = true;
    bds = new newRange.Borders;
    bds.Color = borderColor;
    finally
    if (excelApp != null) Marshal.ReleaseComObject(excelApp)
    if (wb != null) Marshal.ReleaseComObject(wb)
    if (ws != null) Marshal.ReleaseComObject(ws)
    if (newRange != null) Marshal.ReleaseComObject(newRange)
    if (fnt != null) Marshal.ReleaseComObject(fnt)
    if (bds != null) Marshal.ReleaseComObject(bds)
    How can I tell if getting a property creates a new COM object or not?

    Thank you for your replay but I do understand that the font object is a COM object.  What I'm trying to figure out is if a NEW object is created each time I access the font member of a Range object and if I need to call
    Marshal.ReleaseComObject on the font object after using it.
    Most member object of an object are a single instance and each time you access the member you simply get the pointer to that instance. For example:
    using(DataTable dt = new DataTable("Some Table Name"))
    PropertyCollection ep1 = dt.ExtendedProperties;
    PropertyCollection ep2 = dt.ExtendedProperties;
    if (Object.ReferenceEquals(ep1,ep2)) Console.WriteLine("They are the same object");
    else Console.WriteLine("They are different objects");
    The output will be: They are the same object
    On the other hand this:
    Excel._Application excelApp = new Excel.Application();
    Excel._Workbook wb = excelApp.Workbooks.Add();
    Excel._Worksheet ws = (Excel.Worksheet)wb.Worksheets.Add();
    Excel.Range newRange = (Excel.Range)ws.Range["A1","A30"];
    // do these lines of code create new COM object?
    Excel.Font ef1 = newRange.Font;
    Excel.Font ef2 = newRange.Font;
    if (Object.ReferenceEquals(ef1,ef2)) Consloe.WriteLine("They are the same object");
    else Consloe.WriteLine("They are different objects");
    The output will be: They are different objects
    It looks like each time I access the font member I get a new object.  I suspect that is not the case and what I am getting is two pointers to the same object and the reference counter is incremented by one.
    So really the question is what happens to the font member object of the Range object when the range object is released.  I assume the font member will be released along with the Range object ever if the font object has a reference count greater then
    0.
    If I am correct in my assumption then I can access the font member object as much as I need to without worrying about releasing it.
    I have been reading a lot about working with COM and the need to use Marshal.ReleaseComObject and there does seem to be a lot of disagreement and even confusion on the
    mater about when and if COM objects need to be explicitly released.

  • Web Analysis Problem using the "Send to Excel" service

    I built reports using WebAnalysis 9.3.0.
    I attached the "Send to Excel" service button to my report. I am using a combination of Excel 2003 & 2007.
    I have the following settings in my webanalysis.properties file:
    MaxDataCellLimit=200000
    XLExportMaxRows=60000
    XLExportMaxColumns=200
    My problem is when I try to use the "Send to Excel" button. For "small" reports Excel opens quickly with my report information. Small being around 1,000 rows and 20 columns. If I add more rows, say another 400 or so - Excel never opens with my report information. Web Analysis sits there for about 5 minutes or so and does nothing. After that I can start using WA again - but no report in Excel.
    I get the same result by right clicking on the report in WA Studio and selecting "Export Data..."
    Any ideas?
    Thanks!

    Hyperion support suggested I try adding the Excel path to my webanalysis.properties file
    So I now have:
    ExcelPath=D:\\Progra~1\Micros~1\\OFFICE11\\Excel.exe;C:\\Progra~1\Micros~2\\OFFICE11\\Excel.exe
    MaxDataCellLimit=200000
    XLExportMaxRows=60000
    XLExportMaxColumns=200
    ResolveDimSetAliases=false
    Where D:\\Progra~1\Micros~1\\OFFICE11\\Excel.exe is the path to Excel as installed on the server where WA Studio is installed.
    And C:\\Progra~1\Micros~2\\OFFICE11\\Excel.exe is the path to Excel as installed on my laptop.
    This did not correct my problem.
    Am I using the ExcelPath=.... correctly?
    I was not sure this would work since WA Studio successfully starts Excel for "smaller" reports. But I tried it anyway.
    Any ideas?

  • How to send job postings to multiple third party sites using the XML output

    Dear Friends,
    We are Implementing Irecruitment for our client, Client requirement is how can we send job postings to multiple third party sites using the XML output from i-Recruitment
    With regards
    Surya
    .

    Can you be more specific about your Requirement. In General, Please navigate to iRecruitment Recruiter Responisbility.
    Then Select, Setup > Recruiting Sites. Here, you can configure your Third Party Websites information and attach stylesheets. The default mode oracle sends the vacancy information is HR-XML Format.
    If you would like to select more sites information select "Add Another Row".
    Then, you can see this information while "New Vacancy Creation Process".
    iRecruiter.
    Edited by: iRecruiter on Oct 18, 2009 7:43 AM

  • Can I put a SQL query into a bind variable and then use it to output report

    Hi,
    Can I put a SQL query into a bind variable and then use it to output report?
    I want to create a report and an item "text area" (say P1_TEXT) which can let user to input a SQL query(they are all technical users and knows SQL very well). Then, I use a bind variable (that text area) to store the SQL statement. Then, I add a submit button and I want to use the following to output the report:
    select * from (:P1_TEXT);
    Do you think it is possible to do that? Any known limitations for APEX in this area?
    Thanks a lot,
    Angela

    You can, but make sure it's what you really want to do. Make sure you are VERY familiar with SQL Injection. Most people who know what it is, go out of their way to prevent SQL Injection. You're going out of your way to allow it.
    You can try using &P1_TEXT. instead of bind variable syntax. Bind variables are one of the best ways to prevent SQL Injection, which is why it's not working for you.
    Once again, I strongly urge you to consider the implications of your app, but this suggestion should get it working.
    Tyler

  • AC Power stops when using s-video output

    This only happens when using the s-video output. It usually takes about an hour before the ac power adapter stops working then the powerbook switches to battery power.
    For all other times when not using the video output, it would work normally [ i could leave the ac power plugged in for weeks without this problem occuring ].
    Is there a way to fix this when using the s-video output.
    Powerbook G4 1.33 GHz   Mac OS X (10.4.6)  

    If you know someone with another 65W power adapter I would try using it to see if it does the same thing. If it doesn't then you know to buy a new power adapter.

  • Using the DVI output on a NX6200TC-TD card for HDTV projection TV

    Hi,
      I just got a new system on which I have the NX6200TC-TD video card. I am trying to use the DVI output with a DVI-HDMI conversion cable for my HDTV projection TV as a secondary screen. My primary screen is a small 15" LCD. I use teh "Clone" mode to have the same thing on both. Here are my two problems:
    1- The picture on my projection TV is too large for the screen. The icons on the left are only partly visible, and I cannot see the toolbar at the bottom of the screen.
    2- The picture is really blinking. I think this is becaused of the fixed 60Hz refresh rate?
    I tried several things with the extended NVidia display settings. One problem I have is that I have difficulty to change the settings on one specific display. It seems like no matter what I do (like selecting the secondary display), the changes are applied to the primary display. Also, when I am using the HDMI input on my TV, I cannot change the display size on the TV (fixed to full screen).
    The resolution on the LCD is 1024 x 768 and the HDTV is in 1080i mode. I tried all other HDTV modes, but it did not fix my problems.
    Any help would be greatly appreciated!
    Benoit

    I see...
    Another solution that would really help would be the ability to easily switch from one screen to the other. I have that on my laptop: special key shortcuts allow to turn off the LCD and turn on the external projector, and it uses pre-defined settings for each screen. Difefrent settings are possible because they are not on at the same time. Is there something like this available with that card?  Would that be a card feature, or a system (motherboard) feature?
      If that is not possible, I would be satisfied if at least I could fix the border problem on the HDTV screen, even thoughthe LCD screen becomes smaller. Is that possible?  Basically I want to make sure I get a good picture on the large screen.
      Thanks!
      Benoit

  • Problem in the output Excel sheet.

    I have a requirement of adding two bands to the existing report.The output sheet is Excel which is off 4 sheets formatted with colors and headings as ouput which is done by calling the XML Classes.
    I am not able to find my two fields which are added in the output excel.
    Please let me know your suggestions.

    check the structures, if you made changes is the correct structure or not...
    make sure data is beeing pulled into you tables before passing to excel FM..

  • Using report scripts in Excel - shameless plug for my blog

    I finished the second installment of my Blog, Using Report Scripts in Excel. It can be found at:
    http://glennschwartzbergs-essbase-blog.blogspot.com/

    Thank you Glenn! I just started to look into report script though we've had the tool for years. And look forward to your next installment.

  • How to use ActiveX Microsoft Office Excel Chart?

    Does anyone know how to use "ActiveX Microsoft Office Excel Chart" from CVI 7.0? I tried with following code but it did not draw anything.
    HRESULT MakeChartInExcelActivexCtrl(void)
    HRESULT error = 0;
    char szErrMsg[256];
    // Create a new chart with its own worksheet
    // ExcelRpt_ChartNew(workbookHandle,-1,&chartsheetHandle);
    SetWaitCursor (1);
    // Open new Range for Worksheet
    error = CA_VariantSetCString (&MyCellRangeV, EXCEL_ARRAY_OF_CELLS);
    error = Excel_WorksheetRange (ExcelWorksheetHandle, NULL, MyCellRangeV, CA_DEFAULT_VAL, &ExcelRangeHandle);
    CA_VariantClear(&MyCellRangeV);
    if (error<0)
    CA_GetAutomationErrorString(error, szErrMsg, sizeof(szErrMsg) );
    goto Error;
    error = Excel_GetProperty (excelChart, NULL, Excel_WindowActiveChart, CAVT_OBJHANDLE, &ExcelChartHandle);
    if (error<0)
    CA_GetAutomationErrorString(error, szErrMsg, sizeof(szErrMsg) );
    goto Error;
    // Create a XY scatter chart using the data we wrote to the worksheet as its data source.
    error = ExcelRpt_ChartWizard(ExcelChartHandle, ExcelWorksheetHandle, EXCEL_ARRAY_OF_CELLS,
    ExRConst_GalleryXYScatter, ExRConst_Columns, 0, 0, 0, 0, "Filtered Data Chart", "",
    "Weather Data", NULL);
    if (error<0)
    CA_GetAutomationErrorString(error, szErrMsg, sizeof(szErrMsg) );
    goto Error;
    // Change the plot lines to not display markers and smooth out
    // the plot lines. This is one of the plot styles available in Excel.
    error = ExcelRpt_SetChartAttribute (ExcelChartHandle, ER_CH_ATTR_CHART_TYPE, ExRConst_XYScatterSmoothNoMarkers);
    if (error<0)
    CA_GetAutomationErrorString(status, szErrMsg, sizeof(szErrMsg) );
    goto Error;
    Error:
    SetWaitCursor (0);
    CA_VariantClear(&MyCellRangeV);
    CA_VariantClear(&MyVariant);
    ClearObjHandle (&ExcelRangeHandle);
    ClearObjHandle (&ExcelChartHandle);
    ClearObjHandle (&ExcelChartObjHandle);
    ClearObjHandle (&ExcelChartsHandle);
    if (error < 0)
    ReportAppAutomationError (error);
    return 0;
    Attachments:
    excelActivexCtrl.zip ‏4692 KB

    I use C:\Program Files\National Instruments\CVI90\toolslib\activex\excel\excelreport.fp to  build/modify excel report.there is very detail configuration in this function moudule , hope it can help you 
    Sonic
    Diffrent Strokes for Different Folks

  • [SOLVED] How to use the HDMI output of my laptop (Openbox)

    Hi everyone
    I use ArchLinux along with Openbox, PcManFM, LXterminal (no desktop environment) on my Asus X52F (CPU/GPU = Intel core i3-350M).
    I'd like to be able to use my HDMI output to watch movies on my TV.
    When I used it with Ubuntu/Linux Mint, the HDMI output worked out of the box when I pressed Fn+F8 on my keyboard, but now it doesn't anymore.
    I guess some packages or configuration are missing, because my others multimedia keys (Fn+Fx) to control the brightness of the screen, sound volume... are working, but since I didn't find anything on the wiki, I'm asking you.
    Thank you ;]
    EDIT: Arg, wrong section, sorry
    Last edited by Lowra (2012-02-13 22:26:28)

    What I did to solve it:
    - Installed "lxrandr" from the official repo
    - Configured Openbox to launch lxrandr when I pushed Fn+F8.
    Now, If I want to watch something on my TV through HDMI:
    1) Push Fn+F8
    2) Tick the HDMI button under lxrandr, and click Apply
    3] Enjoy :]

  • KMS using wrong video output

    Hi all,
    I have a Zenbook Prime and used it in dual screen mode via its HDMI output yesterday with xrandr. I unplugged the cable, conditnued using it, stopped it.
    Now when I start it, as soon as initramfs finished loading, Linux uses the HDMI output to display my tty (even if no cable is plugged), so it prompts for my username on the HDMI output and the screen of my laptop becomes black. All the boot sequence up to this part is made on the correct screen but then this screen is not used anymore by linux. Even if with xrandr I try to use it I stays black. I can still control backlighting but nothing is displayed.
    After some research, it appears that this decision is made by KMS (https://wiki.archlinux.org/index.php/Ke … de_Setting). When I disable KMS with nomodeset my tty is displayed on the laptop screen. The problem is that my graphic driver (intel) requires KMS to be enabled and thus prevents me from starting the X server without KMS.
    So what I tried then is to force KMS to use my integrated screen instead of the HDMI output, with the video= parameters on the kernel command line. With these parameters I succeeded to disable the HDMI output, but could not enable mine with parameters like
    video=HDMI-A-1:d video=eDP-1:1920x1080 D video=DP-1:1920x1080 D. So all my screens are black.
    Also, if I plug a archiso usb key it starts its tty on the correct screen.
    Any idea on how to debug better/fix this problem? I tried dmesg but see no interesting information about KMS...
    Olivier
    Last edited by jolivier (2013-07-31 12:55:08)

    Ok I found this topic https://bbs.archlinux.org/viewtopic.php?id=167314, apparently my problem is related to theirs and is due to the 3.10 linux kernel. I thought this forum content was indexed by google but apparently not ^^, next time I'll also search here.

Maybe you are looking for