Creating excel sheet from pl/sql
Hi,
I need to generate an excel sheet and write the result of a query into it from pl/sql .
Is it possible?
any idea pls.
cheers
RRK
You can use the following method --
Write the following code in the emp.sql
set serveroutput on
set verify off
set feedback off
set long 400000
set pagesize 0
set lin 1000
set markup html on spool on
spool c:\Emp.xls
select *
from emp;
spool off
set markup html off spool off
set verify on
set feedback onAnd, then run it with the following command and see-
satyaki>
satyaki>select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
PL/SQL Release 9.2.0.6.0 - Production
CORE 9.2.0.6.0 Production
TNS for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production
NLSRTL Version 9.2.0.6.0 - Production
satyaki>
satyaki>
satyaki>@C:\emp.sql;
<p>
<table border='1' width='90%' align='center' summary='Script output'>
<tr>
<th scope="col">
EMPNO
</th>
<th scope="col">
ENAME
</th>
<th scope="col">
JOB
</th>
<th scope="col">
MGR
</th>
<th scope="col">
HIREDATE
</th>
<th scope="col">
SAL
</th>
<th scope="col">
COMM
</th>
<th scope="col">
DEPTNO
</th>
</tr>
<tr>
<td align="right">
7369
</td>
<td>
SMITH
</td>
<td>
CLERK
</td>
<td align="right">
7902
</td>
<td>
17-DEC-80
</td>
<td align="right">
800
</td>
<td align="right">
</td>
<td align="right">
20
</td>
</tr>
<tr>
<td align="right">
7499
</td>
<td>
ALLEN
</td>
<td>
SALESMAN
</td>
<td align="right">
7698
</td>
<td>
20-FEB-81
</td>
<td align="right">
1600
</td>
<td align="right">
300
</td>
<td align="right">
30
</td>
</tr>
<tr>
<td align="right">
7521
</td>
<td>
WARD
</td>
<td>
SALESMAN
</td>
<td align="right">
7698
</td>
<td>
22-FEB-81
</td>
<td align="right">
1250
</td>
<td align="right">
500
</td>
<td align="right">
30
</td>
</tr>
<tr>
<td align="right">
7566
</td>
<td>
JONES
</td>
<td>
MANAGER
</td>
<td align="right">
7839
</td>
<td>
02-APR-81
</td>
<td align="right">
2975
</td>
<td align="right">
</td>
<td align="right">
20
</td>
</tr>
<tr>
<td align="right">
7654
</td>
<td>
MARTIN
</td>
<td>
SALESMAN
</td>
<td align="right">
7698
</td>
<td>
28-SEP-81
</td>
<td align="right">
1250
</td>
<td align="right">
1400
</td>
<td align="right">
30
</td>
</tr>
<tr>
<td align="right">
7698
</td>
<td>
BLAKE
</td>
<td>
MANAGER
</td>
<td align="right">
7839
</td>
<td>
01-MAY-81
</td>
<td align="right">
2850
</td>
<td align="right">
</td>
<td align="right">
30
</td>
</tr>
<tr>
<td align="right">
7782
</td>
<td>
CLARK
</td>
<td>
MANAGER
</td>
<td align="right">
7839
</td>
<td>
09-JUN-81
</td>
<td align="right">
2450
</td>
<td align="right">
</td>
<td align="right">
10
</td>
</tr>
<tr>
<td align="right">
7788
</td>
<td>
SCOTT
</td>
<td>
ANALYST
</td>
<td align="right">
7566
</td>
<td>
19-APR-87
</td>
<td align="right">
3000
</td>
<td align="right">
</td>
<td align="right">
20
</td>
</tr>
<tr>
<td align="right">
7839
</td>
<td>
KING
</td>
<td>
PRESIDENT
</td>
<td align="right">
</td>
<td>
17-NOV-81
</td>
<td align="right">
5000
</td>
<td align="right">
</td>
<td align="right">
10
</td>
</tr>
<tr>
<td align="right">
7844
</td>
<td>
TURNER
</td>
<td>
SALESMAN
</td>
<td align="right">
7698
</td>
<td>
08-SEP-81
</td>
<td align="right">
1500
</td>
<td align="right">
0
</td>
<td align="right">
30
</td>
</tr>
<tr>
<td align="right">
7876
</td>
<td>
ADAMS
</td>
<td>
CLERK
</td>
<td align="right">
7788
</td>
<td>
23-MAY-87
</td>
<td align="right">
1100
</td>
<td align="right">
</td>
<td align="right">
20
</td>
</tr>
<tr>
<td align="right">
7900
</td>
<td>
JAMES
</td>
<td>
CLERK
</td>
<td align="right">
7698
</td>
<td>
03-DEC-81
</td>
<td align="right">
950
</td>
<td align="right">
</td>
<td align="right">
30
</td>
</tr>
<tr>
<td align="right">
7902
</td>
<td>
FORD
</td>
<td>
ANALYST
</td>
<td align="right">
7566
</td>
<td>
03-DEC-81
</td>
<td align="right">
3000
</td>
<td align="right">
</td>
<td align="right">
20
</td>
</tr>
<tr>
<td align="right">
7934
</td>
<td>
MILLER
</td>
<td>
CLERK
</td>
<td align="right">
7782
</td>
<td>
23-JAN-82
</td>
<td align="right">
1300
</td>
<td align="right">
</td>
<td align="right">
10
</td>
</tr>
<tr>
<td align="right">
9898
</td>
<td>
Erwin
</td>
<td>
Adventur
</td>
<td align="right">
7369
</td>
<td>
17-AUG-07
</td>
<td align="right">
5000
</td>
<td align="right">
230
</td>
<td align="right">
20
</td>
</tr>
<tr>
<td align="right">
7006
</td>
<td>
Gopal
</td>
<td>
Player
</td>
<td align="right">
7369
</td>
<td>
17-AUG-07
</td>
<td align="right">
5000
</td>
<td align="right">
230
</td>
<td align="right">
20
</td>
</tr>
</table>
<p>
satyaki>Regards.
Satyaki De.
Similar Messages
-
Genarating Excel sheets from PL/SQL
Hi all,
I have to genarate an excel sheet from the PL/SQL.Simply need to send the oracle data into Excel sheet Using PL/SQL.Could you give anyidea to do that ?
Thanks in Advance
Srikanth,PonakalaI'm still learning but I can give an answer a go :) Excel will take in numerous formats, comma delimited etc, so if you use the spool function capturing the output using cursors.. something like..
spool excelfile
declare
cursor c1 is
select foo,foo2
from bar
where foo = 'foo';
c1_rec c1%rowtype;
begin
if not c1%isopen then
open c1;
end if;
fetch c1 into c1_rec;
while c1%found loop
dbms_output.put_line(c1_rec.foo || ',' || c1_rec.foo2);
fetch c1 into c1_rec;
end loop;
close c1;
end;
spool off;
the spool will create a excel.lst file on your hdd (hopefully) ;)
The file can then be imported into excel simply enough. Change the delimiter to something a bit more unique if your data has commas spattered in it :]
Regards,
Anthony... -
Writing to Excel Sheet from pl*sql
hi,
i want to create file .xls from pl*sql but i don't want it to be in slk or csv format as i want to 've rows with background color & these fromats doesn't support this
thanks in advancei'm trying to call java function from pl*sql
THIS IS MY CLASS WHICH CALL jexcel API jar :
package ExcelGenPackage;
import java.io.File;
import java.io.IOException;
import java.lang.Number;
import java.util.Date;
import jxl.*;
import jxl.write.*;
public class ExcelGenClass
public ExcelGenClass()
* @param args
public static void main(String[] args)
ExcelGenClass excelGenClass = new ExcelGenClass();
Write_XLS();
public static void Write_XLS()
try
WritableWorkbook workbook = Workbook.createWorkbook(new File("C:\\output.xls"));
WritableSheet sheet = workbook.createSheet("First Sheet", 0);
Label label = new Label(0, 2, "A label record");
sheet.addCell(label);
Label label1 = new Label(0, 4, "A Second label record ");
sheet.addCell(label1);
// All sheets and cells added. Now write out the workbook
workbook.write();
workbook.close();
catch (JXLException e)
System.out.println("JXLException ");
catch (IOException e)
System.out.println("IOException ");
I Load the jar & the class into pl*sql
then i add wrapped procedure
PROCEDURE Test_Proc AS LANGUAGE JAVA
NAME 'ExcelGenPackage.ExcelGenClass.Write_XLS()';
when i call Test_Proc
i got this exception
Io exception: End of TNS data channel -
Problem while creating Excel sheet from TSQL
Hi,
I am trying to create an excel sheet using tsql in production server, script is running without any error however when i am trying to open the excel file it is giving an error that may be the file is corrut or in used by some other process or is read
only.
Same script is running fine on test server and i am able to open it. i am having SYSADMIN rights on both the servers.
i think there are some OLE DB driver issue.
using TSQL (SP_OA.... procedures) to create the excel file.
System information:
OS: 64 bit; SQL Server 2005: 32 Bit; Office 2010: 32 Bit.
Can any one help me?
ThanksMight be a stretch but your situation looks like one I encountered earlier. Are you running this in a SSIS? Your office is 32 bits but your OS is 64 bits, when running a SSIS from the agent under a 64 bit system and accessing and access
a 32 bit driver, you must check the option to "Use 32 bit runtime" under execution option.
If this is not the case, I would look for an option to execute in 32 bit mode or see if there are available 64 bits drivers. -
Creating Excel Workbook from PL/SQL Procedure
I am trying to create Excel Workbook with two worksheets from PL/SQL procedure. I created one worksheet. Can I create a separate sheet from same procedure. I used OWA_UTIL.MIME_HEADER ('application/vnd.ms-excel', FALSE)
command to create the spreadsheet.
Any help would be helpful.
Thanks
Yagna ShahFurther to my previous post here is how I will develop a typical master details excel report.
by using the package,
It will also show sum of salary at each department.
Note : When I paste the code here I loose the indentation. So the code below is not indented properly.
DECLARE
r NUMBER := 0 ; --- r IS the ROW NUMBER IN this excel file
l_sum NUMBER ;
BEGIN
--- Generate the styles that we need
gen_xl_xml.create_excel( 'UTL_DIR','master_Detail.xls') ;
gen_xl_xml.create_style( 'dept_title' , 'Arial', 'Red',14, p_backcolor => 'LightGray' );
gen_xl_xml.create_style( 'sgs2' , 'Arial', NULL ,10, p_bold => TRUE );
gen_xl_xml.create_style( 'sgs3' , 'Arial', 'blue',14 );
gen_xl_xml.create_style( 'sgs4' , 'Arial', 'green',14 );
gen_xl_xml.create_style( 'emp_title' , 'Arial', 'Black',9, p_backcolor => 'LightBlue' );
gen_xl_xml.create_style( 'sal_tot' , 'Arial', 'Brown',13, p_backcolor => 'Yellow' );
-- SET ANY COLUMN AND ROW changes
gen_xl_xml.set_column_width( 3, 145 );
gen_xl_xml.set_column_width( 4, 145 );
l_sum := 0 ;
FOR recd IN ( SELECT department_id, department_name FROM departments ) LOOP
IF l_sum <> 0 THEN
r := r +1 ;
gen_xl_xml.write_cell_char( r, 4, 'Department Total ->' , 'sal_tot' );
gen_xl_xml.write_cell_num( r, 5, l_sum , 'sal_tot' );
l_sum := 0;
END if ;
r := r+1 ;
gen_xl_xml.write_cell_CHAR( r,1, 'Department : '|| recd.department_name , 'dept_title' );
-- As we need same style applied till the above data flows use write_cell_null
gen_xl_xml.write_cell_NULL( r,2 , null );
gen_xl_xml.write_cell_NULL( r,3, 'dept_title' );
gen_xl_xml.write_cell_NULL( r,4, 'dept_title' );
gen_xl_xml.write_cell_NULL( r,5, 'dept_title' );
--- Add employee heading
r := r+1 ;
gen_xl_xml.write_cell_CHAR( r,2, 'EmployeeID' , 'emp_title' );
gen_xl_xml.write_cell_CHAR( r,3, 'First Name' , 'emp_title' );
gen_xl_xml.write_cell_CHAR( r,4, 'Last Name' , 'emp_title' );
gen_xl_xml.write_cell_CHAR( r,5, 'Salary' , 'emp_title' );
FOR rec IN (SELECT employee_id , first_name , last_name, salary FROM employees WHERE department_id = recd.department_id ) LOOP
r := r+1 ;
gen_xl_xml.write_cell_num( r,2, rec.employee_id, 'sgs2' );
gen_xl_xml.write_cell_char( r,3, rec.first_name, 'sgs3' );
gen_xl_xml.write_cell_char( r,4, rec.last_name , 'sgs4' );
gen_xl_xml.write_cell_num( r,5, rec.salary );
l_sum := l_sum + rec.salary ;
END LOOP ;
END LOOP ;
gen_xl_xml.close_file ;
END ;
----------------------------------------------------------------------------------------------------------------- -
Reading excel sheet from out side of the server though sql developer.
Hi ALL,
Is it possible to read the excel sheet from the out side of the oracle server.
If it possible please send me the sample code.Duplicate thread.
Reading excel sheet from local system though sql developer
Also a FAQ
SQL and PL/SQL FAQ -
Hi,
To achieve these are the steps that I had followed :
1. Add the document Library path into Central Admin -> Application Mgmt -> Manage Service App -> Excel Service App -> Trusted File Locations
2. Add Documnet Library link to Trusted Connection Proivder
3. Open Visual Studio as Run as Administrator
4.Create an SharePoint 2013 Empty Project.
5.Add Service Reference : http:\\<server>\_vti_bin/excelservice.asmx
6.Service added successfully
7.Create a class file and add the Service Reference namespace
There is no such class as ExcelService to call.
Please let me know if somebody knows how to open the Excel file into C#(2012) either using ExcelService or any other way to open. I tried old methods of Sharepoint 2010 server but it's not able to access classes.
Requirement is :
Need to read the excel sheet from Document Library and transfer all data into DataTable.
Please help asap.Hi,
This is the forum to discuss questions and feedback for Microsoft Office, I'll move your question to the SharePoint 2013 development forum
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/home?forum=sharepointdevelopment
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
George Zhao
TechNet Community Support -
How to export to excel sheet from Oracle APEX 4.0?
Hello,
I'm relatively new to Oracle APEX. I'm in need of a solution to address the above question. I want to export a report's contents to an excel sheet from Oracle APEX(Priority).
The export should be customizable to add entries into the excel sheet as I need(Secondary). Can anybody help?Checkout this link:
http://technology.amis.nl/2011/02/19/create-an-excel-file-with-plsql/
Thank you,
Tony Miller
Ruckersville, VA -
Modify excel sheet from BDN/GOS and add to sales order
Hello,
Iu2019ve import a excel-template in OAOR (BDN) and now i want to modify the excel-sheet with my own data.
After then I want to put it to a Sales Order (BUS2032).
The excel sheet must indicated in the attachment list of VA02 (GOS).
Which method I must use to copy a existing excel sheet from BDN?
How can i modify my excel sheet from BDS and add to a existing sales order?
Can I set the document write protected?
Can anyone help me or have any examplesu2026
Thanks in advance
Edited by: Thomas Druetschel on Dec 2, 2008 3:20 PMHello,
now i can get a template from BDN and modify the excel sheet. But i want to modify the excel spreadsheet in BACKGROUND ==> have anybody a idea?
And i need the correct method to save the modified document to BDS...
Thanks
i use the following code:
TYPE-POOLS: sbdst.
DATA go_control TYPE REF TO i_oi_container_control.
DATA go_docking_container TYPE REF TO cl_gui_docking_container.
DATA go_document_proxy TYPE REF TO i_oi_document_proxy.
DATA go_excel_iface TYPE REF TO i_oi_spreadsheet.
DATA go_error TYPE REF TO i_oi_error.
DATA gc_exceltype TYPE soi_document_type VALUE soi_doctype_excel_sheet.
DATA gv_retcode TYPE soi_ret_string.
DATA gv_sheetname TYPE soi_string.
DATA gv_inplace TYPE c.
DATA: gv_value TYPE string.
START-OF-SELECTION.
PERFORM open_excel_doc_from_bds
USING
'BUS2032'
'BO'
'0010163117'
PERFORM fill_cell
USING
'TEST123'
'1'
'2'.
==>> Now i want to SAVE the modified Excel Spreadshet to another Sales Order...
*& Form init_excel_proxy
text
-->UV_INPLACE text
FORM init_excel_proxy USING uv_inplace TYPE c.
DATA lv_repid TYPE sy-repid.
DATA lv_dynnr TYPE sy-dynnr.
DATA lv_str TYPE soi_string.
lv_repid = sy-repid.
lv_dynnr = sy-dynnr.
CALL METHOD c_oi_container_control_creator=>get_container_control
IMPORTING
control = go_control
error = go_error.
CREATE OBJECT go_docking_container
EXPORTING
repid = lv_repid
dynnr = lv_dynnr
side = cl_gui_docking_container=>dock_at_bottom
extension = 0.
I don´t want to modify the document in the front*
CALL METHOD go_control->init_control
EXPORTING
r3_application_name = ' '
inplace_enabled = uv_inplace
parent = go_docking_container
IMPORTING
error = go_error.
CALL METHOD go_control->get_document_proxy
EXPORTING
document_type = gc_exceltype
IMPORTING
document_proxy = go_document_proxy.
ENDFORM. " init_excel_iface
*& Form open_excel_doc_from_bds
text
-->UV_CLASSNAME text
-->UV_CLASSTYPE text
-->UV_OBJECTKEY text
-->UV_INPLACE text
FORM open_excel_doc_from_bds USING uv_classname TYPE sbdst_classname
uv_classtype TYPE sbdst_classtype
uv_objectkey TYPE sbdst_object_key
uv_inplace TYPE c.
DATA lt_doc_uris TYPE sbdst_uri.
DATA ls_doc_uri LIKE LINE OF lt_doc_uris.
DATA lt_doc_signature TYPE sbdst_signature.
DATA lv_doc_url TYPE bapiuri-uri.
DATA lv_repid TYPE sy-repid.
DATA lv_dynnr TYPE sy-dynnr.
IF go_document_proxy IS INITIAL.
PERFORM init_excel_proxy USING uv_inplace.
ENDIF.
CHECK NOT go_document_proxy IS INITIAL.
CALL METHOD cl_bds_document_set=>get_with_url
EXPORTING
classname = uv_classname
classtype = uv_classtype
object_key = uv_objectkey
CHANGING
uris = lt_doc_uris[]
signature = lt_doc_signature[]
EXCEPTIONS
nothing_found = 1
error_kpro = 2
internal_error = 3
parameter_error = 4
not_authorized = 5
not_allowed = 6.
IF sy-subrc NE 0 .
MESSAGE 'cl_bds_document_set=>get_with_url error' TYPE 'I'.
EXIT.
ENDIF.
READ TABLE lt_doc_uris INTO ls_doc_uri INDEX 1.
lv_doc_url = ls_doc_uri-uri.
CALL METHOD go_document_proxy->open_document
EXPORTING
document_url = lv_doc_url
open_inplace = uv_inplace
open_readonly = ''
IMPORTING
error = go_error.
IF NOT go_excel_iface IS INITIAL.
FREE go_excel_iface.
ENDIF.
CALL METHOD go_document_proxy->get_spreadsheet_interface
EXPORTING
no_flush = 'X'
IMPORTING
sheet_interface = go_excel_iface
error = go_error.
ENDFORM. "open_excel_doc_from_bds
*& Form fill_cell
text
-->UV_VALUE text
-->UV_COLUMN text
-->UV_ROW text
FORM fill_cell USING uv_value TYPE string
uv_column TYPE i
uv_row TYPE i.
CHECK NOT go_document_proxy IS INITIAL.
CHECK NOT go_excel_iface IS INITIAL.
DATA: lt_ranges TYPE soi_range_list,
lt_contents TYPE soi_generic_table,
ls_contents LIKE LINE OF lt_contents[],
lt_rangesdef TYPE soi_dimension_table,
ls_rangesdef LIKE LINE OF lt_rangesdef.
ls_rangesdef-row = uv_row.
ls_rangesdef-column = uv_column.
ls_rangesdef-rows = 1.
ls_rangesdef-columns = 1.
APPEND ls_rangesdef TO lt_rangesdef.
ls_contents-row = 1.
ls_contents-column = 1.
ls_contents-value = uv_value.
APPEND ls_contents TO lt_contents.
CALL METHOD go_excel_iface->set_ranges_data
EXPORTING
ranges = lt_ranges[]
contents = lt_contents[]
rangesdef = lt_rangesdef[]
no_flush = 'X'
IMPORTING
error = go_error.
ENDFORM. "fill_cell
*& Form get_cell
text
-->UV_COLUMN text
-->UV_ROW text
-->CV_VALUE text
FORM get_cell USING uv_column TYPE i
uv_row TYPE i
CHANGING cv_value.
DATA: lt_ranges TYPE soi_range_list,
lt_contents TYPE soi_generic_table,
ls_contents LIKE LINE OF lt_contents[],
lt_rangesdef TYPE soi_dimension_table,
ls_rangesdef LIKE LINE OF lt_rangesdef.
ls_rangesdef-row = uv_row.
ls_rangesdef-column = uv_column .
ls_rangesdef-rows = 1.
ls_rangesdef-columns = 1.
APPEND ls_rangesdef TO lt_rangesdef.
CALL METHOD go_excel_iface->get_ranges_data
EXPORTING
rangesdef = lt_rangesdef[]
IMPORTING
contents = lt_contents[]
error = go_error
CHANGING
ranges = lt_ranges[].
cv_value = space.
READ TABLE lt_contents INTO ls_contents INDEX 1.
IF sy-subrc = 0.
cv_value = ls_contents-value.
ENDIF.
ENDFORM. "get_cell
*& Form insert_table
text
-->COLUMN text
-->ROW text
-->CT_DATA text
-->ANY text
FORM insert_table USING column TYPE i
row TYPE i
CHANGING ct_data TYPE table any.
CHECK NOT go_document_proxy IS INITIAL.
CHECK NOT go_excel_iface IS INITIAL.
CALL METHOD go_excel_iface->insert_range_dim
EXPORTING
name = 'Table'
top = row
left = column
rows = 1
columns = 1
no_flush = 'X'
IMPORTING
error = go_error.
DATA: lt_fields_table TYPE soi_fields_table.
CALL FUNCTION 'DP_GET_FIELDS_FROM_TABLE'
TABLES
data = ct_data[]
fields = lt_fields_table.
go_excel_iface->insert_one_table(
EXPORTING
data_table = ct_data[]
fields_table = lt_fields_table[]
rangename = 'Table'
no_flush = 'X'
wholetable = 'X'
IMPORTING
error = go_error
ENDFORM. "insert_table= -
Sending an Email by taking excel sheet from Application Server.
Hi.
I Searched in SDN related 'Sending an Email by taking excel sheet from Application Server'.
But i didnt get. I got sending mails from local pc.
Can some bdy provide me sample code how to send mail with an attachment. the attached file should get from Application Server
Regards,
RenuHi,
For writing data to app server from internal table:
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/prog%252bon%252bopen%252bdataset%252binput
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/prog%252bon%252bopen%252bdataset%252boutput
Checkout this wiki for sending XL in mail attachment:
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/multiple%252battachment%252bon%252be_mail
Thanks,
Krishna -
How can i create excel sheet with multiple tabs using utl file?
how can i create excel sheet with multiple tabs using utl file?
any one help me?Jaggy,
I gave you the most suitable answer on your own thread yesterday
Re: How to Generating Excel workbook with multiple worksheets -
How can I download to one excel sheet from more than two table?
Hi.
as you know
<SAP_BW_URL CMD='EXPORT' FORMAT='XLS' DATA_PROVIDER='DATAPROVIDER_T1' >
this script can make download excel sheet which is same cotents of table or chart in web template.
but if template has more than two tables how can we get excel sheet from tables?
<SAP_BW_URL CMD='EXPORT' FORMAT='XLS' DATA_PROVIDER_1='DATAPROVIDER_T1' DATA_PROVIDER_2='DATAPROVIDER_T2'>
I hope this gonna work but result was fail same as I expected.
is there any way put two tables download one excel sheet?Welcome to SDN.
Post this in Business Explorer forum for quicker resposne.
SAP Business Explorer (SAP BEx)
Regards
Raja -
How to get data to excel sheet from background
Hello Experts,
I have be assigned a task where i have to find out all the reports and the variants containing a ' / '. I have written the code where i am able to scan through the entire list and get a set of reports and the variantsin the internal table. NOW i have to run the code in the background and the entire set of reports and the variants in the internal table to the excel sheet . So how do I do this? I am able to get the data in the excel sheet from the foreground using the FM GUI_download. But this FM does not work in the background.
So what should be the ideal way to do this ?
Thanks
AdityaHi,
You can write the file into Application server.
OPEN DATASET dataset FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT it_itab INTO wa_itab.
TRANSFER wa_itab TO dataset.
ENDLOOP.
CLOSE DATASET dataset
use CG3Y transaction to download file from app server to presentation server.
Regards
Sree -
Opening Excel sheet from server
Hi I have one requirement to open Excel Sheet.
The Excel sheet is residing in a directory parallel to WEB-INF. I am using Jboss server in Linux. in UI whenever I click on link I have to open Excel sheet from the server. Before opening Excel sheet I have to fill with some data. i am using JSP/Servlets .
Can any one help me on this?
Guruthis piece of code is just open a xsl file with writing some data on the file
it may be helpful for u .i am giving only logic.
import java.util.*;
import java.io.* ;
import java.text.* ;
public class a{
// Main method
public static void main (String args[])
// Stream to write file
//File file;
FileWriter fout;
String TimeStamp;
try
// Open an output stream
Calendar currentdate= Calendar.getInstance();
int currmonth=currentdate.get(Calendar.MONTH)+1;
String strMonth="";
if(currmonth<10)
strMonth="0"+currmonth;
String wbname="Equifax"+strMonth+currentdate.get(Calendar.YEAR)+".xls";
System.out.println(wbname);
BufferedWriter outfile = new BufferedWriter(new FileWriter(wbname));
//file=new File(filename);
fout = new FileWriter (wbname);
// Print a line of text
TimeStamp = new java.util.Date().toString();
//String filename1=file.getName();
outfile.write(" Apply ");
// Close our output stream
outfile.close();
// Catches any error conditions
catch (IOException e)
System.err.println ("Unable to write to file");
System.exit(-1);
} -
Moving excel sheet from different files to excel template
Hi Everyone,
I need help from you guys.. I want to fetch excel sheet from different files (say for example from 3 excel files) and put in to one template file. If any one have idea regarding this please let me know. Thanks in advance
Thanks & Regards
saamyHii Puneet K & nyc,
Thanks a lot for ur links guys... am already done ...will upload the working code shortly...and am facing some other problem now...when I execute the program in LV 11.0 version its working fine, but when I try to run the same code in LV10.0 (32 bit machine) its showing this error
"Error -2146827284 occurred at Exception occured in Microsoft Office Excel: Excel cannot insert the sheets into the destination workbook, because it contains fewer rows and columns than the source workbook. To move or copy the data to the destination workbook, you can select the data, and then use the Copy and Paste commands to insert it into the sheets of another workbook.Help Path is C:\Program Files\Microsoft Office\Office12\1033\XLMAIN11.CHM and context 0 in copy_excel_worksheet.vi
This error code is undefined. Undefined errors might occur for a number of reasons. For example, no one has provided a description for the code, or you might have wired a number that is not an error code to the error code input.
Additionally, undefined error codes might occur because the error relates to a third-party object, such as the operating system or ActiveX. For these third-party errors, you might be able to obtain a description of the error by searching the Web for the error code (-2146827284) or for its hexadecimal representation (0x800A03EC)."
If you guys know the solution please let me knoe...thanks in advance..
Thanks & Regards
saamy
Maybe you are looking for
-
Editing plug-in settings on the fly...
OK, so I'm starting to get used to this program, starting to grasp the automation. Now, I've been able to save settings onto plugins where I want the plugin set to at certain points. Is there a way for me to, say, instantly set the automation to matc
-
Hw can I generate XY graphs directly in a vector data format for printing ie pdf
A further question re. Printing of Graphs There are many similar questions but none where the answers are acceptably adiquite or two or three were the link was broken, "Developer exchange forums have been moved" and a pointer to the new site, unfort
-
Problem with package while activating append strcuture
Dear team, I am facing one problem while activating appending structure for one CRM Datasource 0DPR_PART_BUPA_LINK. I have created one append structure ZADPR_BW_BUPA_LINKS, while activating it is showing the error like <b>The object TABL ZADPR_BW_BUP
-
Mac login acounts too wide for the screen
The older versions worked just fine, but Lion login account icons run left and right and are too wide for the screen on the macmini. So, I have to scroll to get to my account at the end of the list. Is there a way to change this?
-
Hi Freinds, I m new to JSF and I m looking for some tutorial/article/guide or war file which uses the JSF implementation with tiles. Need urgently. Thanking in advance. regards, Novin