How to update existing excel cell by dropdown value in ole programm
hi guys,
i am updating excel sheet using ole program, i stuck in point where i want to fill an excel cell by selecting dropdown value from list,
how it can be achieve.
I don't think it is possible to refer to cell in excel using jdbc, since jdbc is intended to communicate with mostly database in generic way. So you have to use queryStrings to update or retive cell info.
The only way to access them by cell name is possibly by using some third party tools.
Similar Messages
-
HOW TO PRINT THE EXCEL CELL COMMENT IN JAVA SWING FRAME ?
How to print the excel cell comment in java swing frame
user can print the data of cell with comment in bracket in java swing frame.
please make one java code to read an excel spreed sheet and print the output in Java swing frame as follows
EMP NO - 1, 2, 3
EMP NAME - aname (amitesh:very good), bname (amitesh: average), cname (amitesh: very bad)
EMP AGE - 11, 22, 33
EMP DESG - ad, bd, cd
Note: the bracket portion is the excel comments put in that cellhello everyone i'm new to this forum..how are you all...
Jack Brosnan
[mobile phone|http://www.mobilephonesforsale.net.au/apple-iphone-f-2.html] -
How to Update a particular cell in Excel with its specific cell Name?
{color:#000080}Hi,
I have connected my Java program to Excel using JDBC ODBC connection and also I am able to read/write data to Excel currently.
In my write code, I have updated the data in particular Excel cells by using conditions in "where" clause.
Example:
String $mcode="hello";
double da1 = Double.parseDouble(txtda1.getText());
st.executeUpdate("insert into [Sheet4$] values (' " +$mcode+ " ')");
st.executeUpdate("Update [Sheet4$] set Lot1="+da1+" where Lot1='"+$mcode+"'");
But I would like to refer to the individual excel cells by their cell name instead of like the above said one.
In whatever I saw, third party tools were used to refer to the excels cells by their name. But I have to refer to in an ordinary way.
It would be great if somebody could help me in referring to Excel cells by their name.
Thanks in advance!{color}I don't think it is possible to refer to cell in excel using jdbc, since jdbc is intended to communicate with mostly database in generic way. So you have to use queryStrings to update or retive cell info.
The only way to access them by cell name is possibly by using some third party tools. -
How to fix the excel cell length in the sap
hi
i want to fix the excel cell length in the sap. how to fix
perform fill_cell1 using l_row l_col 1 wa_cat-seltext_l.
i want to fix the fill_cell1 how to do.
Regards,
sivakumarhi
good
go through this
The following thread has the code which will put data into multiple sheets
Download to multiple sheets in Excel
FOR COLOR LOGIC JUST REFER THIS PROGRAM
*& Report ZNEGI17 *
REPORT ZNEGI17 NO STANDARD PAGE HEADING.
this report demonstrates how to send some ABAP data to an
EXCEL sheet using OLE automation.
INCLUDE OLE2INCL.
handles for OLE objects
DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
H_MAPL TYPE OLE2_OBJECT, " list of workbooks
H_MAP TYPE OLE2_OBJECT, " workbook
H_ZL TYPE OLE2_OBJECT, " cell
H_F TYPE OLE2_OBJECT. " font
TABLES: SPFLI.
DATA H TYPE I.
table of flights
DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
*& Event START-OF-SELECTION
START-OF-SELECTION.
read flights
SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
display header
ULINE (61).
WRITE: / SY-VLINE NO-GAP,
(3) 'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(4) 'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(8) 'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
ULINE /(61).
display flights
LOOP AT IT_SPFLI.
WRITE: / SY-VLINE NO-GAP,
IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
ENDLOOP.
ULINE /(61).
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-007
EXCEPTIONS
OTHERS = 1.
start Excel
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
PERFORM ERR_HDL.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
PERFORM ERR_HDL.
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-008
EXCEPTIONS
OTHERS = 1.
get list of workbooks, initially empty
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
PERFORM ERR_HDL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP.
PERFORM ERR_HDL.
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-009
EXCEPTIONS
OTHERS = 1.
output column headings to active Excel sheet
PERFORM FILL_CELL1 USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL1 USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL1 USING 1 3 1 'Von'(003).
PERFORM FILL_CELL1 USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL1 USING 1 5 1 'Zeit'(005).
LOOP AT IT_SPFLI.
copy flights to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
ENDLOOP.
changes by Kishore - start
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
PERFORM ERR_HDL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP EXPORTING #1 = 2.
PERFORM ERR_HDL.
tell user what is going on
SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-009
EXCEPTIONS
OTHERS = 1.
output column headings to active Excel sheet
PERFORM FILL_CELL1 USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL1 USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL1 USING 1 3 1 'Von'(003).
PERFORM FILL_CELL1 USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL1 USING 1 5 1 'Zeit'(005).
LOOP AT IT_SPFLI.
copy flights to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
ENDLOOP.
changes by Kishore - end
disconnect from Excel
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'C:\SKV.XLS'.
FREE OBJECT H_EXCEL.
PERFORM ERR_HDL.
FORM FILL_CELL *
sets cell at coordinates i,j to value val boldtype bold *
FORM FILL_CELL1 USING I J BOLD VAL.
data : color(5) type x value 'H80000008'.
CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
PERFORM ERR_HDL.
SET PROPERTY OF H_ZL 'Value' = VAL .
PERFORM ERR_HDL.
GET PROPERTY OF H_ZL 'Font' = H_F.
PERFORM ERR_HDL.
SET PROPERTY OF H_F 'Bold' = BOLD .
PERFORM ERR_HDL.
SET PROPERTY OF H_F 'ColorIndex' = 3 .
PERFORM ERR_HDL.
ENDFORM.
*& Form ERR_HDL
outputs OLE error if any *
--> p1 text
<-- p2 text
FORM ERR_HDL.
IF SY-SUBRC <> 0.
WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
STOP.
ENDIF.
ENDFORM. " ERR_HDL
*& Form FILL_CELL1
text
-->P_H text
-->P_1 text
-->P_0 text
-->P_IT_SPFLI_CARRID text
form FILL_CELL using I J BOLD VAL.
CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
PERFORM ERR_HDL.
SET PROPERTY OF H_ZL 'Value' = VAL .
PERFORM ERR_HDL.
GET PROPERTY OF H_ZL 'Font' = H_F.
PERFORM ERR_HDL.
endform. " FILL_CELL1
thanks
mrutyun^ -
How to Update Existing BP Addresses?
Hi all,
I have a BP with billto(0) & shipto(1) address in SAP .
Default Billto Address : with Address name 'David Dashu'
Default Shipto Address : with Address name 'Abc EFG'
Shipto Address : with Address name 'Abc'
Shipto Address : with Address name 'David Dashu'
Now i want to update this BP with new billto & shipto address.
Default Billto Address : with Address name 'David Dashu'
Default Shipto Address : with Address name 'David Dashu'
Shipto Address : with Address name 'Abc'
Shipto Address : with Address name 'efgh'
when i update BP then it shows a error 'This entry already exist'
this error for SAP does not support dupbicate address name
but how to chk dublicate addressname
plz help me how to update address in BP ?
thanks in advance
surajitHi Surojit......
Please be sure that you are not giving the same Address Code to the same BP Under the same Shitp To Address code or Bill To address Code....
If you put same for another address also it will give already exsist error.....
Regards,
Rahul -
How to unfreeze the excel cells
Dear All,
Please i haven a file with freeze cells please i need to unfreeze cells urgently please help.
MS USERHi,
Check out this one "How to Lock or Unlock Excel cells".
For more:
http://office.microsoft.com/en-001/excel-help/lock-or-unlock-specific-areas-of-a-protected-worksheet-HA010096837.aspx
http://office.microsoft.com/en-001/excel-help/unlock-protected-cells-HA102809343.aspx
Note: Improve community discussions by marking the answers helpful.
Thanks
Clark Kent -
How to send existing excel file through mail
Hello Friends,
I have to send mail with Excel File attachement. i have already exist Excel file and that file i hv to send through mail. so pl help me out for sending existing excel file .
i.e. user pickup the exist excel file and that file would be sent to particular mail id.
thank you,
MarmikHi marmik,
1. There is some trick involved
in the binary files.
2. I have made a program (and it works fantastic)
ONLY 6 LINES FOR EMAILING
BELIEVE ME
ITS A FANTASTIC PROGRAM.
IT WILL WORK LIKE OUTLOOK EXPRESS !
3. The user is provided with
a) file name
b) email address to send mail
and it sends ANY FILE (.xls,.pdf .xyz..)
Instantaneously !
4. Make two things first :
1. Include with the name : ZAMI_INCLFOR_MAIL
2. Report with the name : ZAM_TEMP147 (any name will do)
3. Activate both and execute (2)
4. After providing filename, email adress
5. Code for Include :
10.08.2005 Amit M - Created
Include For Mail (First Req F16)
Modification Log
Data
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
FORM
FORM ml_customize USING objname objdesc.
Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
Header Data
Already Done Thru FM
Main Text
Already Done Thru FM
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
Receiver List
Already done thru fm
ENDFORM. "ml_prepare
FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
Data
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
CODE FOR PROGRAM
5.
REPORT zam_temp147 .
INCLUDE zami_inclfor_mail.
DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
EXTENSION = extension
NAME = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
regards,
amit m. -
How to update an Excel Sheet through a WebService
Dear All,
Please help me with this query.
Kindly could you guide me on updating an Excel Sheet which is saved on my local server through a WebService which is deployed on the WebApp Server. The Server is located locally too. I have developed the WebService on the NWDS.
I have tried using POI and ODBC for updating the sheet. But it appears to me that the server is unable to fetch the excel sheet.
Please could you provide your valuable suggestions on this.
Regards,
Suyukti B NHi,
Thanks for your reply. Below are more details regarding my question. I am trying to achieve the requirement with :
Java WebDynpro (Front End) <--> WebService (Middle Tier) <->ODBC <---> Microsoft Excel (Back End)
1) I am Using the Java perspective to create the service method. The method has to read and update the excel sheet. I have created a ODBC DataSource on my local machine. I also have the SAP WebApp Server on my local machine. Below is the method I am using for "reading" the excel :
public String read(){
Connection connection = null;
String columnValue = "";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection ("jdbc:odbc:DS");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("Select * from [Sheet1$]");
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
while (rs.next()) {
for (int i = 1; i <= numberOfColumns; i++) {
if (i > 1) System.out.print(", "); columnValue = rs.getString(i);
System.out.println("value is" + columnValue);
st.close();
con.close();
} catch (Exception ex) {
System.err.print("Exception: ");
System.err.println(ex.getMessage());
return "false" + ex.toString();
return "true";
This code works perfectly fine and provides me the values that are present on the Excel Sheet.
2) I now switch over from the Java Perspective to the WebService Perspective on my NetWeaver Developer Studio. I create a new WebService for the above Java method.
3) I then create an Ear file and deploy on the Server.
4) Now when I click on Test WebService, the values that are returned from the Excel are "null". It shows return String as False and an SQL Exception. java.sql.SQLException: General error.
Hence I concluded that after deploying the Service on the Server, the Excel Sheet is not being fetched or read.
Please could you provide your thoughts on this.
Thank You Very Much,
Warm Regards,
Suyukti B N -
How to catch the event for change dropdown value in alv
it has a column output by dropdown in alv. the dropdown type cl_salv_wd_uie_dropdown_by_idx.
now the problem is if change the dropdown value, i want to catch the event to change another column value.
how can i do it?This part contains other ALV initialization code
*... init ColumnSettings
DATA:
lr_column_settings TYPE REF TO if_salv_wd_column_settings.
lr_column_settings ?= wd_this->r_table.
DATA:
lt_columns TYPE salv_wd_t_column_ref.
lt_columns = lr_column_settings->get_columns( ).
DATA:
ls_column TYPE salv_wd_s_column_ref,
lr_col_header TYPE REF TO cl_salv_wd_column_header,
l_tooltip TYPE string.
LOOP AT lt_columns INTO ls_column.
CASE ls_column-id.
WHEN 'PLANETYPE'.
DATA:
lr_drdn_by_key TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
CREATE OBJECT lr_drdn_by_key
EXPORTING
selected_key_fieldname = ls_column-id.
lr_drdn_by_key->set_key_visible( abap_true ).
ls_column-r_column->set_cell_editor( lr_drdn_by_key ).
WHEN OTHERS.
ENDCASE.
ENDLOOP.
DATA:
node_info TYPE REF TO if_wd_context_node_info,
lt_valueset TYPE STANDARD TABLE OF wdr_context_attr_value,
l_value TYPE wdr_context_attr_value.
node_info = wd_context->get_node_info( ).
node_info = node_info->get_child_node( 'FLIGHT_INFO' ).
data : lt_sflight type STANDARD TABLE OF sflight,
ls_sflight like LINE OF lt_sflight.
SELECT * from sflight into TABLE lt_sflight.
LOOP at lt_sflight into ls_sflight.
l_value-value = ls_sflight-planetype.
l_value-text = ls_sflight-planetype.
INSERT l_value into TABLE lt_valueset.
ENDLOOP.
node_info->set_attribute_value_set(
name = 'PLANETYPE'
value_set = lt_valueset ). -
How do I change a cell to display values in Scientific Notation?
I have to display values that are around 0.00000000225000000
How do I get these cells to automatically display as 2.25x10^-9 ? (or 2.25E-9)
I can only find forums for how to disable.
Thank you!select the cell then open the cell formatter and choose the format from the pop-up menu:
-
How to update a specific cell value in a CSV file.
Hi
I would like to know whether it is possible in openscript to update a cell value of the CSV file.
For example if the test script requires to update the cell of 6th row and 8th column, then how to achieve through openscript API?
Please kindly let me know.Hi,
Hope this helps!
Table table;
String[] rowvalus;
int targetRow=5,targetColumn=7;
* Note: Rows and columns are 0-based index.
table =utilities.loadCSV("C:\OracleATS\OFT\DataBank\Test.csv");
rowvalus=table.getRows().get(targetRow).getAll();
info("Before change :"+rowvalus[targetColumn]);
rowvalus[targetColumn]="NewValue";
utilities.saveCSV(table, "C:\OracleATS\OFT\DataBank\Test.csv", true);
table =utilities.loadCSV("C:\OracleATS\OFT\DataBank\Test.csv");
rowvalus=table.getRows().get(targetRow).getAll();
info("After change :"+rowvalus[targetColumn]);
Note:- Please first take the backup of your CSV file before using this code snippet
Thanks
-POPS -
How do I import Excel cell data in to an already built custom list.
I have a custom list that we are using as an End Of Shift Report.
I would like to expand the list to incorporate some of our process data. (We are a paper mill). We have a data historian, PI Process Book, that has an Excel add-in, that allows us to import the process data in to Excel.
I am able to do the "import spreadsheet" function and get the data in to a new list. What I can't figure out is either how to import directly in to the custom list I have already created, or how to import from the new list to the custom list.
I could use the "new list" as a container for several different process points if I could figure out how to load the process data in to the custom list.
We are currently using WSS3, but are upgrading in either the 4th Q this year, or Q1 2014.
Any other suggestions on how to display single point data (End of Shift Inventory calculations for example) in a custom sharepoint list are welcome.
I want to take a tank level reading, which we monitor and multiply it by X gallons per foot, then load the total gallons in to the custom list1) Open WSS List, and Export it to Excel
2) Open the Excel file you want to import
3) Copy the cells in the source and paste them into the Excel file openned from the WSS List (only highlight one row to paste, it will fill down)
4) You will see vaildation errors (yellow triangles), if there are any, correct them
5) In the menubar go Data --> List --> Sync List
6) You will see a blue status bar fill in the bottom left as data is copied up to the List
Or you can try the below tools
> SharePoint Excel Import 2.5
http://www.boostsolutions.com/sharepoint-excel-import.html
> Import Excel data to SharePoint List.
http://spreadsheet2splist.codeplex.com/
Regards MuSa -
How to update existing table using Data Load from spreadsheet option?
Hi there,
I need to update an existing table, but in Data Load application when you select csv file to upload it inserts all data by replacing existing one. How can i change this?
Let me know,
Thank you.
A.B.A.And how do you expect your database server to access a local file in your machine ?
Is the file accessible from outside your machine say inside a webserver folder so that some DB process can poll on the file ?
Or, is your DB server in the same machine where you have the text file ?
You will have to figure out the file acess part before automating user interaction or even auto-refreshing. -
Update Existing Excel File from Oracle DB
The user has an Excel Sheet that they populate manually.
There is a application that pulls data from salesDB.
Target : Eliminate the manual updating process of DB.
Solution:
1.Add a Button o VB .NET application like "Generate Report"
2. Create DB connectivity to that Excel sheet and make it pull values from DB instead of manual entry
So that button should produce an Excel document with updated fields reading from salesDB
Questions
1. Which solution is better?
2. what would be the step by step approach for each solution ?
3. Any link to articles that talk about Excel report generation from Oracle would be great.
-- New to oracleHello,
if you need more than a simple csv file then you can find free tools at
https://xml-spreadsheet.samplecode.oracle.com/ or
https://exceldocumenttype.samplecode.oracle.com/
While they both use a MS XML format they differ in the way they return the output file
- write with utl_file (1)
- return a CLOB (1 and 2)
- directly to a web browser through a PL/SQL DAD (2)
- via a user defined type (2)
Regads
Marcus -
How to Update existing XML File Using Java Swing
Hi,
I am reading XML file and getting keywords into JList. When i add some keywords into JList through textfield and remove keywords JList, then after click on save button it should update xml file. How can i do it ?
Please provide me some code tips for updating xml file
This is the code that i am using for reading XML File:
import javax.swing.*;
import java.awt.event.*;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import java.io.IOException;
import java.util.*;
import java.text.Collator;
import java.util.regex.*;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import com.cloudgarden.layout.AnchorConstraint;
import com.cloudgarden.layout.AnchorLayout;
public class getKeywords extends JFrame implements ActionListener
static JPanel p;
static JLabel lbl;
static JButton btnSave,btnAdd,btnRemove;
static String path;
static Vector v;
static JList lstCur;
static JTextField txtKey;
Document dom;
static image imgval;
NodeList nodelstImage;
static AnchorLayout anchorLay;
private DefaultListModel lstCurModel;
public getKeywords()
super("Current Keywords");
v=new Vector();
p=new JPanel();
txtKey=new JTextField(10);
btnAdd=new JButton("Add");
btnRemove=new JButton("Remove");
btnSave=new JButton("Save");
lbl=new JLabel("Current Keywords");
lstCurModel=new DefaultListModel();
lstCur=new JList();
JScrollPane scr=new JScrollPane(lstCur);
runExample();
lstCur.setModel(lstCurModel);
p.add(lbl);
p.add(scr);
p.add(txtKey);
p.add(btnAdd);
p.add(btnRemove);
p.add(btnSave);
add(p);
btnAdd.addActionListener(this);
btnRemove.addActionListener(this);
btnSave.addActionListener(this);
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
public static void main(String arg[])
getKeywords g=new getKeywords();
g.resize(250,400);
g.setVisible(true);
public void actionPerformed(ActionEvent ae)
if(ae.getSource()==btnAdd)
lstCurModel.addElement(txtKey.getText());
if(ae.getSource()==btnRemove)
lstCurModel.remove(lstCur.getSelectedIndex());
if(ae.getSource()==btnSave)
//Code to Write
public void runExample()
//Parse the XML file and get the DOM object
ParseXMLFile();
//Get the Detail of the Image Document
parseImageDocument();
//Get the Detail of the LML Document
//parseLMLDocument();
//System.out.println(lmlval.Title);
public void ParseXMLFile()
//Get the Factory
DocumentBuilderFactory builderFac = DocumentBuilderFactory.newInstance();
try
//Using factory get an instance of the Document Builder
DocumentBuilder builder = builderFac.newDocumentBuilder();
//parse using builder to get DOM representation of the XML file
dom = builder.parse("LML.xml");
catch(ParserConfigurationException pce)
pce.printStackTrace();
catch(SAXException sax)
sax.printStackTrace();
catch(IOException ioex)
ioex.printStackTrace();
public void parseImageDocument()
//Get the root element
Element docImgEle = dom.getDocumentElement();
//Get a nodelist for <Image> Element
nodelstImage = docImgEle.getElementsByTagName("Image");
if(nodelstImage != null && nodelstImage.getLength() > 0)
for(int i = 0; i < nodelstImage.getLength(); i++)
//Get the LML elements
Element el = (Element)nodelstImage.item(i);
//Get the LML object
getImage myImgval = new getImage();
imgval = myImgval.getimage(el);
v.addElement(new String(imgval.Thumb));
String[] x = Pattern.compile(",").split(imgval.Keys);
for (int s=0; s<x.length; s++)
lstCurModel.addElement(x[s].trim());
//System.out.println(x[s].trim());
} Thanks
NitinYou should update your DOM document to represent the changes that you want made.
Then, using the Transformation API you simply transform your document onto a stream representing your file. Something like this:
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
// TODO - set indentation amount!
Source source = new DOMSource(dom);
Result result = new StreamResult(file);
transformer.transform(source, result);Hope this helps.
Maybe you are looking for
-
It appears that support has been cut off from the Canon XF series cameras. In FCP 7 its no problem to Log and Transfer footage from the CF Cards they use in NATIVE format, so I dont have to worry about transcoding..just have to copy my files over. No
-
Apostrophe in DBMS_OUTPUT.PUT_LINE
Following is a script i made for freeing up(SHRINK ing and resetting HWM) the space in Tables and its indexes. I don't know the escape character to use in the DBMS_OUTPUT shown in bold below create or replace procedure freeup_space is type v_segment_
-
I paid to be able to edit PDF documents and I still can not open and edit.
-
Hi All, I have a report generated in R/3 application server and file is placed in the R/3 application server under a particular folder, I want access this application server path in XI communication channel using NFS. While specifying the path in the
-
ATP and consequences on pricing and schedule lines
Dear all, We made an ATP check at schedule lines and item levels. We have two problems : 1. stock units are not the same as sales units. Is it possible to make ATP check based on quantities in sales units instead of basic units ? 2. pricing is perfor