04-13-2010 9:39 AM
Hi all,
Requerment to send excel file attachment in color format in mail ,please can guide me how to due it and if its possable please send the code..
Regards,
santosh
04-13-2010 9:52 AM
Hi,
Downloading to PC is possible using OLE concept. Not sure if you can send to mail with colours. If this is not possible, you can think of attachment in html format, where you can add colours to the rows.
Thanks,
Vinod.
04-13-2010 9:52 AM
Hi,
Downloading to PC is possible using OLE concept. Not sure if you can send to mail with colours. If this is not possible, you can think of attachment in html format, where you can add colours to the rows.
Thanks,
Vinod.
04-13-2010 9:57 AM
by converting the content to XML and using XML tags you need to populating into internal table and send it as mail as excel attachment
it needs a reverse engineering technique
try create a colorfull excel sheet manually
and save that as XML and try viewing the XML tag of same and in the same way you need to populate your entries
and send it as attachement
in case of following this method
no need of saving the excel and sending it as mail
you can directly send as mail
in case of OLE you need to save and send it as mail
cheers
S.Janagar
Edited by: Janagar Sundaramoorthy Nadar on Apr 13, 2010 11:05 AM
04-13-2010 10:45 AM
Hi S.Janagar,
Try this method, But the Things converted from excel to xml got the sourc code and copied in S010 tcode and from function module read_text attach to intrnel table into XLS body sending attachment but GUESS THIS FOR CONSTANT DATA.
MINE runtimly changing data, any other method is there for frequently changed data...
Regards,
santosh
Edited by: santosh jajur on Apr 13, 2010 11:45 AM
04-13-2010 9:58 AM
Hi Santosh ,
Hi you have to use ole functionality using excel.Try with below code :
data: ld_filename type string,
ld_path type string,
ld_fullpath type string,
ld_result type i .
data: application type ole2_object,
workbook type ole2_object,
sheet type ole2_object,
cells type ole2_object.
constants: row_max type i value 256.
data : v_row type i ,
v_col type i value 1 ,
v_loc(125) type c ..
create object application 'excel.application'.
set property of application 'visible' = 0.
call method of application 'Workbooks' = workbook.
call method of workbook 'Add'.
call method of application 'Worksheets' = sheet
exporting
#1 = 1.
call method of sheet 'Activate'.
set property of sheet 'Name' = 'Test Sheet'.
if p_rm is not initial .
loop at i_tabi nto wa_tab .
v_row = v_row + 1.
call method of sheet 'Cells' = cells
exporting
#1 = v_row
#2 = 1.
set property of cells 'Value' = wa_tab-filed .
call method of sheet 'Cells' = cells
exporting
#1 = v_row
#2 = 2.
set property of cells 'Value' = wa_tab-filed .
call method of sheet 'Cells' = cells
exporting
#1 = v_row
#2 = 3.
set property of cells 'Value' = wa_tab-filed .
clear : wa_rm.
endloop.
endif.
clear : v_row .
****Check with cell property you set the colours also.
Points if you find usefull.
Regards,
Pranav