Metadata from excel file
Hi
we have ep6 sp16 on win2003/mssql .
does anybody now how can we get metadata from excel file.
meaning we want to take the list of the metadata parameter
from excel file instead from csv list .
Thank you
Amit Zait
Does anybody have any ideas?
I believe this is possible but you need to use a custom script for that, try the dedicated Bridge Scripting Forum for this request, I think you might have success there.
http://forums.adobe.com/community/bridge/bridge_scripting
Similar Messages
-
hi guru,
I want to upload data from excel file for mm02.. first of all help on the matter of how to upload data from excel...
i hv used the FM ALSM_EXCEL_TO_INTERNAL_TABLE.. but its not working it uploading garbage value ... so tell me how to used it...
help me on this matter.Check below example.
parameters : p_file LIKE rlgrap-filename OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM get_file_name.
PERFORM get_file_to_excel.
*& Form get_file_name
FORM get_file_name.
DATA: lv_name LIKE sy-repid.
lv_name = sy-repid..
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = lv_name
dynpro_number = syst-dynnr
static = 'X'
CHANGING
file_name = p_file.
ENDFORM. " get_file_name
*& Form get_file_to_excel
FORM get_file_to_excel.
DATA: idata LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = '1'
i_begin_row = '2' "Do not require headings
i_end_col = '2'
i_end_row = '60000'
TABLES
intern = idata
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
STOP.
ENDIF.
* Get first row retrieved
READ TABLE idata INDEX 1.
* Set first row retrieved to current row
DATA: gd_currentrow TYPE i.
gd_currentrow = idata-row.
LOOP AT idata.
* Reset values for next row
IF idata-row NE gd_currentrow.
APPEND f. CLEAR f.
gd_currentrow = idata-row.
ENDIF.
CASE idata-col.
WHEN '0001'.
f-belnr = idata-value.
ENDCASE.
ENDLOOP.
APPEND f. CLEAR f. -
Upload data from excel file to mii without UDS and PCo
Hi Experts,
I am trying to upload data from excel file to mii db without using UDS and PCo. Is there any other ways that we can achieve it.
I am thinking one solution , writing stored procedure. any other solutions?
Thanks in advance,
Eswar.Hi,
Thanks for reply.
I tried to create OLEDB data server which will point to my excel file in D drive.Its created successfully and i tried to query the datasource using sql query, I am not getting any modes in sql query template.
can u provide some steps..how to access this file.
Thanks, Eswar -
Upload data from excel file to Oracle table
Dear All,
I have to upload data from excel file to Oracle table without using third party tools and without converting into CSV file.
Could you tell me please how can i do this using PLSQl or SQL Loader.
Thnaks in Advance..Dear All,
I have to upload data from excel file to
Oracle table without using third party tools and
without converting into CSV file.
Could you tell me please how can i do this
using PLSQl or SQL Loader.
Thnaks in Advance..As billy mentioned using ODBC interface ,the same HS service which is a layer over using traditional ODBC to access non oracle database.Here is link you can hit and trial and come out here if you have any problem.
http://www.oracle-base.com/articles/9i/HSGenericConnectivity9i.php[pre]
Khurram -
How to import data into a Z table from excel file?
hi,
i have a custom created Z table into which i want to import some data from an excel file. which function can i use to do so because SE16 allows me to insert data only one by one via a data entry screen. this is time consuming. i want to import data from excel file so that its faster.HI,
this program uploads data from excel and modifies ztable,(inserts records into ztable), check this and modify according to ur requirement)
This program uploads material number from excel sheet and does
******modifications to material number if required by the user
******and updates the table zmatnr with new material against the old material number
REPORT zmat_no message-id zebg.
TYPE-POOLS truxs.
TABLES:zmatnr.
DATA : itab LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
DATA row LIKE alsmex_tabline-row.
data : g_matnr like mara-matnr.
data : count type i.
data : itab_count type i.
data : gi_final like zmatnr occurs 0 with header line.
*data : begin of gi_final occurs 0,
mat_old like mara-matnr,
mat_new like mara-matnr,
end of gi_final.
***********************Selection Screen*************************
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETER : pfname LIKE rlgrap-filename OBLIGATORY.
select-options : records for count.
SELECTION-SCREEN END OF BLOCK b1.
*********************At Selection Screen*************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfname.
PERFORM search.
START-OF-SELECTION.
perform process.
form process.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = pfname
i_begin_col = 1
i_begin_row = 2
i_end_col = 12
i_end_row = 65000
TABLES
intern = itab
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
describe table itab lines itab_count.
row = 1.
loop at itab.
if itab-row <> row.
append gi_final.
clear gi_final.
endif.
case itab-col.
when '1'.
CLEAR G_MATNR.
gi_final-OLD_MATNR = itab-value.
CONCATENATE 'NEW' gi_final-old_matnr INTO itab-value.
gi_final-new_MATNR = itab-value.
endcase.
row = itab-row.
append gi_final.
clear gi_final.
endloop.
CALL FUNCTION 'PROGRESS_INDICATOR'
EXPORTING
I_TEXT = 'File Has Been Successfully Uploaded from Workstation ' .
if not gi_final[] is initial.
if not records-low is initial .
if not records-high is initial.
records-high = records-high + 1.
DESCRIBE TABLE gi_final LINES count.
IF records-high < count.
DELETE gi_final FROM records-high TO count.
ENDIF.
IF records-low <> 1.
IF records-low <> 0.
DELETE gi_final FROM 1 TO records-low.
ENDIF.
ENDIF.
endif.
endif.
endif.
IF NOT GI_FINAL[] IS INITIAL.
CALL FUNCTION 'PROGRESS_INDICATOR'
EXPORTING
I_TEXT = 'Processing zmatnr table'
I_OUTPUT_IMMEDIATELY = 'X'.
if itab_count <> count.
message i000 with 'records are not matching'.
exit.
else.
modify zmatnr from table gi_final.
message i000 with 'data base table modified successfully'.
endif.
endif.
endform.
*& Form search
text
--> p1 text
<-- p2 text
FORM search .
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
static = 'X'
CHANGING
file_name = pfname.
ENDFORM. " search
regards
siva -
How to read the data from Excel file and Store in XML file using java
Hi All,
I got a problem with Excel file.
My problem is how to read the data from Excel file and Store in XML file using java excel api.
For getting the data from Excel file what are all the steps i need to follow to get the correct result.
Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
Thanks & Regards,
Sreenu,
[email protected],
india,If you want someone to do your work, please have the courtesy to provide payment.
http://www.rentacoder.com -
Reading the data from excel file which is in application server.
Hi,
Iam trying to read the data from excel file which is in application server.
I tried using the function module ALSM_EXCEL_TO_INTERNAL_TABLE. But it didn't work.
I tried just reading using open data set and read data set it is giving junk characters.
Please suggest me if you have any solution.
Best Regards,
Brahma ReddyHi Narendra,
Please see the below code I have written
OPEN DATASET pa_sfile for INPUT in text mode ENCODING DEFAULT MESSAGE wf_mess.
CHECK sy-subrc = 0.
DO.
READ DATASET pa_sfile INTO wf_string.
IF sy-subrc <> 0.
EXIT.
else.
split wf_string at wl_# into wf_field1 wf_field2 wa_upload-field3
wa_upload-field4 wa_upload-field5 wa_upload-field6 wa_upload-field7 wa_upload-field8
wa_upload-field9 wa_upload-field10 wa_upload-field11 wa_upload-field12 wa_upload-field13
wa_upload-field14 wa_upload-field15 wa_upload-field16 wa_upload-field17 wa_upload-field18
wa_upload-field19 wa_upload-field20 wa_upload-field21 wa_upload-field22 wa_upload-field23
wa_upload-field24 wa_upload-field25 wa_upload-field26 wa_upload-field27 wa_upload-field28
wa_upload-field29 wa_upload-field30 wa_upload-field31 wa_upload-field32 wa_upload-field33
wa_upload-field34 wa_upload-field35 wa_upload-field36 .
wa_upload-field1 = wf_field1.
wa_upload-field2 = wf_field2.
append wa_upload to int_upload.
clear wa_upload.
ENDIF.
ENDDO.
CLOSE DATASET pa_sfile.
Please note Iam using ECC5.0 and it is not allowing me to declare wl_# as x as in your code.
Also if Iam using text mode I should use extension encoding etc.( Where as not in your case).
Please suggest me any other way.
Thanks for your help,
Brahma Reddy -
How to Load the data from excel file(Extension is .CSV) into the temp.table
Hi
How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
Kindly Suggest the Solution.
Regards,
SachinHello Sachin,
You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
Instead of copy values into forms you can save them in your temporary table.
Kind regards,
Alex
If someone's helpful or correct please mark it accordingly. -
How to load the data from excel file into temprory table in Forms 11g?
Hi
How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
Kindly Suggest the Solution.
Regards,
SachinDeclare
v_full_filename varchar2(500);
v_server_path varchar2(2000);
v_separator VARCHAR2(1);
v_filename VARCHAR2(400);
filename VARCHAR2 (100);
v_stop_load varchar2 (2000);
v_rec_error_log varchar2(4000);
v_error_log varchar2(4000);
ctr NUMBER (12);
cols NUMBER (2);
btn number;
RES BOOLEAN;
application ole2.obj_type;
workbooks ole2.obj_type;
workbook ole2.obj_type;
worksheets ole2.obj_type;
worksheet ole2.obj_type;
cell ole2.obj_type;
cellType ole2.OBJ_TYPE;
args ole2.obj_type;
PROCEDURE olearg
IS
args ole2.obj_type;
BEGIN
args := ole2.create_arglist;
ole2.add_arg (args, ctr);
ole2.add_arg (args, cols);
cell := ole2.get_obj_property (worksheet, 'Cells', args);
ole2.destroy_arglist (args);
END;
BEGIN
v_full_filename := client_get_file_name(directory_name => null
,file_name => null
,file_filter => 'Excel files (*.xls)|*.xls|'
||'Excel files (*.xlsx)|*.xlsx|'
,message => 'Choose Excel file'
,dialog_type => null
,select_file => null
If v_full_filename is not null Then
v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
v_filename := v_separator||v_full_filename ;
:LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);
RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));
--Begin load data from EXCEL
BEGIN
filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
application := ole2.create_obj ('Excel.Application');
ole2.set_property (application, 'Visible', 'false');
workbooks := ole2.get_obj_property (application, 'Workbooks');
args := ole2.create_arglist;
ole2.add_arg (args, filename); -- file path and name
workbook := ole2.get_obj_property(workbooks,'Open',args);
ole2.destroy_arglist (args);
args := ole2.create_arglist;
ole2.add_arg (args, 'Sheet1');
worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
ole2.destroy_arglist (args);
ctr := 2; --row number
cols := 1; -- column number
go_block('xxx');
FIRST_RECORD;
LOOP
--Column 1 VALUE --------------------------------------------------------------------
olearg;
v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
:item1 := v_stop_load;
cols := cols + 1;
--Column 2 VALUE --------------------------------------------------------------------
olearg;
:item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
cols := cols + 1;
--<and so on>
ole2.invoke (application, 'Quit');
ole2.RELEASE_OBJ (cell);
ole2.RELEASE_OBJ (worksheet);
ole2.RELEASE_OBJ (worksheets);
ole2.RELEASE_OBJ (workbook);
ole2.RELEASE_OBJ (workbooks);
ole2.RELEASE_OBJ (application);
END;
--End load data from EXCELPlease mark it as answered if you helped. -
How to load the data from excel file into table in oracle using UTL_FI
How to load the data from excel file into table in oracle
and from table to excel file
using UTL_FILE package
Please give me some exampleThis is something i tried in oracle apex
http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
Regards,
CKLP -
Error in reading from excel file
hi,
I have written a program which reads from excel file
and based on the value of the column i have to do something.
Everything is fine but when i run it, it produces an error message
Exception: For input string: "851.0"
the value 851.0 is acually the value of the first column.
Here is the code and i hope someone can help me to find the solution
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection( "jdbc:odbc:exceltest" );
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){
String columnValue1 = rs.getString(i);
custNo =Integer.parseInt(columnValue1);
// System.out.println(columnValue1);
found=search(custNo);
if (found==false)
insert(custNo);
System.out.println(columnValue1);
else if (i == numberOfColumns && found==false)
String columnValue = rs.getString(i);
if(columnValue=="a")
incrementCusta();
else if (columnValue=="b")
incrementCustB();
else if(columnValue=="c")
incrementCustc();
else if(columnValue=="d")
incrementCustId();
System.out.println("");
st.close();
con.close();
} catch(Exception ex) {
System.err.print("Exception: ");
System.err.println(ex.getMessage());
}Maybe 851.0 is float value, not string.
Try Object columnValue1 =
rs.getObject(i); instead of String
columnValue1 = rs.getString(i);
You are absolutely right i actually change the line
custNo =Integer.parseInt(columnValue1);
into
custNo =Double.parseDouble(columnValue1);
Thanks alot :) -
Error while uploading data to ztable from excel file
Hi,
I have a requirement where i have to upload data from excel file to ztable.I have used the fm 'ALSM_EXCEL_TO_INTERNAL_TABLE' for reading the excel file.After reading the excel file i have used INSERT zrb_hdr from table t_zrb_hdr for updating the ztable with data .
here it is giving error as the data base table zrb_hdr and the internal table t_zrb_hdr should be declared of same type .
I got this error b'coz i have changed the date and time fields in t_zrb_hdr table to char type.so the structure of zrb_hdr and t_zrb_hdr are not same.If i don't change the date and time fields,in the o/p i am not getting proper date and time formats.
now how can i upload data into ztable?Hi,
Try this.
Data: itab type standard table of ztable,
wa_itab type ztable.
loop at t_zrb_hdr into wa_t_zrb_hdr.
wa_itab-date = wa_t_zrb_hdr-date.
wa_itab-time = wa_t_zrb_hdr-time.
like move all the fiedl to wa_itab...........
append itab with wa_itab.
Endloop.
now insert the records from itab to the database table ztable.
Thanks,
Muthu. -
Error
[Load data from excel file [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There
may be error message
I am using BIDS Microsoft Visual Studio 2008 and running the package to load the data from excel .
My machine has 32 bit excel hence have set property to RUN64BITRUNTIME AS FALSE.
But the error still occurs .
I checked on Google and many have used Delay validation property at Data flow task level to true but even using it at both excel connection manager and DFT level it doesnt work
MudassarThats my connection string
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\SrcData\Feeds\Utilization.xlsx;Extended Properties="Excel 12.0;HDR=NO";
Excel 2010 installed and its 32 bit edition
Are you referring to install this component -AccessDatabaseEngine_x64.exe?
http://www.microsoft.com/en-us/download/details.aspx?id=13255
Mudassar
You can try an OLEDB provider in that case
see
http://dataintegrity.wordpress.com/2009/10/16/xlsx/
you might need to download and install ms access redistributable
http://www.microsoft.com/en-in/download/details.aspx?id=13255
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Hi,
is it possible to create a PO up-loading an Excel file (in the file I have material code, description, quantity, price, etc...).
Thanks
FabioHi,
It is possible to upload PO data directly from excel. In my case, I am using PO BAPI to upload open POs and uploading data from excel file.
At the selection of screen, just call the function;
CALL FUNCTION 'WS_FILENAME_GET' " To get the flat file to SAP
EXPORTING
def_filename = '*'
mask = '.xls'
Take help of ABAPer to do this. -
Reading long text from excel file to an internal table
Hi
Can any body tell me how to read long text from excel file to an internal table.
When i am using this FM KCD_EXCEL_OLE_TO_INT_CONVERT then it is reading only 32 characters from each cell.
But in my excel sheet in one of the cell has very long text which i need to upload into a internal table.
may i know which FM or what logic i need to use for this problem.
RegardsHi,
Here is an example program. It will upload an Excel file with two columns. You could also assign the Excel structure dynamically, but I wanted to keep the example simple. The main point is that the internal table (it_excel in this example) must match the Excel structure that you want to convert.
Remember, this is just an example to help you figure out how to properly use the technique. It will certainly need to be modified to fit your requirements, and as always there may be a better way to get the Excel converted... this is just one possibility that has worked for me in the past.
*& Report zexcel_upload_test *
REPORT zexcel_upload_test.
TYPE-POOLS: truxs.
TYPES: BEGIN OF ty_excel,
col_a(10) TYPE n,
col_b(35) TYPE c,
END OF ty_excel.
DATA: l_data_tab TYPE TABLE OF string,
l_text_data TYPE truxs_t_text_data,
l_gui_filename TYPE string,
it_excel TYPE TABLE OF ty_excel.
FIELD-SYMBOLS: <wa_excel> TYPE ty_excel.
PARAMETERS: p_file TYPE rlgrap-filename.
* Pass the file name in the correct format
l_gui_filename = p_file.
* Upload data from PC
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_gui_filename
filetype = 'ASC'
has_field_separator = 'X'
CHANGING
data_tab = l_data_tab
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.
IF sy-subrc <> 0.
* MESSAGE ...
EXIT.
ENDIF.
* Convert from Excel into the appropriate itab
l_text_data[] = l_data_tab[].
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
i_tab_raw_data = l_text_data
i_filename = p_file
TABLES
i_tab_converted_data = it_excel
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ...
EXIT.
ENDIF.
LOOP AT it_excel ASSIGNING <wa_excel>.
* Do something here...
ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM filename_get CHANGING p_file.
* FORM filename_get *
FORM filename_get CHANGING p_in_file TYPE rlgrap-filename.
DATA: l_in_file TYPE string,
l_filetab TYPE filetable,
wa_filetab TYPE LINE OF filetable,
l_rc TYPE i,
l_action TYPE i,
l_init_dir TYPE string.
* Set the initial directory to whatever you want it to be
l_init_dir = 'C:\'.
* Call the file open dialog without multiselect
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Load file'
default_extension = '.XLS'
default_filename = l_in_file
initial_directory = l_init_dir
multiselection = 'X'
CHANGING
file_table = l_filetab
rc = l_rc
user_action = l_action
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
OTHERS = 4.
IF sy-subrc <> 0.
REFRESH l_filetab.
ENDIF.
* Read the selected filename
READ TABLE l_filetab INTO wa_filetab INDEX 1.
IF sy-subrc = 0.
p_in_file = wa_filetab-filename.
ENDIF.
ENDFORM. " filename_get
Regards,
Jamie
Maybe you are looking for
-
Database Instance Using Swap Space even When There is Plenty of Free RAM
Hi, I am facinga strange issue in oracle on solaris 5.10 Platform:solaris 5.10 Database version:11.2.0.1.0 Our database Instance Using Swap Space even When There is Plenty of Free RAM. We have 80GB of physical RAM, 32GB is set to oracle SGA_MAX_SIZE
-
Hi All, We are invoking one procedure from BPEL and the procedure returns output with *�* and while assigning the the same to output variable to BPEL. It was throwing error while invoking BPEL from Console. Any help is highy appreciated. Thanks, N
-
Stage3D and Flash issues with Chrome
I was playing The Last Stand Dead Zone earlier with all of the settings i nthe flash game set to max and now I HAVE to play it on the lowest setting. Also my Nvidia 765m is apparantly now supported by Stage3D or whatever it is. I really have no idea
-
My return and shift key stopping working
my return and shift key stopping working. It wont go to the next line or function as an enter. Now, most of the time it wont do anything but if you push it several times it will type a 0p or /- or control volume the instead. I checked the keyboard se
-
PDFs are rendered wrongly on Adobe DC (tested with Samsung Galaxy S5)
Hello, I'm having troubles with Adobe Reader for Android on PDFs like this one: http://laser4fun.it/accesso_giocatori/scarica_classifica/3889/00cb8a17b066fa102a31866fd896 98d6/Team%20Basic%20F.A.%20-%20Bergamo%20-%2012-04-2015%20-%2000-45%20%283889%2