11-23-2007 7:28 AM
Hi All,
I have created a program to send an email with an excel attachment but the leading zero's in excel are removed. can anybody suggest what can be done other than replace since that exceeds 255chars so i cant concatenate.
11-23-2007 7:43 AM
Hi
Try adding the character ' (single quote) before the actual value. Excel then treats the value as-is whithout conversion
character type for columns
data: h_columns TYPE ole2_object,
h_cell TYPE ole2_object.
CALL METHOD OF excel 'Columns' = h_columns
EXPORTING
#1 = 'F:K'.
set property of h_columns 'NumberFormat' = '@'.
CALL METHOD OF excel 'Cells' = h_cell
EXPORTING
#1 = 14
#2 = 7.
SET PROPERTY OF h_cell 'Value' = '0001'.
11-23-2007 7:32 AM
Hi Shruthi,
Use FM CONVERSION_EXIT_<Conversion Routine>_INPUT & CONVERSION_EXIT_<Conversion Routine>_OUTPUT on that field.
Coversion Routine can be found at domain level of the field.
Regards,
Satish
11-23-2007 7:36 AM
Hi Satish,
I tried with CONVERSION_EXIT_ALPHA_INPUT FM but the zeros are removed in the excel sheet, in the program the zeros are present.
11-23-2007 7:43 AM
Hi
Try adding the character ' (single quote) before the actual value. Excel then treats the value as-is whithout conversion
character type for columns
data: h_columns TYPE ole2_object,
h_cell TYPE ole2_object.
CALL METHOD OF excel 'Columns' = h_columns
EXPORTING
#1 = 'F:K'.
set property of h_columns 'NumberFormat' = '@'.
CALL METHOD OF excel 'Cells' = h_cell
EXPORTING
#1 = 14
#2 = 7.
SET PROPERTY OF h_cell 'Value' = '0001'.