Problem with GUI_UPLOAD using excel sheet
Hi,
I am trying to upload excel sheet thru GUI_UPLOAD ... this excel sheet has a header line and 3 line of data. Even if I remove the header line then also the internal while debugging is showing 28 lines of entries with "#" "squares" in some columns ... while in others where data should be there shows all Zeros....
The excel sheet has the following info
Rate Type Valid From Date From Currency To Currency Indirect Quote Direct Quote
M 29.09.2006 SGD USD 1.6932
M 29.09.2006 USD SGD 1.6932
M 29.09.2006 SGD MYR 2.19653
KURST GDATU FCURR TCURR INUKURS DUKURS
###ࡱ |########|#####|### #| 0.00000 |0.00000 |
##29 |00000000| | | 0.00000 |0.00000 |
o#d# |00000000| | | 0.00000 |0.00000 |
The code that I am writing is as follows:-
*& INTERNAL TABLES
DATA : BEGIN OF T_INPUT occurs 0,
KURST LIKE TCURV-KURST, " Exchange rate type
GDATU LIKE SY-DATUM, " Date from which rate is effective
FCURR LIKE TCURC-WAERS, " From currency
TCURR LIKE TCURC-WAERS, " To currency
INUKURS LIKE TCURR-UKURS, " Indirect Quote
DUKURS LIKE TCURR-UKURS, " Direct Quote
END OF T_INPUT.
S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Perform to upload the excel file.
PERFORM UPLOAD_EXCEL_FILE.
FORM UPLOAD_EXCEL_FILE .
DATA: L_FILENM TYPE STRING.
L_FILENM = P_FILENM.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = L_FILENM
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = T_INPUT
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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hi SB,
pls change the data type declared for 'valid from date'
from
DATA : BEGIN OF T_INPUT occurs 0,
KURST LIKE TCURV-KURST, " Exchange rate type
<b>GDATU LIKE SY-DATUM,</b> " Date from which rate is effective
FCURR LIKE TCURC-WAERS, " From currency
TCURR LIKE TCURC-WAERS, " To currency
INUKURS LIKE TCURR-UKURS, " Indirect Quote
DUKURS LIKE TCURR-UKURS, " Direct Quote
END OF T_INPUT.
to
DATA : BEGIN OF T_INPUT occurs 0,
KURST LIKE TCURV-KURST, " Exchange rate type
GDATU(10) type c, " Date from which rate is effective
FCURR LIKE TCURC-WAERS, " From currency
TCURR LIKE TCURC-WAERS, " To currency
INUKURS LIKE TCURR-UKURS, " Indirect Quote
DUKURS LIKE TCURR-UKURS, " Direct Quote
END OF T_INPUT.
Cheers,
Vikram
Please reward for helpful replies!!
Similar Messages
-
Encountering problems with exporting complex excel sheets to SWF
Please help me with this problem:
I have a complex Excel sheet, with functions like VERT.LOOKUP, INDEX etc. This should work in Xcelsius, but I have problems when having a preview in SWF. In the Xcelsius Present 2008 drawing window, all buttons work perfectly, but when I preview it, all outcomes are gone (buttons do work).
When removing VERT.LOOKUP and table shortnames (see example) it sometimes does work. So my guess is that SWF does not support VERT.LOOKUP and/or table shortnames. Does anyone know anything about this problem and maybe can help me? I use the 30-day trial version of Xcelsius Present.
Table example:
_______PROD1____PROD2____PROD3
YEAR1___10________20________30
YEAR2___20________15________50
YEAR3___30________10________100
In Excel, when you give names to this table (Insert/Name/Make --> columns & rows), you can get info out of this table with the simple function =YEAR1 PROD2. --> 20.
Thank you very much!Yeah, I know. But VERT.LOOKUP is supported. The strange thing about this is dat Xcelsius is displaying is well when not in the preview mode.
-
Uploading the Data into BDC using Excel sheet
HI Gurus,
Iam uploading the Data Using Excel sheet.TCode:qp01.
Upto 3 screens the data is passing in a very fine manner.
From the fourth screen I'v to enter the Lineitem for a single material.
Ex: Matnr is PJBRIX.
For this material upto 3 screens the data is same ,but from the line item data,the PJBRIX has 3 characterstics.
How can I upload that data.
Structure:
Matnr Group GroupCounter MicCode Method Lower Upper
Pjbrix 5 6 zsr001 zsr001 1 15
Pjbrix 5 6 zsr002 zsr003 4 20
Pjbrix 5 6 zsr006 zsr0018 2 18
This is the Structure.
Pls gv me the advise or Gv me the code asap.
thanks in advance.HI Gurus,
Iam uploading the Data Using Excel sheet.TCode:qp01.
Upto 3 screens the data is passing in a very fine manner.
From the fourth screen I'v to enter the Lineitem for a single material.
Ex: Matnr is PJBRIX.
For this material upto 3 screens the data is same ,but from the line item data,the PJBRIX has 3 characterstics.
How can I upload that data.
Structure:
Matnr Group GroupCounter MicCode Method Lower Upper
Pjbrix 5 6 zsr001 zsr001 1 15
Pjbrix 5 6 zsr002 zsr003 4 20
Pjbrix 5 6 zsr006 zsr0018 2 18
This is the Structure.
Pls gv me the advise or Gv me the code asap.
thanks in advance. -
Problem with BAPI_CUSTOMER_CREATEFROMDATA1 using JCo on IDES
sorry, wrong board - i opened a new post
Problem with BAPI_CUSTOMER_CREATEFROMDATA1 using JCo on IDES
Hello everyone,
we are working on a student project and would like to create customers (debtors) in an SAP IDES system.
Using the ref-customer to copy from, and some personal-data below, we get the error message
'Internal error: External no.assignment for reference customer/customer'
We also tried with BAPI_CUSTOMER_GETINTNUMBER, and ACCOUNTGROUP ZINT (New Internet Customer, others won't work?). But CREATEFROMDATA1 takes no CustomerNo created this way, nor it wants to create one 'internal'?
Any suggestions? Thanks a lot for your help,
Greetings,
Tobias Schmidbauer
inParams = function.getImportParameterList().getStructure(
"PI_COPYREFERENCE");
inParams.setValue("0000001000", "REF_CUSTMR");
inParams.setValue("1000", "SALESORG");
inParams.setValue("10", "DISTR_CHAN");
inParams.setValue("00", "DIVISION");
inParams =function.getImportParameterList().getStructure(
"PI_PERSONALDATA");
inParams.setValue("Simpson", "LASTNAME");
inParams.setValue("Homer", "FIRSTNAME");
inParams.setValue("Jay","MIDDLENAME");
inParams.setValue("Springfield", "CITY");
inParams.setValue("DE", "LANGU_P");
inParams.setValue("DE", "LANGUP_ISO");
inParams.setValue("DE", "COUNTRY");
inParams.setValue("EUR", "CURRENCY");
inParams.setValue("12345", "POSTL_COD1");
Message was edited by: Tobias SchmidbauerHello Brian,
Thanks for your pointer. Actually The customer's reference number i was providing in the PI_COPYREFERENCE structure was a sold-to party customer and it uses external customer number assignment. When i used "New Internet Customer" (that doesnt use external assignment by default) as customer's account group, the customer was created successfully and assigned customer number was returned.
I want to ask now how could we give a customer number in the BAPI as i am unable to find any such column in any of the tables. (Customer number is an "out" parameter so it can only return the number of created customer). Secondly, how to chnage the external assignment property of a particular account group (like sold-to party). i.e, how could we change the account group configurations through SAP GUI??
- Umair -
Can we do poduct costing with out using cost sheet and overhead rates
Hi,
can we do product costing with out using cost sheets and overhead rates.
In that cast , how the cost estimation happens ?Hi,
a costing sheet is used to calculate (on a base) overhead values. If you dont need / want to use this functionality just create/use a costing variant where not costing sheet is assigned.
Use this costing variant in CK11N or KKPAN, depending if ou have a quantity structure or not.
best regards, Christian -
Using excel sheets with externa references
I was hopping someone could point me somewhere to begin here.
What if I am implementing CM solution in a financial department, which strongly uses excel spreadsheets, which means they're going to need external references from a file, to another .xls for example. Is there any thing about that matter in UCM?
tyPost what you would like to do in Excel here
http://www.microsoft.com/mac/support -
BDC table control using Excel sheet upload
Hi All,
I am working BDC table control.I want to upload the From excel sheet.I am using the FM ALSM_EXCEL_TO_INTERNAL_TABLE to upload the the data into my internal table.The data is populating in the internal table.
Now i have problem tat how to populate this excel sheet data to the Bdc table control.
Can nybody help me out.\[removed by moderator\]
Thanks,
Swapna.
Edited by: Jan Stallkamp on Jul 25, 2008 10:57 AMafter fetching data from EXCEL sheet, each column data (in excel sheet) will be uploaded to individual record into your internal table along with row number and column number, loop through that internal table and collect all your excel data into record format.pls refer the below code.
data:
i_excel type alsmex_tabline occurs 0 with header line,
l_row type i value 1.
data:
begin of x_data occurs 0,
kunnr like RF02L-KUNNR,
klimk(17) type c,
CTLPC like knkk-CTLPC,
end of x_data,
begin of x_data1 occurs 0,
data(106),
end of x_data1.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = p_fname
i_begin_col = 1
i_begin_row = 1
i_end_col = no.of columns in your excel file
i_end_row = no.of rows in your file
tables
intern = i_excel.
if sy-subrc = 0.
loop at i_excel.
if l_row <> i_excel-row.
append x_data.
clear x_data.
endif.
case i_excel-col.
when 1.
x_data-kunnr = i_excel-value.
when 2.
x_data-klimk = i_excel-value.
when 3.
x_data-CTLPC = i_excel-value.
endcase.
l_row = i_excel-row.
clear i_excel.
at last.
append x_data.
endat.
endloop.
endif.
then loop through the internal table X_DATA, pass the data to your table control like.
tbl_control-field1(1) = x_data-field1.
tbl_control-field2(1) = x_data-field2.
tbl_control-fieldn(1) = x_data-fieldn.
Regards,
Sreeram. -
Problems in uploading from excel sheet to internal table
hi experts,
i got one problem regarding uploading data from excel sheet to int.table. I used FM ALSM_EXCEL_TO_INTERNAL_TABLE but in that the value is char of 50. but i need a case where i have to send value more than 50 characters. please suggest me any other FM to overcome this problem.
advanced thanks
vijayHi,
>
Vijay Krishna Arvapalli wrote:
> hi tarun,
>
> thank you for your reply
>
> but when i tried to use FM TEXT_CONVERT_XLS_TO_SAP it is giving error actually that 'Error generating the test frame'.
>
> so can you suggest me with some other option where i can upload the field with more than 50 character length.
>
> thank you
> regards
> vijay
Yes, when you execute the FM from SE37, then it displays a message.
Just copy the below code and paste it in a report (SE38) and execute.
Create a file in C:/ with name test.xls and execute it will display the records even with more than 50 characters of length.
I have tested and its working.
I have taken three fields in the excel file empid, name and doj.
TYPE-POOLS : truxs.
PARAMETERS : p_file TYPE rlgrap-filename DEFAULT 'C:\TEST.XLS'.
DATA : BEGIN OF itab OCCURS 0,
empid(150) TYPE c,
name(150) TYPE c,
doj(150) TYPE c,
END OF itab.
DATA: it_raw TYPE truxs_t_text_data.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM f4_file_process USING p_file.
AT SELECTION-SCREEN.
PERFORM validate_file_path USING p_file.
START-OF-SELECTION.
PERFORM upload_data.
END-OF-SELECTION.
PERFORM display_data.
*& Form F4_FILE_PROCESS
* text
* -->P_FILE_PATH text
FORM f4_file_process USING p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
IF sy-subrc NE 0.
MESSAGE e000(zsd).
ENDIF.
ENDFORM. " F4_FILE_PROCESS
*& Form VALIDATE_FILE_PATH
* text
* -->P_FILE text
FORM validate_file_path USING p_file.
DATA : lv_dir TYPE string,
lv_file TYPE string,
lv_result(1) TYPE c.
DATA : lv_filename TYPE string.
lv_filename = p_file.
CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
EXPORTING
full_name = p_file
IMPORTING
stripped_name = lv_file
file_path = lv_dir
EXCEPTIONS
x_error = 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.
CALL METHOD cl_gui_frontend_services=>directory_exist
EXPORTING
directory = lv_dir
RECEIVING
result = lv_result
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
wrong_parameter = 3
not_supported_by_gui = 4
OTHERS = 5.
IF lv_result IS INITIAL.
MESSAGE 'Invalid Directory' TYPE 'E'.
ENDIF.
CLEAR lv_result.
CALL METHOD cl_gui_frontend_services=>file_exist
EXPORTING
file = lv_filename
RECEIVING
result = lv_result
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
wrong_parameter = 3
not_supported_by_gui = 4
OTHERS = 5.
IF lv_result IS INITIAL.
MESSAGE 'Invalid File' TYPE 'E'.
ENDIF.
ENDFORM. " VALIDATE_FILE_PATH
*& Form UPLOAD_DATA
* text
* --> p1 text
* <-- p2 text
FORM upload_data .
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
i_line_header = 'X'
i_tab_raw_data = it_raw
i_filename = p_file
TABLES
i_tab_converted_data = itab[]
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.
ENDFORM. " UPLOAD_DATA
*& Form DISPLAY_DATA
* text
* --> p1 text
* <-- p2 text
FORM display_data .
LOOP AT itab.
WRITE : / itab-empid, itab-name, itab-doj.
ENDLOOP.
ENDFORM. " DISPLAY_DATA
Hope this helps you.
Regards,
Tarun -
Updating the table using excel sheet
hello friends
i have exported the tabel EINA in to a excel sheet , and made changes , now i want to upload same excel sheet into same table and update the change value into table , how can i do this???
regards
ravikant dewanganhi thr
to upload multiple multitab Excel sheets or Ranges from Front end to SAP
Please refer to
http://www.sap-img.com/abap/abap-object-oriented-spreadsheet-with-unlimited-power.htm
Visit
http://help.sap.com/saphelp_47x200/helpdata/en/e9/0be775408e11d1893b0000e8323c4f/frameset.htm
and
http://help.sap.com/saphelp_47x200/helpdata/en/e9/0be775408e11d1893b0000e8323c4f/frameset.htm
You need some basic idea of range object in excel.
You need to create XLS with named ranges or create ranges dynamically.
This could be a neat way to upload XLS the OO way!
The function Module zjnc_get_range reads 1 range into any Internal
table.
DATA: BEGIN OF it_test OCCURS 0,
vpd LIKE mseg-menge,
vas LIKE mkpf-budat,
vkm LIKE mseg-matnr,
END OF it_test.
CALL FUNCTION 'ZJNC_GET_RANGE'
EXPORTING
rangename = 'test'
itabname = 'IT_TEST[]'
irecname = 'it_test'
spreadsheetintf = spreadsheetintf.
=Work!$A$14:$C$16 is range "test"
Numbers & Character data are no problem BUT dates are.
In Excel default date is mm/dd/yyyy but is dependent on PC's
international setting which is normally default
To Avoid any 5-March 3-May type mix-up, I have designed the FM so that you need to
enter dates as 'dd.Mon.yyyy i.e. in Characters in "Internet Date Format"
FUNCTION zjnc_get_range.
""Local interface:
*" IMPORTING
*" REFERENCE(RANGENAME) TYPE C
*" REFERENCE(ITABNAME) TYPE C
*" REFERENCE(IRECNAME) TYPE C
*" REFERENCE(SPREADSHEETINTF) TYPE REF TO I_OI_SPREADSHEET
*" REFERENCE(SPREADSHEETINTF) TYPE REF TO I_OI_SPREADSHEET
DATA:
stru_ref TYPE REF TO cl_abap_structdescr,
comp_tab TYPE abap_compdescr_tab,
one_comp TYPE abap_compdescr,
one_name TYPE string,
type_ref TYPE REF TO cl_abap_typedescr,
is_ddic TYPE abap_bool,
lt_ddic TYPE dd_x031l_table,
wa_ddic TYPE x031l.
DATA: zjncranges TYPE soi_range_list,
zjnccontents TYPE soi_generic_table,
zjnconerange TYPE soi_range_item,
zjnconeitem TYPE soi_generic_item,
prevrow(4) TYPE n,
nrow(4) TYPE n,
ncolumn(4) TYPE n,
mystring TYPE string,
mydate LIKE sy-datum.
FIELD-SYMBOLS: <fs_type> TYPE ANY,
<fs_table> TYPE STANDARD TABLE,
<fs_line> TYPE ANY.
CONCATENATE '(' sy-cprog ')' itabname INTO mystring.
ASSIGN (mystring) TO <fs_table>.
CONCATENATE '(' sy-cprog ')' irecname INTO mystring.
ASSIGN (mystring) TO <fs_line>.
stru_ref ?= cl_abap_structdescr=>describe_by_data( <fs_line> ).
comp_tab = stru_ref->components.
REFRESH zjncranges.
MOVE rangename TO zjnconerange-name.
APPEND zjnconerange TO zjncranges.
CALL METHOD spreadsheetintf->get_ranges_data
IMPORTING
contents = zjnccontents
error = zjncerror
retcode = zjncretcode
CHANGING
ranges = zjncranges.
MOVE 0 TO prevrow.
LOOP AT zjnccontents INTO zjnconeitem.
MOVE zjnconeitem-row TO nrow.
IF nrow <> prevrow.
IF prevrow <> 0.
APPEND <fs_line> TO <fs_table>.
ENDIF.
CLEAR <fs_line>.
MOVE nrow TO prevrow.
ENDIF.
MOVE zjnconeitem-column TO ncolumn.
READ TABLE comp_tab INDEX ncolumn INTO one_comp.
CONCATENATE '(' sy-cprog ')' irecname '-' one_comp-name INTO one_name.
ASSIGN (one_name) TO <fs_type>.
IF one_comp-type_kind <> 'D'.
MOVE zjnconeitem-value TO <fs_type>.
ELSE.
TRANSLATE zjnconeitem-value TO UPPER CASE.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_INPUT'
EXPORTING
input = zjnconeitem-value
IMPORTING
output = mydate.
MOVE mydate TO <fs_type>.
ENDIF.
ENDLOOP.
IF prevrow <> 0.
APPEND <fs_line> TO <fs_table>.
ENDIF.
ENDFUNCTION.
SAP has a facility called BDS.
Read
http://www.intelligententerprise.com/channels/applications/feature/archive/schulze.jhtml
Read http://www.sappro.com/download03.cfm?session=
There is ready code of BDS+DOI -- uses CL_BDS_DOCUMENT_SET global class.
If you wish to store a Word/Excel/AutoCad or any other document in SAP,
then you can use the Business Document Service (BDS). I did not - as
Cluster Data Directory is a simple beginning ...
Do reward if helpful.... and come bak if stil have trouble.
Edited by: Prem Sharma on Apr 3, 2008 12:00 PM -
Bdc upload file data into internal table problem with gui_upload fm
Hello experts,
my coding is like this ..
data : begin of itab occurs 0 .
field1 like mara-matnr,
field2......
etc,
end of itab.
data: file1 type string.
parameter :file like rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
static = 'X'
mask = space
field_name = 'FILE'
CHANGING
file_name = file.
START-OF-SELECTION.
FILE1 = FILE . "HERE I AM PASSING INTO STRING
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = FILE1
FILETYPE = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = itab. " here the data is not populating from the file , it is giving the error like speified table not found.
HERE i am getting the message like "specified table name not recgonised" . the data is not populating into the itab from the file.
file structure is same as the internal table.
I stored the file as .txt( ie in notepad).
my file is like this..
10000 200 323 sunndarrr.......
i had a problem with this bdc , i am getting like "specified table name not recgonised" in the fm gui_upload while debugging.
when i am using the ws_upload it is working fine.
please guide me where i have done the mistake.
thank you so much for all the replies.Hi,
Have a look on the following code.
TABLES: kna1.
DATA: BEGIN OF itab1 OCCURS 0,
str(255),
END OF itab1.
DATA: itab2 TYPE kna1 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'D:\ABAP EVE\ffile1.txt'
filetype = 'ASC'
TABLES
data_tab = itab1
EXCEPTIONS
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
OTHERS = 11.
IF sy-subrc <> 0.
WRITE:/ 'sorry'.
ELSE.
LOOP AT itab1.
SPLIT itab1-str AT ',' INTO itab2-kunnr itab2-name1.
APPEND itab2.
ENDLOOP.
IF sy-subrc = 0.
LOOP AT itab2.
WRITE:/ itab2-kunnr,itab2-name1.
INSERT INTO kna1 VALUES itab2.
ENDLOOP.
IF sy-subrc = 0.
WRITE:/ 'inserted'.
ELSE.
WRITE:/ 'not inserted'.
ENDIF.
ELSE.
WRITE:/ 'fail'.
ENDIF.
ENDIF.
Flat file:
10001,Sadney
10003,Yogesh
20005,Madan
1.U need to define internal table with one field of max size
2.upload the flat file data into that internal table
3.split that internal table data into another internal table(having fields)
<REMOVED BY MODERATOR>
thanks,
Chandu
Edited by: Alvaro Tejada Galindo on Apr 30, 2008 12:17 PM -
Facing Problem in saving to Excel Sheet
Hi,
This is Anupam from Kolkata of India.
I am writing a jsp in which I am facing some problem .I am trying to save the content of a table to a excel shhet.The code is follows
<%@ page contentType="application/vnd.ms-excel" %>
<html>
<%-- Set the content disposition header --%>
<%
response.setHeader("Content-Disposition", "inline; filename=\"mult-table1.xls\"");
%>
<body>
<table>
<% for(int i = 1; i <= 12; i++){ %>
<tr>
<% for(int j = 1; j <= 12; j++){ %>
<td>
<%= i * j %>
</td>
<% } %>
</tr>
<% } %>
</table>
</body>
</html>
The jsp is saving the the table to the Excel Sheet but in the browser I am getting the Error Message
Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable
This may be because I have changed the changed the content type from text/html.
Another problem I am facing that I am creating a portlet in the weblogic Portal but it is displaying error message box informing that the jsp can not be downloaded.
Can any body help me out
Thanks in advance
Anupam SarkarYour code works, when I try to access your JSP page, it correctly downloads the table data into an excel spreadsheet.
Regarding the weblogic portlet you can check with Weblogic forum or provide more details so we can diagnose the problem. -
Problem in downloading to excel sheet
hi,
i have a file in the application server which needs to be downloaded into excel sheet and send it via attachment to outlook id's..
file is getting downloaded into excel sheet ( Via custom function module) and the attachment is being sent to the mail box, but the problem is everything appears in the first column..how to set the delimiters in excel sheet, i mean each field should appear in a separate coloumn...
format of the file in the application server
data: begin of dt_string occurs 0,
data(150) type c,
end of dt_string.
ex: dt_string+0(4) = 'name'.
dt_string+4(5) = 'place'. .....
append dt_string
clear dt_string.
same way, each record is inserted into the dt_string and the table was transferred to the app server.
thanksHi Mahesh,
Assuming that you are using 'GUI_DOWNLOAD'.
Add the thing in bold <b>WRITE_FIELD_SEPARATOR</b>.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename =
* FILETYPE = 'ASC'
* APPEND = ' '
<b> WRITE_FIELD_SEPARATOR = '#' "Tab Delimiter between fields</b>
Regards,
AS -
Still having problem with downloading to excel two ITs
Three things I have to do are:
- to have leading zeros in excel - (wich I solved with DBF filetype - >> is there any other way ?) ,
- to append two internal tables one after another (to have them in one excel sheet), (did it calling two times FM )
- finally to download them in one excel sheet .
(Note, two internal tables are different ) .
I used WS_DOWNLOAD wich works fine with DBF filetype ,
BUT can not append two ITs with DBF filetype .
When using GUI_DOWNLOAD append works fine
BUT does not supports DBF filetype .
Which FM is best to acomplish these three things together using ONE FM ???I allready tryied to use GUI_DOWNLOAD but it did not help
Gives me error Invalid type -
Problem with opening an excel spreadsheet
Hello,
I need to open an excel sheet when the user clicks on a link.
When I run the code I get SAVE/ DOWNLOAD dialog box.
Is it possible to get around the SAVE/DOWNLOAD dialog and open the excel sheet directly.
In other words, is it possible to download the excel sheet to a temp directory and open it from there.
Please help,
Thanks in advance.Hi,
I am able to open the excel sheet successfully from the web application but what is happening is that when it opens it sets the title of the excel sheet as the URL from where it was downloaded.
The problem with this is that the macros within the excel sheet are not working.
If i save the excel sheet and give it a name, the macros are working.
So, obviously it is something to do with the title.
Is it possible for me to pass the filename along with the code to open the excel sheet.
Thanks for your help so far. -
Problems with output using html2fo function
Hello,
I have a problem with output when using html2fo function.
My sample xml:
<?xml version="1.0" encoding="UTF-8"?>
<RTECODE>
<![CDATA[
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
]]>
</RTECODE>
Can anybody explain why the rtf template output is different in pdf, rtf, excel ? It looks ok only in pdf.
Thanks in advance.Check these
http://docs.oracle.com/cd/E23943_01/bi.1111/e22254/create_rtf_tmpl.htm#CHDCEEIJ
https://blogs.oracle.com/xmlpublisher/entry/html_in_xml_support
If helps mark
Edited by: Srini VEERAVALLI on Feb 25, 2013 10:04 AM
Maybe you are looking for
-
Hi, All i have a trouble about report generation.it seems the error happened at the "write UUT report"--this step is teststand report generation'DLL. detail: An error occurred calling 'Save' in 'Report' of 'NI TestStand 2010 SP1 API' Acce
-
my ipod is stuck on a screen that has a picture of the ipod plug and itunes, wen i plug it in 2 itunes it wont do anything as i have a password on my ipod and i need 2 put in password 4 itunes 2 work, please sum1 help me......................
-
Error while opening downloaded excle file.
Hi, I have an interesting issue. In my scenario I am downloading characteristics value from COID. Through background job we are getting that report in our Out look mail box. Report format is XLS. While opening the attached XLS file we are getting one
-
Did you change your home folder name and now your computer is all wierd?
Hello. I did the same thing and I called apple help and they just couldn't help me on this subject. I was messing around with the computer and I found a proper solution where you don't have to re-install the software. Here are the steps: Step one: lo
-
Dear All, I have created Datasource and DSO and flat file and also created DTP. If i request perticular request id , its not activating. request status not activating. With Regards, Baskaran.