SSRS exporting to excel from Report Viewer is not respecting boolean critera
Symptom:
What's happening is that we are selecting a
set of criteria eg: start date, drop down filter and a bit field.
After running the report against this criteria it comes up in the report viewer with the correct results.
However after we export the current results to Excel the results in Excel are different because it seems
that exporting
re-ran the report without the selected bit field when SSRS should have taken the current run and converted it. This isn't happening on all bit fields either
which is the oddest part. However all of the bit parameters are setup the same in the RDL.
We're Loading the report into and rendering it in the Report Viewer control and then leveraging the Report Viewer's Render Routine to export on a button click.
The result to Excel.
<asp:imagebutton
ImageUrl="/Images/excel.png"
id="btnExportExcel"
runat="server"
ToolTip="Export to Formatted Excel"
Height="20"
Width="20"
/>
...logic to setup the out parameters in the Render routine.
bytes = ReportViewer1.ServerReport.Render("EXCEL",
Nothing, mimeType, encoding, extension, streamids, warnings)
Response.Buffer =
True
Response.Clear()
Response.ContentType = mimeType
Response.AddHeader("content-disposition",
"attachment; filename=" & ReportViewer1.ServerReport.ReportPath.Split("/")(2) &
"." + extension)
Response.BinaryWrite(bytes)
Response.Flush()
Response.End()
I wanted to know if anyone has seen this odd behavior and if there's situation where the server would re-render the report when exporting to a particular format? I would also like to add that no errors
came up either.
Report Viewer 2008
ProductVersion
FileVersion FileName
10.0.30319.1
10.0.30319.1 ...\Microsoft.ReportViewer.Common.dll
10.0.30319.1
10.0.30319.1 ...\Microsoft.ReportViewer.WebForms.dll
Report Server
SQL Server 2008 R2
Report Server Version
Microsoft SQL Server Reporting Services Version 10.50.2769.0
2008 RDL's
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
Similar Messages
-
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 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 -
Problem with Export to Excel from ALV view.
Hello @all,
i have a problem on my webdynpro application. I use the component SALV_WD_TABLE. I become display my data but when i want to export the table to ecel, i became a short dump with the message in the browser: Access via 'NULL' object reference not possible.
When i look at ST22. The system show this text.
What happened?
Error in the ABAP Application Program
The current ABAP program "CL_SALV_WD_A_MODEL_TABLE======CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was no
caught in
procedure "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)
was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
You attempted to use a 'NULL' object reference (points to 'nothing')
access a component (variable: "LR_HEADER").
An object reference must point to an object (an instance of a class)
before it can be used to access components.
Either the reference was never set or it was set to 'NULL' using the
CLEAR statement.
How to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"OBJECTS_OBJREF_NOT_ASSIGNED" "CX_SY_REF_IS_INITIAL"
"CL_SALV_WD_A_MODEL_TABLE======CP" or "CL_SALV_WD_A_MODEL_TABLE======CM0
"IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
The exception must either be prevented, caught within proedure
"IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)", or its
possible occurrence must be declared in the
RAISING clause of the procedure.
To prevent the exception, note the following:
Information on where terminated
Termination occurred in the ABAP program "CL_SALV_WD_A_MODEL_TABLE======CP" -
in "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD".
The main program was "SAPMHTTP ".
In the source code you have the termination point in line 19
of the (Include) program "CL_SALV_WD_A_MODEL_TABLE======CM030".
The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
procedure "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)", but
it was neither handled locally nor declared
in the RAISING clause of its signature.
The procedure is in program "CL_SALV_WD_A_MODEL_TABLE======CP "; its source
code begins in line
1 of the (Include program "CL_SALV_WD_A_MODEL_TABLE======CM030 ".
Source Code Extract
Line SourceCde
1 method if_salv_bs_model_column~get_header_bind_ddic_field.
2
3 data:
4 ls_column type if_salv_bs_model_columns=>s_type_column.
5
6 ls_column = me->if_salv_bs_model_columns~get_column( column ).
7
8 *... get column
9 data:
10 lr_column type ref to cl_salv_wd_column.
11
12 lr_column ?= ls_column-r_column.
13
14 data:
15 lr_header type ref to cl_salv_wd_column_header.
16
17 lr_header = lr_column->get_header( ).
18
>>>>> value = lr_header->get_ddic_binding_field( ).
20
21 endmethod.
i hope anybody can help me.
Regards
ChrisDear
How you resolved this issue please let us know.
Thanks -
Reports built in CR Developer - Exporting to Excel through Crystal Viewer XI
Post Author: Screenpoet
CA Forum: Other
I'm not sure if this is the right forum for this question - so if not - please let me know. Currently we build small reports in Crystal Developer XI. As we only have this type of license (and only 2 of them), we only share reports to our end-users by having them install the Crystal Viewer XI application. Our users are indicating that they can open the reports, but when they export to Excel, the column headings are not exporting with the data. We also tried exporting in PDF and RTF format and the column headings do export. Any insight on why the Excel export would not bring in the column headings?Upgrade to CR XI R2 for free and test again
-
Hi
I want to be able to export the output of oracle*report in excell, but i want to export only some colunn/data not the entire data
Can someone help me
tks
alei've not to develop reports as new , my reports are already developed.
I need a generic way to apply in oracle*report to choose data to be exported in excell. So i 've not to modify the source of my reports
tks
Ale -
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,
TomHi,
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 FaisalAlternatively 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 -
I need to invoke Excel from Reports 3.0.
I need to invoke Excel from Reports 3.0. I need to insert into
Excel Data which is output of a report. Can someone help me with
a sample code of how we can invoke Excel and Get data.
Thanks in Advance
RaviRavi,
The Forms Demos include an example of how to do this.
It will be easy to adapt to Reports (the OLE2 built-ins are the
same).
Also, Reports 3.0 is quite old and not supported anymore.
Hope this helps,
Pedro
[email protected] -
Exporting filterded data from a view to excel
I have a requirement, where i have to export data from a list to excel after applying some filter to it.
Say i filter the view by selecting employee dept="Teaching", now i want to export only the filtered rows to excel.
Is there any way to achieve this.
Thanks in advance.Hi,
You can create a view with required filters. Then you can export to excel after switching on to filtered view.Refer following link to create filtered view.
http://office.microsoft.com/en-in/sharepoint-workspace-help/create-view-filters-in-a-lists-tool-design-in-sharepoint-workspace-2010-HA010336352.aspx
Hope it helps!
Avni Bhatt -
Export and Print icons missing from report viewer
I'm currently embedding crystal within a wicket application in which I'm making use of the getHtmlContent() method to retrieve the report's HTML. For whatever reason, I'm not able to get either the export or print icons (on the top left side of the viewer). Is this because I'm using the getHtmlContent() method or do I have something misconfigured somewhere? Setting the setHasExportButton(true) and setHasPrintButton(true) on the report viewer object has no effect.
If I run the same report using the generated JSP outside of my application (within tomcat), I see the export/print buttons. I notice the JSP makes use of the processHttpRequest() method. Any help will be greatly appreciated.
Thanks!
LouisHi Louis
- The getHtmlContent() method handles the user's request to generate the HTML for the report and returns the HTML as a String.
Note: Either the getHtmlContent method or the processHttpRequest method can be used to handle the user's request to generate the HTML for the report, depending on how you write your JSP. If the viewer's content is displayed more than once, then the getHtmlContent method is more efficient, because the request is processed once and the resulting HTML string can be used multiple times. In this case, you must set the content type of the HTML, as recommended in the table. Additionally, using getHtmlContent sets setOwnPage to false and disables exporting and printing.
- The setOwnPage(true) and processHttpRequest() method should be used if you want the export and print button to appear in the report viewed through Crystal Report Viewer.
Following is the snippet of code which shows you how to use these 2 methods.
//Get the IReportSource object from sesion and pass it to the viewer
IReportSource reportSource = (IReportSource)session.getAttribute("reportSource");
Create the viewer and render the report -
//create the CrystalReportViewer object
CrystalReportViewer oCrystalReportViewer = new CrystalReportViewer();
//set the reportsource property of the viewer
oCrystalReportViewer.setReportSource(reportSource);
//set viewer attributes
oCrystalReportViewer.setOwnPage(true);
oCrystalReportViewer.setOwnForm(true);
//set the CrystalReportViewer print mode
//oCrystalReportViewer.setPrintMode(CrPrintMode.ACTIVEX);
oCrystalReportViewer.setPrintMode(CrPrintMode.PDF);
//process the report
oCrystalReportViewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
Hope this helps you .
Thanks
Soni -
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... RgdsManojSage is an OEM partner. For any database issues please ask Sage for assistance.
-
Hi all,
I need to export my report to the plain text. This option is available in designer (2008), but it is not in the viewer. Any idea how to export the report to txt from the viewer?Hi Zilla
We are using the cr2008 .net viewer and we do not have any text export options.
Are there dll for text export that can be installed on a machine where the viewer is called from
The viewer is called from a vb .net gui
Best regards
Patrick
PS Sorry to jump in on this one without a solution -
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
YagnaThank 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...
Maybe you are looking for
-
Can you help me understand the use of the word POSITION in TR and CFM?
Hi, I am trying to have a view of typical BI reports in TR and TM/CFM so through my research I came to the following link:. http://help.sap.com/saphelp_nw2004s/helpdata/en/62/08193c38f98e1ce10000000a11405a/frameset.htm My problem on this link and oth
-
Business Planning is not working in Portal BI iviews
it give me error of JCO . SLD is fine, and JCO is configured but it still does not work. help me please
-
Exclamation mark comes up instead of image to edit - why?
When double clicking an image to edit, some images appear as blank dark grey screens with an exclamation mark in the middle so can't be edited. Others open up normally.I think this has happened since I updated to iPhoto 6.0.6 but can't be sure. Is th
-
URLClassLoader - loading classes inside of JAR archives
Hi. I'm trying to load get an instance of a class inside of a JAR file. I have: try URLClassLoader urlcl = new URLClassLoader(new URL[] { new URL("file://C:/Documents and Settings/Owner/My Documents/Eclipse Java IDE Work/temp
-
NodeManager Remote Start and the -classic flag
I've defined a Server and configured Remote Start configuration settings. However, I have need to pass the -classic flag in the arguments. This flag prevents the process from starting. Error follows: Unrecognized option: -classic -Xmx256m -Dweblogic.