Load Table Data into Excel Specific range
Hi,
I am working with Excel Destination in SSIS, where i have to insert table data into multiple excel sheets with specific range, sheet name same as table name and i should load each table into that particular sheet name in excel.
So Sheet name will decide at run time and i have created one variable to pass complete sheet name (like [DimAge$A16:R1000]) in excel destination, but it is throwing error Here i am facing two complexities
1)Getting error while passing excel sheet name as variable
2) How to insert into excel in specific range of values shown as above.
Ur help in solving this would be appreciated
Hi Naveen,
Based on my research, a worksheet or range is the equivalent of a table or view in Excel. The lists of available tables in the Excel Source and Destination editors display only existing worksheets (identified by the $ sign appended to the worksheet name,
such as Sheet1$) and named ranges (identified by the absence of the $ sign, such as MyRange).
So when you use a variable with [DimAge$A16:R1000] or [Select * from DimAge!A$16:R$1000] value in the Excel Destination, the value acts as a worksheet or range name. But there is no such worksheet or range in the excel file, so the error message occurs.
To fix this issue, please select the cell range in your excel sheet, then right-click the range to define a name for the range to create some ranges with the specific ranges in excel file, then in the "Name of the Excel Sheet" drop down box of
"Excel Destination Editor" you can see that Named range. Then simply select the range from the drop-down list or use a variable with the range name as the Excel Destination.
For more information about how to import data to Excel sheet's specific region, please refer to the following blog:
http://getsetsql.blogspot.in/2012/01/using-ssis-load-data-to-excel-sheet-at.html
Thanks,
Katherine Xiong
If you have any feedback on our support, please click
here.
Katherine Xiong
TechNet Community Support
Similar Messages
-
How to convert internal table data into excel format?
Hi all,
I want to convert internal table data in excel format and then
send it as email attachment in workflow.
Please tell me how do i perform this.
Regards,
Arpita.Hi Arpita,
Try this sample code::
Send mail
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
mailrec-receiver = 'your receiver mail id'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'EXL'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
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 SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Hope it will help you.
Regards,
NIkita -
Downloading table data into Excel sheet - Webdynpro Java
Hi All,
We have developed a custom webdynpro application that executes an RFC and displays data in Table UI element. We have provided a button to download the data in excel sheet. When data is huge like, total number of rows filled up in the table are around 11,000 & columns are 32, and when user tries to download whole 11000 rows in excel sheet, the timeout occurs after 20 mins due to huge data. But when I apply filtering on the same table data and then try to download some 700 rows out of 11000 into excel, it took me around 3.36 mins.
If anyone encountered such scenario in past, please guide in this regard to speed-up the download to excel functionality or suggest any other alternative.
We are using 7.3 Portal and tableUtilities java class for export to excel functionality.
Thanks,
Amol.hi monica ,
sorry im not able to understand properly ,
The server don't restarts automatically when we uploading a huge data, onlly we open the file instead of save the file.
If we save the file the problem is that when we try to open this, the process can take hours and sometimes excel is blocked
you mean that after saving the file to your desktop , having huge data you are not able to open the file i.e the excel file. your file gets blocked or consumes more time to open the file ,
or else when you are prompted for saving or opening , on click of opening you are facing the problem ?
let me be clear with your part , here your application deals with uploading the data from webdynpro table to excel sheet and allowing the end user to save or open the file right .
Regards
Govardan Raj S -
Download internal table data into excel sheet with column heading and data
Hi,
I am having one internal table with column headings and other table with data.
i want to download the data with these tables into an excel sheet.
It should ask the user for file name to save it on their own name. They should give the file name in runtime and it should be downloaded into an excel sheet.
Can anyone tell what is the right function module for downloading these two internal table data with column heading and data.
what we have to do for storing the file name in runtime.
Can anyone help me on this.
Thanks,
Rose.Hi Camila,
Try this
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = PATH2
FILETYPE = 'XLS'
TABLES
DATA_TAB = IT_DATA
FIELDNAMES = IT_HEADINGS
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22 -
Using VBA for loading Query data into Excel workbook
Hi all.
I want simply load data from BEx query into Excel Wortksheet using VBA because of report formats and footer section at the end of the results.
Any code examples, tutorials, comments, suggestions will be regarded.
thanx in advance,
GediminasThe difficalty is that I don't know the number of rows report will return. And I need my footer only on LAST page of workbook.
Another thing I can't imagine how to do by using standart BEx functionality is to design complex column header set (merged columns, sub-columns and etc.). -
Get data from view and displaying the table data into Excel pivot table
Hi All,
I have a small reqirement inthat When i get the data from the View that would displayed as Excel Pivot table.
For displaying gerneral data to Excel I have followed Binarcy cachey
Please suggest me in this.
Thanks,
Lohi.
Message was edited by:
Lohitha MTry this:
http://download-west.oracle.com/docs/html/B25947_01/bcservices005.htm#sthref681
Specifically code sample 8-10 for accessing the AM object.
Then use the findView method to get a pointer to the VO. -
Why can I not get this table data into Excel?
I want to use Excel to analyse some data from the local newspaper. The table of figures looks like this:
I've used the 'print' function from the online newspaper to create the pdfs, then run OCR. I can highlight the text and copy/paste it into a text document without any trouble, but I'd really like to have the data keep its columnar format. When I highlight a part of the table then use the right-click menu to 'save as table' or 'copy as table' or 'Open data in spreadsheet', nothing happens. What am I doing wrong?I would suggest you to try Acrobat XI once. The export quality with Acrobat XI is remarkably improved than it's predecessors.
You can download the trial version from http://www.adobe.com/cfusion/tdrc/index.cfm?product=acrobat_pro&loc=us -
Download Table Data into Excel with Less Size
Hi All,
In OBIEE 11.1.1.5, following are my finding of the File Sizes using Various Export Options.
I have used Default SampleAppLite RPD and Webcat , Order Details Report
No.of Records : 2000
Export Excel 2003+ (mht) : 3,812 KB
Export Power Point 2003+ : 8,901 KB
Export Power Point 2007 : 478 KB
Export Data CSV : 205 KB
Export Data Tab Delimited : 409 KB
When the viewscontrolmessages.xml is modified to from "Format=mht" to "Format=excel" for the Download to Excel option,
the filw size was reduced to
Export Excel (xls) : 2,748 KB
By observing the drastic reduction of file size in the Export to Power Point options between Version 2003 and 2007.
we are expecting that a Version Change in Excel might also reduce the Download Size to around 700 KB
But somehow we are not able to achieve this.
So please Suggest
Note: CSV is not an Option, as we loose all Formatting like Grand and Sub Totals and other data level formatting.Hi All,
In OBIEE 11.1.1.5, following are my finding of the File Sizes using Various Export Options.
I have used Default SampleAppLite RPD and Webcat , Order Details Report
No.of Records : 2000
Export Excel 2003+ (mht) : 3,812 KB
Export Power Point 2003+ : 8,901 KB
Export Power Point 2007 : 478 KB
Export Data CSV : 205 KB
Export Data Tab Delimited : 409 KB
When the viewscontrolmessages.xml is modified to from "Format=mht" to "Format=excel" for the Download to Excel option,
the filw size was reduced to
Export Excel (xls) : 2,748 KB
By observing the drastic reduction of file size in the Export to Power Point options between Version 2003 and 2007.
we are expecting that a Version Change in Excel might also reduce the Download Size to around 700 KB
But somehow we are not able to achieve this.
So please Suggest
Note: CSV is not an Option, as we loose all Formatting like Grand and Sub Totals and other data level formatting. -
Load XML data into MySQL table
I have numerous XML files, one for each record, with a structure like this (only a small part actually, each file is around 170 KB):
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<speccydata version="1.20.446" formatversion="2.0" languageID="0" time="20130323T222711" localtime="20130323T232711+0100">
<mainsection title="Summary">
<section title="Operating System" id="1">
<entry value="Microsoft Windows 8 Enterprise 64-bit" />
</section>
<section title="CPU" id="2">
<entry title="Intel Core i7 3930K @ 3.20GHz" value="32 °C" />
<entry title="Sandy Bridge-E 32nm Technology" value="" />
</section>
<section title="RAM" id="3">
<entry value="64,0 GB DDR3 @ 1091MHz (11-11-11-31)" />
</section>
<section title="Motherboard" id="4">
<entry title="ASUSTeK COMPUTER INC. P9X79 WS (LGA2011)" value="25 °C" />
</section>
<section title="Graphics" id="5">
<entry title="SyncMaster (1920x1080@60Hz)" value="" />
<entry title="SyncMaster (1920x1080@60Hz)" value="" />
<entry title="24W_LCD_TV (1920x1080@50Hz)" value="" />
<entry title="Microsoft Basic Render Driver" value="" />
<entry title="NVIDIA GeForce GTX 680" value="" />
</section>
<section title="Hard Drives" id="6">
<entry title="238GB Corsair Performance Pro (SSD)" value="" />
<entry title="238GB Corsair Performance Pro (SSD)" value="" />
<entry title="932GB Seagate ST1000NM0011 (SATA)" value="24 °C" />
<entry title="16764GB Areca ARC-1882-VOL#000 SCSI Disk Device (RAID)" value="" />
</section>
<section title="Optical Drives" id="7">
<entry title="HL-DT-ST BD-RE BH10LS38" value="" />
<entry title="HL-DT-ST BD-RE BH10LS38" value="" />
</section>
<section title="Audio" id="8">
<entry title="Realtek High Definition Audio" value="" />
</section>
</mainsection>
<mainsection title="Operating System" id="1">
<entry>
<entry title="Model" value="MS Windows 8" />
<entry title="Edition" value="Enterprise" />
<entry title="Architecture" value="64-bit" />
<entry title="Service Pack" value="" />
</entry>
I have a table in MySQL, where each record contains the name of the .XML file in a field.
I need to open the .XML file and load relevant data into a specific field for record 1, then repeat for record 2, until all records are filled with the data from the various .XML files. As an example from the above .XML code, I want to extract the BOLD information and get it into fields called:
os, cpu, ram, mobo, graphics, hard_drives, etc.
How to do that?Not a trivial task, but one that could be done by writing a script that queries the database to get the XML filename and the record's primary key.
You can then use SimpleXML to open the XML file, extract the values that you need, and store them in variables. Use the variables and primary key to build a SQL query to update the record with the data you have extracted. -
Hello all,
I want create a BSP page, with 2 radio buttons,
If 1st selected I want read 2 tables and display data other BSP page.
If 2nd one selected I want download 2 tables data into excel file.
Any one can help how to download data into excel file and display data into other bsp page.
Thanks,
Regards,
VenkatFor downloading to a spread sheet:
Convert your fetched data to a string and convert to XSTRING format and finally download to a spread sheet.
Sample: I selected data from vbak say vbeln and kunnr in an internal table.
data : v_string type string, v_xstring type xstring.
<header portion - to have the heading in the spread sheet>
concatenate 'Order Number' 'Customer'
cl_abap_char_utilities=>cr_lf into v_string
separated by cl_abap_char_utilities=>horizontal_tab.
<Line item entries from my internal table say i_vbak>
loop at i_vbak into wa_vbak.
concatenate v_string wa_vbak-vbeln wa_vbak-kunnr
cl_abap_char_utilities=>cr_lf into v_string
separated by cl_abap_char_utilities=>horizontal_tab.
endloop.
All the data is now in string format. Calling the FM to convert to XSTRING
call function 'SCMS_STRING_TO_XSTRING'
exporting
text = v_string
mimetype = 'APPLICATION/MSEXCEL; charset=utf-16le' (probably create this in a variable and call here)
importing
buffer = v_xstring.
concatenate cl_abap_char_utilities=>byte_order_mark_little v_xstring into v_xstring in byte mode.
Now we have it in XSTRING format - this can be downloaded to a spread sheet.
v_appl = 'APPLICATION/MSEXCEL; charset=utf-16le'.
runtime->server->response->set_header_field( name = 'content-type' value = v_appl ).
Eliminating the cache problems when loading Excel Format
runtime->server->response->delete_header_field( name = if_http_header_fields=>cache_control ).
runtime->server->response->delete_header_field( name = if_http_header_fields=>expires ).
runtime->server->response->delete_header_field( name = if_http_header_fields=>pragma ).
Start excel in a separate window
runtime->server->response->set_header_field( name = 'content-disposition' value = 'attachment; filename=Order_list.xls' ).
Displaying the data in excel.
v_len = xstrlen( v_xstring ).
runtime->server->response->set_data( data = v_xstring length = v_len ).
navigation->response_complete( ).
All the above code can be written in onInputprocessing event (probably your loop/selection can be in a method of your appl class).
I believe you are triggering the event based on a click (say radio button or a button after selecting the radiobutton).
In the other screen you can use tableview to display your data - probably two sub screens(page fragment) to display each table.
Regds,
Krish -
Download internal table data to Excel in background
Hi all ,
Can anyone tell that how i can download internal table data
into Excel sheet in Backgroud Mode .
I used both fun mod ws and gui download but these are not working in background mod .
Please help issue is urgent .
Answer is rewarded by point .
With Regards ,
Nilesh Jainhi,
you have to use function module 'SAP_CONVERT_TO_XLS_FORMAT'.
DATA:
ITAB1 TYPE TRUXS_T_TEXT_DATA.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = ';'
I_LINE_HEADER =
i_filename = filename
I_APPL_KEEP = ' '
tables
i_tab_sap_data = itab
CHANGING
I_TAB_CONVERTED_DATA = itab1
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
try this one.
reward points if useful,
thanks & regards,
rajee. -
Export Data into Excel Sheet in UNIX
Hi All
How to export the table data into excel sheet in unix.
ThanksCreate a csv file. A csv file is just an ascii file, so it doesn't matter what OS you are on.
-
How to download data into excel by displaying field names in top 2 rows
Hi experts,
i am trying to download an internal table data into excel(open office) by reserving top 2 rows. In 1st row i want to display tech.name where as in 2nd row i want to display discription of tech name of the fields. Well, i tried with FM gui_upload and used fieldnames parameter and even its working too but i'm unable to work with 2nd col.
Please help me out....
with regards.
Praveen.Try this code:
If IT_FINAL is the internal table containing the data that you want to download :
IF IT_FINAL[] IS INITIAL.
WRITE : 'No Data Fetched'.
ELSE.
Build header table Field catelague
PERFORM UR_FIELDCAT_BUILD USING G_F_REPNM
'IT_FINAL'
CHANGING IT_FCAT_001.
DATA: L_F_LINES TYPE I,
L_F_FROM TYPE I,
L_F_TO TYPE I,
L_F_DIFF TYPE I,
L_TEMP_FINAL LIKE TABLE OF IT_FINAL.
DESCRIBE TABLE IT_FINAL LINES L_F_LINES.
IF L_F_LINES > 16000.
L_F_FROM = 1.
L_F_TO = 16000.
DO.
APPEND LINES OF IT_FINAL FROM L_F_FROM
TO L_F_TO TO L_TEMP_FINAL.
PERFORM DOWNLOAD_DATA_HEADER TABLES L_TEMP_FINAL
IT_FCAT_001
USING GF_FILE1.
IF L_F_TO >= L_F_LINES.
EXIT.
ENDIF.
L_F_FROM = L_F_TO + 1.
L_F_DIFF = L_F_LINES - L_F_TO.
IF L_F_DIFF >= 16000.
L_F_TO = L_F_TO + 16001.
ELSE.
L_F_TO = L_F_LINES.
ENDIF.
REFRESH: L_TEMP_FINAL.
ENDDO.
ELSE.
PERFORM DOWNLOAD_DATA_HEADER TABLES IT_FINAL
IT_FCAT_001
USING GF_FILE1.
ENDIF.
ENDIF.
FORM UR_FIELDCAT_BUILD
USING P_REPID
P_TABNAM
CHANGING C_T_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
REFRESH C_T_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = P_REPID
I_INTERNAL_TABNAME = P_TABNAM
I_STRUCTURE_NAME = 'TY_FLODAT'
I_INCLNAME = P_REPID
I_BYPASSING_BUFFER = 'X'
CHANGING
CT_FIELDCAT = C_T_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
ENDFORM.
FORM DOWNLOAD_DATA_HEADER
TABLES T_OUTTAB
T_FIELDCAT
USING P_FILENAM.
TYPE-POOLS: SLIS.
REPLACE 'YYYYMMDD' WITH SY-DATUM INTO P_FILENAM.
DATA: T_GXXLT_O TYPE TABLE OF GXXLT_O WITH HEADER LINE,
T_GXXLT_H TYPE TABLE OF GXXLT_H WITH HEADER LINE,
T_GXXLT_H_TEMP TYPE TABLE OF GXXLT_H WITH HEADER LINE,
T_GXXLT_P TYPE TABLE OF GXXLT_P WITH HEADER LINE,
T_GXXLT_S TYPE TABLE OF GXXLT_S WITH HEADER LINE,
T_GXXLT_V TYPE TABLE OF GXXLT_V WITH HEADER LINE,
L_S_FIELDCAT TYPE SLIS_FIELDCAT_ALV..
DATA: F_FILE TYPE GXXLT_F-FILE,
F_ATT_COLS TYPE I,
F_HRZ_KEYS TYPE I,
F_VRT_KEYS TYPE I.
TYPES: BEGIN OF TY_FLDNM,
FIELDNAME(30) TYPE C,
END OF TY_FLDNM.
DATA : L_T_FLDNAME TYPE TABLE OF TY_FLDNM,
L_R_FLDNAME TYPE TY_FLDNM.
REFRESH: L_T_FLDNAME.
LOOP AT T_FIELDCAT INTO L_S_FIELDCAT .
CLEAR L_R_FLDNAME.
CONCATENATE L_S_FIELDCAT-SELTEXT_S '_'
L_S_FIELDCAT-FIELDNAME
INTO L_R_FLDNAME-FIELDNAME.
APPEND L_R_FLDNAME TO L_T_FLDNAME.
ENDLOOP.
IF T_OUTTAB[] IS INITIAL.
WRITE : /'No data Fetch !'.
ELSE.
DESCRIBE TABLE T_FIELDCAT LINES F_ATT_COLS.
LOOP AT T_FIELDCAT INTO L_S_FIELDCAT.
T_GXXLT_H-COL_NO = L_S_FIELDCAT-COL_POS.
T_GXXLT_H-ROW_NO = 1.
T_GXXLT_H-COL_NAME = L_S_FIELDCAT-FIELDNAME.
APPEND T_GXXLT_H.
CLEAR T_GXXLT_S.
T_GXXLT_S-COL_NO = L_S_FIELDCAT-COL_POS.
T_GXXLT_S-COL_OPS = 'NOP'.
T_GXXLT_S-COL_SRC = L_S_FIELDCAT-COL_POS.
CASE L_S_FIELDCAT-INTTYPE.
WHEN 'Z' OR 'P' OR 'I' OR 'F'.
T_GXXLT_S-COL_TYP = 'NUM'.
WHEN 'C' OR 'X' OR 'T' OR 'N'.
T_GXXLT_S-COL_TYP = 'STR'.
WHEN 'D'.
T_GXXLT_S-COL_TYP = 'DAT'.
WHEN OTHERS.
T_GXXLT_S-COL_TYP = 'STR'.
ENDCASE.
APPEND T_GXXLT_S.
IF L_S_FIELDCAT-KEY EQ 'X'.
CLEAR T_GXXLT_H.
T_GXXLT_H-COL_NO = L_S_FIELDCAT-COL_POS.
T_GXXLT_H-ROW_NO = 1.
T_GXXLT_H-COL_NAME = L_S_FIELDCAT-FIELDNAME.
APPEND T_GXXLT_H.
ENDIF.
ENDLOOP.
MOVE P_FILENAM TO F_FILE.
LOOP AT T_FIELDCAT INTO L_S_FIELDCAT.
READ TABLE T_GXXLT_H WITH KEY COL_NAME = L_S_FIELDCAT-FIELDNAME.
IF SY-SUBRC EQ 0.
T_GXXLT_H_TEMP-COL_NO = T_GXXLT_H-COL_NO.
T_GXXLT_H_TEMP-ROW_NO = 2.
T_GXXLT_H_TEMP-COL_NAME = L_S_FIELDCAT-SELTEXT_S.
APPEND T_GXXLT_H_TEMP TO T_GXXLT_H.
CLEAR T_GXXLT_H.
ENDIF.
ENDLOOP.
CALL FUNCTION 'XXL_FULL_API'
EXPORTING
FILENAME = F_FILE
NO_START = ''
N_ATT_COLS = F_ATT_COLS
N_HRZ_KEYS = F_HRZ_KEYS
N_VRT_KEYS = F_VRT_KEYS
SEMA_TYPE = ''
SO_TITLE = ''
TABLES
DATA = T_OUTTAB
HKEY = T_GXXLT_H
ONLINE_TEXT = T_GXXLT_O
PRINT_TEXT = T_GXXLT_P
SEMA = T_GXXLT_S
VKEY = T_GXXLT_V
EXCEPTIONS
CANCELLED_BY_USER = 1
DATA_TOO_BIG = 2
DIM_MISMATCH_DATA = 3
DIM_MISMATCH_SEMA = 4
DIM_MISMATCH_VKEY = 5
ERROR_IN_HKEY = 6
ERROR_IN_SEMA = 7
FILE_OPEN_ERROR = 8
FILE_WRITE_ERROR = 9
INV_DATA_RANGE = 10
INV_WINSYS = 11
INV_XXL = 12
OTHERS = 13.
ENDIF.
ENDFORM. -
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.
Maybe you are looking for
-
IF EXIT and Checkbox.. need help
Hi there, i have a Problem. I am new in ABAP and try out now a lot of thing. Now i have a problem and i dont know how to solve it... Here is my Code.. After that i tell you my problem. *& Report Z_TEILNEHMERLISTE_EINFUEGEN REPORT Z_TEILNEHMERLISTE_
-
Unable to print on HP J6480 after installing Snow Leopard
After installing Snow Leopard I've been unable to print from my HP J6480. I get an error message saying to check for updates from Apple and the manufacturer. Apple shows no more updates. I've added a printer driver v2.6 from Apple, but that hasn't
-
How to sync iPhone with new Mac without losing all my iTunes?
I have recently got a new MacBook after my old one crashed... but I have been told that anything not bought would be lost when I sync my iPhone with my new Mac... I have already transferred the bought songs etc... is there a way (cheap or free if pos
-
NI USb 6211 DAQ to get a signal inside the computer
I am using Ni USb6211 DAQ to get a signal inside the computer, but the signal displayed as blocks of samples and I need contiuous signal display, I mean instance signal. Could you please help me?
-
RV042G HW V1 (Need Firmware)
Hello Community, I have A Small Business Router VPN RV042G V01, Having problems with current firmware need to downgrade or upgrade. I can find any firmware, does someone have a file I can use, old or new would be great. Cisco only has HW version 3 to