How to populate arrayList values in a Excel cell using java
Hi ,
Iam trying to create Excel sheet using java with Apache-POI api's.I need to display values from an arrayList into Excel cell as drop down.kindly suggest me any idea or share any code if u have any.
Thanks in advance
Regards
Rajesh
I suggest you use google to find examples.
Similar Messages
-
How to pass the value of an Excel cell to XL Reporter
Hi guys,
I'm posting this here because no one could help at yahoo's XLR group.
My problem is I need to passa the value of an Excel cell to ixGetData.
Searching I found there where 3 possible ways,
1) =ixGetData("manager"; "RLH6J"; "[Pelissari].[dbo].[RelContas_a_Receber]"; " CardCode, CardName"; " CardCode ="&B6)
2) =ixGetData("manager"; "RLH6J"; "[Pelissari].[dbo].[RelContas_a_Receber]"; " CardCode, CardName "; " CardCode =Cell("Contents", B6))
3) =ixGetData("manager"; "RLH6J"; "[Pelissari].[dbo].[RelContas_a_Receber]"; " CardCode, CardName "; " CardCode = Cell(B6))
The problem is none of them are working!
Can anyone help me, please?
Thanks!
Edited by: Darius Heydarian on Mar 27, 2008 11:44 AMI'm sorry, I dont have the perfect solution.
I ceated a UDT [@Params] or UDF where the user has to insert the values for XL Reports (for exampel CardCode). After the User inserted the value he can start the XL-Report which are reading from this UDT or UDF the value into the GetData function. You must only insert a query into the condition of GetData :
=ixGetData("manager"; "RLH6J"; "Pelissari.dbo.RelContas_a_Receber"; " CardCode, CardName"; " CardCode = (SELECT Name FROM [@Params] WHERE ID='XL-CardCode')")
If you will find some other possibilty please let me know.
Hannes -
How to get the values from struct data type using java code..?
Hi ,
I am newer to java.
we are using oracle database.
How to get the data from struct data type using java code.
Thanks in Advance.
Regards,
kumarHi Rajeev,
To retrieve a FilterContainer you will need to traverse the report structure:
ReportStructure boReportStructure = boDocumentInstance.getStructure();
ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
FilterContainer boFilterContainer = null;
if (boReportContainer.hasFilter()) {
boFilterContainer = boReportContainer.getFilter();
} else {
boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
Hope this helps.
Regards,
Dan -
How to populate null values as blank in cell
Hi All,
I have an query i have data like blow
qtr
data
1Q-4Q 2009
4,069,379
1Q-4Q 2010
3,979,490
and i want result like below
1Q-4Q 2009
4,069,379
% Change
-2%
1Q-4Q 2010
3,979,490
for % age change i have applied the previous function
formula is (data/previous(data)) -1*100
but is coming like below
% Change
0%
1Q-4Q 2009
4,069,379
% Change
-2%
1Q-4Q 2010
3,979,490
for the 1 column i am getting 0% age due to i applied previous function but i don't have data for 2008
so i am trying not to populate 0% for the % change before 2009
I have checked with null value
If (IsNull(Previous [data])) then "" else ([data]/previous[data]) -1*100
so it is populating blanck value but i can not formatting the values as %age
please suggest
how can i solve this issue please advice
Thanks in advance
RanjeetChange your formula to be:
=If(IsNull(Previous([data])=0 then ([data]/previous([data])-1 * 100
You can ignore the else part and it will leave the null cell as blank and you can still use your number format. -
Consider a General format cell having a value of 39.95. When I fetch the CellFormat of the cell it returns wrong cell format-
CellFormat thisCellFormat = ((CellFormat)cellFmts.ChildElements[(int)thisCell.StyleIndex.Value]);
int fmtId = Convert.ToInt32(thisCellFormat.FormatId.Value);
The value of fmtId returned is 1, and in some cases 38, where it should be 2 or 39.
This issue is only for General format cells, I am getting correct id for Number format cells.
Below is the
Standard ECMA-376 Office Open XML File Formats specified set of implied cell formats for reference-
ID Format Code
0 General
1 0
2 0.00
3 #,##0
4 #,##0.00
9 0%
10 0.00%
11 0.00E+00
12 # ?/?
13 # ??/??
14 mm-dd-yy
15 d-mmm-yy
16 d-mmm
17 mmm-yy
18 h:mm AM/PM
19 h:mm:ss AM/PM
20 h:mm
21 h:mm:ss
22 m/d/yy h:mm
37 #,##0 ;(#,##0)
38 #,##0 ;Red
39 #,##0.00;(#,##0.00)
40 #,##0.00;Red
45 mm:ss
46 [h]:mm:ss
47 mmss.0
48 ##0.0E+0
49 @The purpose of this forum is to support the Open Specifications documentation. You can read about the Microsoft Open Specifications program here,
http://www.microsoft.com/openspecifications/en/us/default.aspx
The library of Open Specification documents is located here,
http://msdn.microsoft.com/en-us/library/dd208104.aspx
It doesn’t appear that you are implementing one of the protocols cited. Your question may be more applicable to MSDN's Microsoft Office for Developers/Open XML Format SDK forum at
https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=oxmlsdk
Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team -
How To open a MS Word/Excel document using Java
How do i open a MS-Word/Excel document using Java Code.
Get SDK (which is freeware) at
http://www.simtel.net/product.php?id=60701&sekid=0&SiteID=simtel.net
http://shareware.pcmag.com/product.php?id=60701&SiteID=pcmag
http://downloads.suntimes.com/product.php?id=60701&SiteID=suntimes
There you will find examples for MSWord and Excel (example sources are packed with binaries). -
Create a check box in excel cell using sap abap
Dear Sap Master's,
Please give me some idea on how to create a check box in excel cell using abap program..
(OLE concept).
Thanks
Moderator message: please search for available information first.
Edited by: Thomas Zloch on Jan 12, 2012select the cell then open the cell formatter:
process should be similar in the iOS version. I do not have any iOS devices with Numbers so I cannot check. I did find this link that may help:
http://support.apple.com/kb/PH3374?viewlocale=en_US -
Create heck box in excel cell using sap
Dear Sap Master's,
Please give me some idea on how to create a check box in excel cell using abap program..
(OLE concept).
Thanks,
Naveen.
Moderator message: please do some research before posting, show what you have done yourself when posting.
Edited by: Thomas Zloch on Jan 17, 2012Not resolved
-
How to populate default values for BP (FPP1 is tcode in ECC 6.0)
Hello ,
I am creating BP in ECC 6.0 using Fpp1 tcode. How to populate default values when i hit create BP person. any badi triggers when we are creating BP in ECC.
guide me.Hi Premanand,
To default fields, you need to do the following steps :
1. Create a Z module e.g. : Z_DEFAULT_FIELDS_DIALOG.
2. Enter suppose you want to default fiels Name, title, country, write code as follows :
DATA : ls_busdefault LIKE busdefault.
ls_busdefault-title = '0002'.
ls_busdefault-mc_name1 = 'TEST'.
ls_busdefault-mc_name2 = 'Default'.
ls_busdefault-country = 'IN'.
CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
EXPORTING
i_busdefault = ls_busdefalut.
3. Now got to transaction BUS7, select event ISDAT, click on Event--> function modules.
4. Register your Z module Z_DEFAULT_FIELDS_DIALOG in this list, Save.
This should solve your problem. Please note : You can only default those fields contained in structure BUSDEFAULT.
Cheers,
Rishu. -
How to populate the Quering data into Excel sheet in Oracle
Dear Guys,
How to populate the Quering data into Excel sheet in oracle.
Please provide a solution.
Thanks & Regards,
Senthil K KumarHi
To make Excel sheets from sqlplus, you can use the markup html tag in sqlplus.
Here's an example.
Example
<code>
SET LINESIZE 4000
SET VERIFY OFF
SET FEEDBACK OFF
SET PAGESIZE 999
SET MARKUP HTML ON ENTMAP ON SPOOL ON PREFORMAT OFF
SPOOL c:\test_xls.xls
SELECT object_type
, SUBSTR( object_name, 1, 30 ) object
, created
, last_ddl_time
, status
FROM user_objects
ORDER BY 1, 2
SPOOL OFF
SET MARKUP HTML OFF ENTMAP OFF SPOOL OFF PREFORMAT ON
SET LINESIZE 2000 VERIFY ON FEEDBACK ON
</code> -
How to populate f4 values to standard pnp selection screen fields
Hi Experts,
my question is how to populate f4 values to standard pnp selection screen field. i am using LDB PNP for a report , it displays several fields with f4 values, i need to remove all the stadard f4 values and want to place my f4 values in the selection screenHi Venkat,
To put ur own values in the F4 help of any field...all u have to do is.
1st fetch all the records that u need to display in F4 help list...in one internal table.
and then use the function module 'F4IF_INT_TABLE_VALUE_REQUEST'
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield =
value_org =
tables
value_tab =
return_tab =
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
where retfield is the field for which u need to give the F4 help.
and valu_tab is the internal table in which u have the list of records to be displayed.
this would do the work...
I dont have the system in front of me...as soon as i have...will try to send a piece of code, to make ur work easy.
Till then hope this helps u...all the best
Regards,
Radhika -
How to Read Variable Values in WAD 7.0 Using JavaScript
I found a how to: How to Read Variable Values in WAD 7.0 Using JavaScript on SDN.
I get a Javascript error:
bics.getElementsByTagName is not a function
vars = bics.getElementsByTagName("VARIABLES")[0]; // <VARIABLES>
Thats my script:
function currency()
var varnm = "SFS_CP_CURR"; // Name of the variable to be read
root = document.childNodes[0]; // <HTML>
body = root.getElementsByTagName("BODY")[0]; // <BODY>
xml = body.getElementsByTagName("XML")[0]; // <XML>
bics = xml.childNodes[0]; // <BICS_VIEW>
vars = bics.getElementsByTagName("VARIABLES")[0]; // <VARIABLES>
varl = vars.getElementsByTagName("VARIABLE"); // gives no. of variable in DP
for ( i = 0; i <= varl.length; i++ ) // Loop one by one
vari = vars.getElementsByTagName("VARIABLE")<i>;
varnam = vari.attributes[0].text; // get variable name
mem = vari.getElementsByTagName("MEMBER")[0];
varval = mem.attributes.getNamedItem("name").value; // read variable value
if (varnam == varnm) //check varname in loop needs to be read
if (varval == "ZMON") // check for value1 and fire command1
SFS_CP_M();
if (varval == "ZKON") // check for value2 and fire command2
SFS_CP_K();
break;
Where's the mistake?I'm afraid I haven't made my question understood clearly.
What I am looking for is a method to get the value of variable inside excel (e.g. put it into a cell / range of a worksheet, so that we can reference it and use it as an input for planning function execution).
Please advice.
Thanks in advance,
Shady -
How to update field values in a database table using module pool prg?
hi
how to update field values in a database table using module pool prg?
we created a customized table, and we put 2 push buttons in screen painter update and display.
but update is not working?
data is enter into screen fields and to internal table, but it is not updated in database table.
thanks in adv
vidyaHI,
we already used the update statement. but its not working.
plz check this.
*& Module Pool ZCUST_CALL_REC
PROGRAM ZCUST_CALL_REC.
TABLES: ZCUST_CALL_REC,ZREMARKS.
data: v_kun_low like ZCUST_CALL_REC-kunnr ,
v_kun_high like ZCUST_CALL_REC-kunnr,
v_bud_low like ZCUST_CALL_REC-budat,
v_bud_high like ZCUST_CALL_REC-budat.
ranges r_kunnr for ZCUST_CALL_REC-kunnr .
ranges r_budat for zcust_call_rec-budat.
DATA: ITAB TYPE STANDARD TABLE OF ZCUST_CALL_REC WITH HEADER LINE,
JTAB TYPE STANDARD TABLE OF ZREMARKS WITH HEADER LINE.
*data:begin of itab occurs 0,
MANDT LIKE ZCUST_CALL_REC-MANDT,
kunnr like ZCUST_CALL_REC-kunnr,
budat like ZCUST_CALL_REC-budat,
code like ZCUST_CALL_REC-code,
remarks like ZCUST_CALL_REC-remarks,
end of itab.
*data:begin of Jtab occurs 0,
MANDT LIKE ZCUST_CALL_REC-MANDT,
kunnr like ZCUST_CALL_REC-kunnr,
budat like ZCUST_CALL_REC-budat,
code like ZCUST_CALL_REC-code,
remarks like ZCUST_CALL_REC-remarks,
end of Jtab.
CONTROLS:vcontrol TYPE TABLEVIEW USING SCREEN '9001'.
CONTROLS:vcontrol1 TYPE TABLEVIEW USING SCREEN '9002'.
*start-of-selection.
*& Module USER_COMMAND_9000 INPUT
text
MODULE USER_COMMAND_9000 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
SET SCREEN 0.
LEAVE SCREEN.
CLEAR sy-ucomm.
WHEN 'ENQUIRY'.
perform multiple_selection.
perform append_CUSTOMER_code.
PERFORM SELECT_DATA.
call screen '9001'.
WHEN 'UPDATE'.
perform append_CUSTOMER_code.
PERFORM SELECT_DATA.
call screen '9002'.
perform update on commit.
WHEN 'DELETE'.
perform append_CUSTOMER_code.
PERFORM SELECT_DATA.
call screen '9002'.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
*& Module STATUS_9000 OUTPUT
text
MODULE STATUS_9000 OUTPUT.
SET PF-STATUS 'ZCUSTOMER'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_9000 OUTPUT
*& Module USER_COMMAND_9001 INPUT
text
MODULE USER_COMMAND_9001 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
SET SCREEN 0.
LEAVE SCREEN.
CLEAR sy-ucomm.
endcase.
ENDMODULE. " USER_COMMAND_9001 INPUT
*& Module STATUS_9001 OUTPUT
text
MODULE STATUS_9001 OUTPUT.
SET PF-STATUS 'ZCUSTOMER'.
SET TITLEBAR 'xxx'.
move itab-MANDT to zcust_call_rec-MANDT.
move itab-kunnr to zcust_call_rec-kunnr.
move itab-budat to zcust_call_rec-budat.
move itab-code to zcust_call_rec-code.
move itab-remarks to zcust_call_rec-remarks.
vcontrol-lines = sy-dbcnt.
ENDMODULE. " STATUS_9001 OUTPUT
*& Module USER_COMMAND_9002 INPUT
text
module USER_COMMAND_9002 input.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
SET SCREEN 0.
LEAVE SCREEN.
CLEAR sy-ucomm.
WHEN 'UPDATE'.
perform move_data.
UPDATE ZCUST_CALL_REC FROM TABLE ITAB.
IF SY-SUBRC = 0.
MESSAGE I000(0) WITH 'RECORDS ARE UPDATED'.
ELSE.
MESSAGE E001(0) WITH 'RECORDS ARE NOT UPDATED'.
ENDIF.
WHEN 'DELETE'.
perform move_data.
DELETE ZCUST_CALL_REC FROM TABLE ITAB.
IF SY-SUBRC = 0.
MESSAGE I000(0) WITH 'RECORDS ARE DELETED'.
ELSE.
MESSAGE E001(0) WITH 'RECORDS ARE NOT DELETED'.
ENDIF.
endcase.
endmodule. " USER_COMMAND_9002 INPUT
*& Module STATUS_9002 OUTPUT
text
module STATUS_9002 output.
SET PF-STATUS 'ZCUSTOMER1'.
SET TITLEBAR 'xxx'.
endmodule. " STATUS_9002 OUTPUT
*& Module update_table OUTPUT
text
module update_table output.
move itab-MANDT to zcust_call_rec-MANDT.
move itab-kunnr to zcust_call_rec-kunnr.
move itab-budat to zcust_call_rec-budat.
move itab-code to zcust_call_rec-code.
move itab-remarks to zcust_call_rec-remarks.
vcontrol-lines = sy-dbcnt.
endmodule. " update_table OUTPUT
***Selection Data
FORM SELECT_DATA.
SELECT mandt kunnr budat code remarks FROM zcust_call_rec INTO
table itab
WHERE kunnr IN r_kunnr AND BUDAT IN R_BUDAT.
ENDFORM.
****append vendor code
FORM APPEND_CUSTOMER_CODE.
clear r_kunnr.
clear itab.
clear r_budat.
refresh r_kunnr.
refresh itab.
refresh r_kunnr.
IF r_kunnr IS INITIAL
AND NOT v_kun_low IS INITIAL
AND NOT v_kun_high IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_low
IMPORTING
OUTPUT = r_kunnr-low.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_high
IMPORTING
OUTPUT = r_kunnr-high.
r_kunnr-option = 'BT'.
r_kunnr-sign = 'I'.
append r_kunnr.
PERFORM V_BUDAT.
ELSEIF r_kunnr IS INITIAL
AND NOT v_kun_low IS INITIAL
AND v_kun_high IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_low
IMPORTING
OUTPUT = r_kunnr-low.
r_kunnr-SIGN = 'I'.
r_kunnr-OPTION = 'EQ'.
APPEND r_kunnr.
PERFORM V_BUDAT.
ELSEIF r_kunnr IS INITIAL
AND v_kun_low IS INITIAL
AND NOT v_kun_high IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_low
IMPORTING
OUTPUT = r_kunnr-low.
r_kunnr-SIGN = 'I'.
r_kunnr-OPTION = 'EQ'.
APPEND r_kunnr.
PERFORM V_BUDAT.
ELSEIF r_kunnr IS INITIAL
AND v_kun_low IS INITIAL
AND v_kun_high IS INITIAL.
IF SY-SUBRC = 0.
MESSAGE I003(0) WITH 'ENTER CUSTOMER NUMBER'.
CALL SCREEN '9000'.
ENDIF.
PERFORM V_BUDAT.
ENDIF.
ENDFORM.
FORM V_BUDAT.
IF R_BUDAT IS INITIAL
AND NOT v_BUD_low IS INITIAL
AND NOT v_BUD_high IS INITIAL.
r_budat-low = v_bud_low.
r_budat-high = v_bud_high.
r_budat-option = 'BT'.
r_budat-sign = 'I'.
append r_budat.
ELSEIF R_BUDAT IS INITIAL
AND NOT v_BUD_low IS INITIAL
AND v_BUD_high IS INITIAL.
r_budat-low = v_bud_low.
r_budat-high = v_bud_high.
r_budat-option = 'EQ'.
r_budat-sign = 'I'.
append r_budat.
ELSEIF R_BUDAT IS INITIAL
AND v_BUD_low IS INITIAL
AND NOT v_BUD_high IS INITIAL.
r_budat-HIGH = v_bud_HIGH.
r_budat-option = 'EQ'.
r_budat-sign = 'I'.
append r_budat.
ELSEIF R_BUDAT IS INITIAL
AND v_BUD_low IS INITIAL
AND v_BUD_high IS INITIAL.
IF SY-SUBRC = 0.
MESSAGE I002(0) WITH 'ENTER POSTING DATE'.
CALL SCREEN '9000'.
r_budat-low = ''.
r_budat-option = ''.
r_budat-sign = ''.
ENDIF.
ENDIF.
ENDFORM.
*& Form update
text
--> p1 text
<-- p2 text
form update .
commit work.
endform. " update
*& Form move_data
text
--> p1 text
<-- p2 text
form move_data .
clear itab.
refresh itab.
move-corresponding zcust_call_rec to itab.
MOVE ZCUST_CALL_REC-MANDT TO ITAB-MANDT.
MOVE ZCUST_CALL_REC-KUNNR TO ITAB-KUNNR.
MOVE ZCUST_CALL_REC-BUDAT TO ITAB-BUDAT.
MOVE ZCUST_CALL_REC-CODE TO ITAB-CODE.
MOVE ZCUST_CALL_REC-REMARKS TO ITAB-REMARKS.
APPEND ITAB.
delete itab where kunnr is initial.
endform. " move_data
thanks in adv
vidya -
How to get the password of a password protected Excel Sheet using java/jxl
Hi ,
how to get the password of a password protected Excel Sheet using java / jxl program.
plz any one help me .
Ramesh P
[email protected]If they've implemented the password system correctly there probably isn't a way of getting the password at all.
-
How do I produce an excel file using java code
How do i produce an excel file using java code.
If it is possible would ne one have ne source code as an example.
I have tried looking up information on outputing the information to a *.csv file but unfortunality i have had no luck in finding any information. To be exact ne source code.
Thanks
LeeThat's what I use and I'd be the first to admit that it's very messy. But it works. Go use Google and see what else you can find.
Maybe you are looking for
-
I PUSH TO UPDATE AND IT IS HUNG IN THE MIDDLE AND WILL NOT COMPLETE
On my IPAD 2 I started the UPDATE and is hung in the middle and will not complete. Bob Hopkins What did I do and I do not all the question you asked <Edited By Host>
-
PAL or NTSC for international distribution?
Hi everybody, we have a 5 hrs film shot and edited in Premiere Pro CS6 in HD pal, 50fps, 16:9 intended for international distribution on 2 double layer DVDs. How should we best author it to guarantee worldwide compatibility and best possible quality
-
Program Name which helps to hide the code of abap program
Hello Experts, Could anybody help me in finding the name of the program on running which we can hide the CODE OF Abap program
-
IDOCs identification of fields Using qualifier for Mapping
Hi All, I have IDOC ORDERS05, in which my Quatation deadline date E1EDK03 , in which in IDOC when i trigger and check in WE19 i can see E1EDK03 repeating 3 times with different qualifier , i need to Map tp my target structure , i dont kn
-
I need to re-install my inDesign 5.5 but don't have my licence no for the previuos version (3). My 5.5 has been registered on my Adobe-account, but not the CS3, what can i do?