Oracle table data to MS EXcel
Is there is anyway i could transfers an oracle table data to MS EXcel, pls advice
You can also use oracle's com feaatures to achieve this . you can find the com directory in oracle_home/ admin/ora91/com .go through the readme file there and you soon relize , how easy is this ?
hare krishna
Alok
Similar Messages
-
How to Export Table Data to a excel sheet using OPENROWSET
Hi Team,
I would like to Export table data to a excel sheet by using "OPENROWSET" command in SQL Server but I am getting the
below error message
Column name or number of supplied values does not match table definition.
Please help me on how to export the table data to an excel sheet by using "OPENROWSET" in SQL ServerI know this is old so I assume you've fixed this. However, for anyone else looking at this forum, I'd recommend using a union or a table join.
Select a.1, a.2, a.3 from a <where clause>
union
Select b.1, b.2, b.3 from b <where clause>
or
use a type of join.
If both table selects return the same number of columns but different data just reference them as a variable like fred, and Ted
Select fred.1, fred.2, fred.3 from (Select a.1, a.2, a.3 from a) fred
union
Select Ted.1, Ted.2, Ted.3 from (Select b.1, b.2, b.3 from b) Ted
or again some type of join of these two sets
Select * from
(Select a.1, a.2, a.3 from a) a
INNER JOIN (Select b.1, b.2, b.3 from b) b ON b.1 = a.1
This would give you 6 columns of data a1-3, and b1-3
We don't know from your description what format your spreadsheet is in. These just give you the idea. Think of the sub-selects as a Table. It's just named "fred". Once your select holds all the data you need, then export the data to the spreadsheet. Use
the horsepower of the database before trying to do a multple update of the same spreadsheet.
Does this give you enough to fix what you were trying to do? -
Problem with Emailing the Internal table data as an excel attachment
Hi Friends,
I am facing problem with Emailing an internal table data as an excel file. I am using standard function module "SO_NEW_DOCUMENT_ATT_SEND_API1" which is using SOLI structure can have record with 255 character length. But my Internal table having each record means after concatenating all the fields it is going to be morethan 450 characters. so i t is not displaying all the data in excel file.
Can somebody help me if there is any other function module or any other way that i need to follow.
thanks for help
venkat.You must use the the :
CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB as a field seperator and
CL_ABAP_CHAR_UTILITIES=>CR_LF as a record seperator.
Check this example:
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
Regards,
Naimesh Patel -
Exporting table data to MS-Excel Sheet(enhanced Web Dynpro Binary Cache)
Hi experts,
I am trying to implement the functionality of downloading the contents of a webdynpro screen to excel sheet. In order to implement the functionality of excel download i used the following blog.
[/people/subramanian.venkateswaran2/blog/2006/08/16/exporting-table-data-to-ms-excel-sheetenhanced-web-dynpro-binary-cache ]
In this blog they have used javaexcel api to implement the excel functionality. I face some problems
while implementing it.
i) The use of "Label label = new Label(0, 2, "A label record");
sheet.addCell(label); " is not supported. It says that a constructor for label with
(int, int, str) parameter is not available.
ii) Then i implemented it with "Label label = new Label("A label record"); " Then i deployed it. I got a runtime exception saying that " java.lang.ClassNotFoundException: jxl.format.CellFormat ".
This cellFormat is an interface available in the jar. I am using jexcelapi_2_6_9_1.4 version. Do i have to
download some other versions.
Please help. Thanks in advance.
Regards
RamananHi,
Please check the following steps while creating External Library DC:
1) creating an Extneral library DC
2) import the JARs to the libraries folder of the External Library DC project
3) Right-click on each of the JARs imported to the project and add them to the public part.
This DC is now ready to be used as a build-time reference that will allow CBS to build the "main" Web Dynpro application that will use the external libraries. Next, we have to create a new Web Dynpro DC to hold the class files here are the steps:
1) Create a new Web Dynpro DC
2) Create a new public part, selecting the "Can be packaged into other build results" option
3) Rename the JARs as Zip files and extrct the full content (folders and class files) to your root folder
4) Import the folders and files to the src/packages folder
5) Expand the public part node that was created and select the "Entities" node, right-click it and choose Edit
6) In the Entity Type list select the "Folder" option then in the selected entities tree pick each of the folders that you imported in step 5 (above)
7) Now do a DC build and a DC deploy of the project
Then check-in, activate, and release any activities you have associated with creating these two projects. In the DC perspective, refresh the Active DCs and Inactive DCs to ensure that both new DCs appear in the Active list. Now we have to setup the references to these DCs in our main Web Dynpro application. To do this, follow these steps:
1) Open the Web Dynpro perspective and right click the Used DCs node then choose "Add Used DC.."
2) Pick the public part of the External Library DC that we created (first) and set it to have a Build Time dependency
3) Again, right click the Used DCs node and choose "Add Used DC.." then choose the public part of the Web Dynpro DC that we created and give it a Run Time dependecy (weak) and click finish.
4) Now, due to what I think is a bug. You must right click on the Web Dynpro "used DC" that you just added in the previous step, and set the run time dependency again (it seems to revert to the default values for some reason)
5) Now do a DC build and a DC deploy on the "main" web dynpro application.
6) Check-in, activate, and release any activities associated with adding these references and then others on your team may use the classes in the external libraries within the Web Dynpro project.
Regards.
Rajat -
ADF table data export to Excel
I want to export table data into an excel file. I used following code;
<af:exportCollectionActionListener type="excelHTML" exportedId="t1"
filename="export.xls"
title="ADF Faces Export"/>
This works fine, But I have more than 65k lines, which is not supported with xls files. How can I generate xlsx format with ADF ?
JDeveloper 11.1.1.3 is used in my project and can not change this. Any options pls?
Thankschk this
File format of exportCollectionActionListener ADF 11g
The fix has to be done on Excel and instructions are given below:
1- Open your Registry (Start -> Run -> regedit.exe)
2- Navigate to HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\OFFICE\12.0\EXCEL\SECURITY
3- Right click in the right window and choose New -> DWORD
4- Type “ExtensionHardening” as the name (without the quotes)
5- Verify that the data has the value “0″
I tested the above in my home PC with Excel 2007 and fix worked.
There is more aesthetic way to accomplish the fix detailed in (refer group policy section):
http://support.microsoft.com/kb/948615 -
Create flat file from oracle table data
d_adp_num char(10)
d_schd_date char(8)
d_sched_code char(25)
d_pay_code char(50)
d_mil_start char(4)
d_mil_end char(4)
d_duration char(5)
d_site_code char(4)
d_dept_id char(6)
select payroll_id,
schedule_date,
reason_code ,(sched_code)
reason_code, (pay_code)
start_time,
end_time,
total_hours,
site_code,
department_id
from dept_staff
where schedule_date between (sysdate+1) and (sysdate+90)
loading some data instead for the date range.
sched_code - 'Unavailable' if reason_code = 'OD' and 'LA'
pay_code - 'BD Berevevement' if reason_code = 'BD'
'UP Unexcused PTO' if reason_code = 'UP'
'RG' if reason_code = 'SH'
'PTO' if reason_code = 'VA'
these are a few.....
start_time and end_time - convert into military time
based on start_ampm and end_ampm
Based on this, I need help to create a flat file. Attaching sample of flat file and data from dept_staff
If site_code is there then no need to get department_id( see sample flat file)
sample data for flat file
ZZW002324006072012 PTO
0800160008.00
ZZW002428106072012 RG
1015174507.50HM34
ZZW002391606072012 RG
1100193008.50
ZZW002430406072012 RG
1100193008.50 130000
dept_staff table data
PAYROLL_ID SCHEDULE_DATE REASON_CODE REASON_CODE_1 START_TIME START_AMPM END_TIME END_AMPM TOTAL_HOURS SITE_CODE DEPARTMENT_ID
ZZW0024468 6/8/2012 SH SH 730 A 400 P 850 12
ZZW0000199 6/8/2012 SH SH 730 A 400 P 850 14
ZZW0023551 6/8/2012 SH SH 1145 A 930 P 975 GH08 95
ZZW0024460 6/8/2012 SH SH 515 A 330 P 1025 GH08 95
ZZW0023787 6/8/2012 SH SH 630 A 300 P 850 24
ZZW0024595 6/8/2012 TR TR 730 A 400 P 850 90
ZZW0023516 6/8/2012 OD OD 800 A 400 P 800 95
ZZW0023784 6/8/2012 OD OD 800 A 400 P 800 5
ZZW0024445 6/8/2012 SH SH 1145 A 930 P 975 GH08 5
ZZW0024525 6/8/2012 OD OD 800 A 400 P 800 23
ZZW0024592 6/8/2012 TR TR 730 A 400 P 850 5
ZZW0024509 6/8/2012 SH SH 830 A 330 P 700 MK21 95
ZZW0023916 6/14/2012 SH SH 1100 A 730 P 850 27user_anumoses wrote:
Any examples, please provide? Thankshttp://www.lmgtfy.com/?q=oracle+utl_file+example
Handle: user_anumoses
Status Level: Newbie
Registered: Jun 9, 2009
Total Posts: 155
Total Questions: 60 (55 unresolved)
why so MANY unanswered questions? -
Oracle table data to create xml file.
HI all,
i want to create a xml file from table data.
i want to data in below format.
Tag
- <root>
- <ReportValues>
<Value name="Client" value=" Correspondence.manco" />
<Value name="Communication" value="correspondence.deliverby" />
<Value name="Correspondence_Type" value=" correspondence.corrname" />
<Value name="FROM" value="This email address will be based on the email address for the servicing segment the entity is linked to" />
<Value name="REPLYTO" value=" This email address will be based on the email address for the servicing segment the entity is linked to " />
<Value name="MessageId" value=" correspondence.seqno " />
<Value name="RECIPIENT" value=" correspondence.deliveryaddress " />
<Value name="Frommasquerade" value="correspondence.Manco" />
<Value name="Replytomasquerade" value="correspondence.Manco" />
is there any inbuilt function in oracle to do this functionality?
any help appriciated.select xmlelement(name "ReportValues",
xmlagg(xmlelement(name "Value",
xmlattributes(name as "name",value as "value"))))
from tab -
How to show a table data into an excel sheet
Hi
I have a requiremet of generate an excel sheet with the data that is there in the table...
I have an inputfiled ..if i enter data and clicks search the data related to it is displayed in table.here i want to generate an excel sheet with the data that is there in the table
Regards
PadmaHi Rekha,
i have a dout in Exporting Table Data Using On-Demand Streams - SAP NW 7.0 which is the subdivision (B) .
In this he created Excel node with Resource--type(Resource)
ResourceOnDemandStreamCal--type(com.sap.tc.webdynpro.programmodel.api.IWDInputStream)
1)i went to LocalDictonaries and in that com.sap.ide.webdynpro.UiElements--In that i dont have Resource
2)i typed com.sap.tc.webdynpro.programmodel.api.IWDInputStream in native type
but nothing is comm
how to get these types
Regars
Padma -
Exporting Multiple Internal table data to Single Excel file.
Hello Expert,
I want to export more than one internal table data from Web Dynpro Application to single Excel file but in such a way that
each table's data to be get exported to different tabs in (Multiple sheets) that single excel file.
So help me in this matter.
Thank You.
Varun
Moderator message: wrong forum, please post again in "Web Dynpro ABAP".
Edited by: Thomas Zloch on Oct 29, 2010 1:39 PMEach table having different sheet in same CSV file .
A CSV file is a flat file and don't have "Sheets"; you would have to Export to an Excel file, which supports several Sheets in one file.
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Generate XML from Oracle Table Data
Hi All,
I am new to this network. I am also new to oracle XML package. I want a help for the below query.
CREATE TABLE EMP(ID NUMBER PRIMARY KEY, NAME VARCHAR2(10), PHONE NUMBER);
INSERT INTO EMP(ID,NAME,PHONE) VALUES (11,'Joy',1234);
INSERT INTO EMP(ID,NAME,PHONE) VALUES (22,'Mike',5678);
INSERT INTO EMP(ID,NAME,PHONE) VALUES (33,'Jason',NULL);
COMMIT;
I want to export the EMP table data in a XML file with the below format.
Required Output:
<?xml version="1.0" encoding="UTF-8"?><STATICDATA><EMP><ID>11</ID><NAME>Joy</NAME></EMP></STATICDATA>
<?xml version="1.0" encoding="UTF-8"?><STATICDATA><EMP><ID>22</ID><NAME>Mike</NAME></EMP></STATICDATA>
<?xml version="1.0" encoding="UTF-8"?><STATICDATA><EMP><ID>33</ID><NAME>Jason</NAME></EMP></STATICDATA>
I have used some XML functions and have written the below query.
select XMLROOT(XMLELEMENT(staticdata,XMLELEMENT(EMP,XMLELEMENT(ID,ID),XMLELEMENT(NAME,NAME))), version '1.0" encoding="UTF-8') xml FROM EMP;
output of my query:
<?xml version="1.0" encoding="UTF-8"?>
<STATICDATA>
<EMP>
<ID>11</ID>
<NAME>Joy</NAME>
</EMP>
</STATICDATA>
<?xml version="1.0" encoding="UTF-8"?>
<STATICDATA>
<EMP>
<ID>22</ID>
<NAME>Mike</NAME>
</EMP>
</STATICDATA>
<?xml version="1.0" encoding="UTF-8"?>
<STATICDATA>
<EMP>
<ID>33</ID>
<NAME>Jason</NAME>
</EMP>
</STATICDATA>
But i want the out as the required output above. every record in a single line. can any one help me in achieving the required output. also can i export all the columns of the table by some thing like select * from the table in XML file ?
Thanks,
Sartajuser13683418 wrote:
Hi All,
I am new to this network. I am also new to oracle XML package. I want a help for the below query.
CREATE TABLE EMP(ID NUMBER PRIMARY KEY, NAME VARCHAR2(10), PHONE NUMBER);
INSERT INTO EMP(ID,NAME,PHONE) VALUES (11,'Joy',1234);
INSERT INTO EMP(ID,NAME,PHONE) VALUES (22,'Mike',5678);
INSERT INTO EMP(ID,NAME,PHONE) VALUES (33,'Jason',NULL);
COMMIT;
I want to export the EMP table data in a XML file with the below format.
Required Output:
<?xml version="1.0" encoding="UTF-8"?><STATICDATA><EMP><ID>11</ID><NAME>Joy</NAME></EMP></STATICDATA>
<?xml version="1.0" encoding="UTF-8"?><STATICDATA><EMP><ID>22</ID><NAME>Mike</NAME></EMP></STATICDATA>
<?xml version="1.0" encoding="UTF-8"?><STATICDATA><EMP><ID>33</ID><NAME>Jason</NAME></EMP></STATICDATA>
I have used some XML functions and have written the below query.
select XMLROOT(XMLELEMENT(staticdata,XMLELEMENT(EMP,XMLELEMENT(ID,ID),XMLELEMENT(NAME,NAME))), version '1.0" encoding="UTF-8') xml FROM EMP;
output of my query:
<?xml version="1.0" encoding="UTF-8"?>
<STATICDATA>
<EMP>
<ID>11</ID>
<NAME>Joy</NAME>
</EMP>
</STATICDATA>
<?xml version="1.0" encoding="UTF-8"?>
<STATICDATA>
<EMP>
<ID>22</ID>
<NAME>Mike</NAME>
</EMP>
</STATICDATA>
<?xml version="1.0" encoding="UTF-8"?>
<STATICDATA>
<EMP>
<ID>33</ID>
<NAME>Jason</NAME>
</EMP>
</STATICDATA>
But i want the out as the required output above. every record in a single line.Why?
Some things output XML all as one stream, some things naturally display it structured. It doesn't matter as the XML is still the same because by it's very nature it is a structured data definition. Anything that reads XML will be able to read it whether it's on one line (streamed) or structured.
also can i export all the columns of the table by some thing like select * from the table in XML file ?A couple of ways of exporting XML to a file...
-- DBMS_XSLPROCESSOR.clob2file
-- outputs a clob to a file
DECLARE
ctx DBMS_XMLGEN.ctxtype;
BEGIN
ctx := DBMS_XMLGEN.newcontext ('select * from emp');
DBMS_XSLPROCESSOR.clob2file (DBMS_XMLGEN.getxml (ctx), 'TEMP', 'emp.xml');
DBMS_XMLGEN.closecontext (ctx);
END;
PL/SQL procedure successfully completed.or
..snip..
v_xml XMLTYPE;
v_doc XMLDOM.DOMDocument;
v_dir VARCHAR2(2000);
v_file VARCHAR2(2000);
BEGIN
v_xml := ... populate with XML ...;
v_dir := 'TEST_DIR'; -- directory object name (in UPPER CASE)
v_file := 'myfile.xml';
v_doc := DBMS_XMLDOM.NEWDOMDOCUMENT(v_xml);
DBMS_XMLDOM.WRITETOFILE(v_doc, v_dir||'\'||v_file, 'UTF-8');
DBMS_XMLDOM.FREEDOCUMENT(v_doc);
..snip.. -
Exporting table data to MS-Excel Sheet 2000
Dear All,
I just wanted to export my webdynpro table data to MS-XL 2000 version.
I know how to do it in XL-2003.
pl help.
Thanks & Regards
Manoj SahooHi Manoj,
Go through this link to export the data to MS-Excel, it also provides you the sample application and PDF.
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/1208c2cd-0401-0010-4ab6-f4736074acc6">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/1208c2cd-0401-0010-4ab6-f4736074acc6</a>
Regards,
Jhansi -
Xml document to oracle tables - data is not fatching
Hello,
I am new to xml and trying to extract some fields from xml document to oracle tables to use them further in application. I have written following to extract values but nothing is fatching from document:
<?xml version="1.0" encoding="UTF-8" ?>
- <dmsgo:DMS_GO_Interface xmlns:dmsgo="https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1 DMS_GO_Interface_v1.xsd">
<dmsgo:majorversion>1</dmsgo:majorversion>
<dmsgo:identity context="CONFGOFR_OUT" datetimecreated="01/03/2011 10:51" source="go" sourceversion="1.410.1" />
- <dmsgo:prospect>
<dmsgo:requestresponse code="0" />
<dmsgo:references />
- <dmsgo:configurationcontext dataversion="2163" languageiso="en" orderingmarket="867" saleslevel="R">
<dmsgo:configurationdate>01/03/2011</dmsgo:configurationdate>
</dmsgo:configurationcontext>
- <dmsgo:vehicle>
<dmsgo:variant baumuster="2120482" manufacturercode="2120482" />
<dmsgo:desc>E 200 CGI BlueEFFICIENCY Sedan RHD</dmsgo:desc>
- <dmsgo:colorcombination>
<dmsgo:interiorcolor codeowner="C" manufacturercode="4201" ppmtype="AU">Leather black</dmsgo:interiorcolor>
<dmsgo:exteriorcolor codeowner="C" manufacturercode="2497" ppmtype="LU">Cuprite brown metallic</dmsgo:exteriorcolor>
<dmsgo:paintzone manufacturercode="" preference="2" />
</dmsgo:colorcombination>
INSERT INTO p1 (flux_name, elment_1, elment_2, elment_3)
SELECT flux_name, elment_1, elment_2, elment_3
FROM XMLTable(
XMLNamespaces ('https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1' as "dmsgo"),
'dmsgo:DMS_GO_Interface/prospect/vehicle'
passing xmltype(bfilename('DMLDIR','prospect.xml'), nls_charset_id('CHAR_CS'))
columns
flux_name varchar2(20) path 'dmsgo:variant/@baumuster',
elment_1 varchar2(20) path 'dmsgo:desc',
elment_2 varchar2(20) path 'dmsgo:colorcombination/interiorcolor',
elment_3 varchar2(20) path 'dmsgo:colorcombination/interiorcolor/@manufacturercode'
Please help.
Looking forward to early response.
Thanks
UsmanHi,
You're missing the namespace prefix on some elements.
This should work :
SQL> SELECT flux_name, elment_1, elment_2, elment_3
2 FROM XMLTable(
3 XMLNamespaces ('https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1' as "dmsgo"),
4 'dmsgo:DMS_GO_Interface/dmsgo:prospect/dmsgo:vehicle'
5 passing xmltype(bfilename('DMLDIR','prospect.xml'), nls_charset_id('CHAR_CS'))
6 columns
7 flux_name varchar2(20) path 'dmsgo:variant/@baumuster',
8 elment_1 varchar2(40) path 'dmsgo:desc',
9 elment_2 varchar2(20) path 'dmsgo:colorcombination/dmsgo:interiorcolor',
10 elment_3 varchar2(20) path 'dmsgo:colorcombination/dmsgo:interiorcolor/@manufacturercode'
11 );
FLUX_NAME ELMENT_1 ELMENT_2 ELMENT_3
2120482 E 200 CGI BlueEFFICIENCY Sedan RHD Leather black 4201 -
HOw to convert Oracle Table data to Excel Sheet
I need to convert Some of fields from my table to Excell sheet. I dont want to use 3rd party tools. Is there any querry to generate Excell sheet????
There is no direct path to make Excel file from query, instead you may generate a CSV file (comma-separated-values) or TAB separated values file.
On SQL*Plus
SQL> set heading off
SQL> set newpage none
SQL> set linesize 255 --could be more
SQL> spool /path/filename.txt
SQL> select column1||chr(<ascii for Tab>)||column2||...||columnK
from table
SQL> spool off
Hope it helps -
How to export the table data to the excel?
Hi,
I'm new to WebDynpro. im having a table 5rows and 6 columns, i need the data in the table to be exported to excel sheet by clicking on a button.
As i went through some of the blogs and tutorials i couldn't understand the procedure, so could any one help out with detailed procedure.
Thanks & Regards,
SureshHI! Suresh,
This is a littile bit complicated process.Here i am trying to expalin the procedure,
if you are having any problem then let me know.
Following are the steps:--
1.create two controls one of type linkToAction and other of type FileDownload and a location on your portal server say it's "/server0/temp/webdynpro/web/local/testexcel.xls"
2.create a method in your view or controller and call this method as downLoadToXls()
3.create a Value attribute of type binary in your context,say it's dataContent.
4.Bind your linkToAction Control to the method downLoadToXls() and control FileDownLoad data property to dataContent.
5.In the init() Hook methos write the following code:--
IWDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute("dataContent");
IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
// In addition the FileDownload UI element needs for defined resource types
binaryType.setFileName("testexcel.xls");
binaryType.setMimeType(WDWebResourceType.XLS);
6.in DownLoadToXls() method add the following code:--
try {
out = new FileOutputStream(path);
workBook = new HSSFWorkbook();
hsSheet = workBook.createSheet("UserID");
cs = workBook.createCellStyle();
cs1 = workBook.createCellStyle();
cs2 = workBook.createCellStyle();
dataFormat = workBook.createDataFormat();
f = workBook.createFont();
f1 = workBook.createFont();
f.setFontHeightInPoints((short) 12);
//make it blue
f.setColor( (short)HSSFFont.COLOR_NORMAL );
//make it bold
//arial is the default font
f.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
//set font 2 to 10 point type
f1.setFontHeightInPoints((short) 10);
//make it red
f1.setColor( (short)HSSFFont.COLOR_RED);
//make it bold
f1.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
f1.setStrikeout(false);
cs.setFont(f);
cs.setDataFormat(dataFormat.getFormat("#,##0.0"));
//set a thick border
cs2.setBorderBottom(cs2.BORDER_THICK);
//fill w fg fill color
cs2.setFillPattern((short) HSSFCellStyle.SOLID_FOREGROUND);
cs2.setFillBackgroundColor((short)HSSFCellStyle.SOLID_FOREGROUND);
//set the cell format to text see HSSFDataFormat for a full list
cs2.setDataFormat(HSSFDataFormat.getBuiltinFormat("text"));
cs2.setFont(f1);
cs2.setLocked(true);
cs2.setWrapText(true);
hsSheet.createFreezePane(0,1,1,1);
row = hsSheet.createRow(0);
cell = row.createCell((short)0 ,0);
cell.setCellValue("User ID");
cell.setCellStyle(cs2);
cell = row.createCell((short)1 ,1);
cell.setCellValue("Last Changed Password Date");
cell.setCellStyle(cs2);
int nodeSize = wdContext.nodeUserIDAndPass().size();
for(int jCount=0; jCount < nodeSize; jCount++) {
row = hsSheet.createRow(jCount+1);
for(int count = 0; count < 2; count++) {
if(count == 0) {
cell = row.createCell((short)0,count);
cell.setCellValue(wdContext.nodeUserIDAndPass().getUserIDAndPassElementAt(jCount).getCtx_UserID());
if(count == 1) {
cell = row.createCell((short)1,count);
cell.setCellValue(wdContext.nodeUserIDAndPass().getUserIDAndPassElementAt(jCount).getCtx_ChangedPasswd());
cell.setCellStyle(cs2);
workBook.write(out);
out.close();
//Read the file that was created.
FileInputStream fin = new FileInputStream(path);
byte b[] = new byte[fin.available()];
fin.read(b,0,b.length);
fin.close();
wdContext.currentContextElement().setDataContent(b);
}catch(Exception e) {
wdComponentAPI.getComponent().getMessageManager().reportException("Exception while reading file "+e,true); }
7. Add the follwoing constant at the end:--
private FileOutputStream out = null;
private HSSFWorkbook workBook = null;
private HSSFSheet hsSheet = null;
private HSSFRow row = null;
private HSSFCell cell = null;
private HSSFCellStyle cs = null;
private HSSFCellStyle cs1 = null;
private HSSFCellStyle cs2 = null;
private HSSFDataFormat dataFormat = null;
private HSSFFont f = null;
private HSSFFont f1 = null;
private String path = "/server0/temp/webdynpro/web/local/testexcel.xls";
8.Add the follwowing jars in your classPath.
1)poi-3.0.1-FINAL-20070705.jar
2)jxls.jar
regards,
Mithileshwar -
Oracle Projects - data upload from excell
Dear Experts,
Currently we are in the process of implementing oracle R12.1.3 . Consultants are in the stage of BRD requirement analysis.
Projects billing, costing, management and service contract.
Here as per our business requirement, we need to upload the excel - items which are having around 200+ items for every projects.(manual entry is not possible )
Now , we the client and the consultants are do not know how to do this.
Can you please explore the possibilities of excel sheet upload to projects
Required result is:
Upload data in projects costing, then data move to INV and all other rest flows.
ThanksIf an open interface/API is not available, you might want to take a look at DataLoad (dataload.com); if interface/API is available and you want to use Excel, a custom Web ADI integrator can be created.
Maybe you are looking for
-
JRE 1.3.0 to JRE 1.4.2 Mouse related changes
My application developed in JRE 1.3.0 shows quirky behaviour when using JRE 1.4.2 to run. The mouse focus goes to a text box unnecessarily. Was there any event handling change with respect to mouse done between JRE 1.3.0 to JRE 1.4.2? has anyone face
-
Problems wiht instanceManager.addInstance() and signature fields
I have a subform that contains two signature fields which I have set to not lock any field during signing. This subform has the ability to appear in the PDF as may times as needed. The problem is that as soon as I click the button to add an instance
-
SAP Best Practices Installation (Baseline Package US 1.604)
Hi All, I need to setup a 4 system landscape of SAP ECC 6.0 EHP4 with the SAP Baseline Package (Best Practices for Country US - V1.604). Landscape is as below: Sandbox - (1 client) - Configuration Sandbox Development - (2 clients) - Config. Master an
-
Is it possible to pause a for loop?
Hi all! I wonder if it's possible in anyway, without using any timelines, to "pause" a for loop.for a couple of second if some statement returns true during the loop? I.e. like this sketch up of a code example: Thanks for any help :)
-
LR4 Unuseable Having to use LR3
LR4 Very Very Slow. Everything takes an age to apply. Nothing happens in real time as was the case Lightroom 3. Not Responding message seems to be permantely on. What has happened?