Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Fixed column length in excel sheet thru abap program

Former Member
0 Likes
980

HI Experts ,

I am sending 2 excel attachments from abap program to external email Id's .

Excel attachments are successfully sending but the columns in the excel attachmet are compressed .

I want to fix some width for excel columns .

Please provide your help and suggest .

Thanks,

Nusrat

HI Experts ,

I am sending 2 excel attachments from abap program to external email Id's .

Excel attachments are successfully sending but the columns in the excel attachmet are compressed .

I want to fix some width for excel columns .

Please provide your help and suggest .

Thanks,

Nusrat

3 REPLIES 3
Read only

Former Member
0 Likes
735

You can achieve this by AUTOFIT method. Look into below link for sample code.

<link to blocked site removed by moderator>

Venk@

Edited by: Thomas Zloch on Dec 4, 2011 7:11 PM

Read only

0 Likes
735

use a OLE method for this, but its quite slows down the performance of your code. you can search and get many sample code, below is one of them

Read only

0 Likes
735

Hi All ,

Thanks for the reply ,..

I am using below function module to send a mail with excel attachment , I would like to use the same code instead of OLE .. Could you please let me know how to modify the column lenght using this module .

CALL FUNCTION 'SO_DOCUMENT_SEND_API1'

EXPORTING

document_data = gd_doc_data

put_in_outbox = 'X'

sender_address = 'Traking System'

sender_address_type = 'INT'

commit_work = 'X'

IMPORTING

sent_to_all = gd_sent_all

TABLES

packing_list = it_packing_list

contents_bin = it_attachment

contents_txt = it_message

receivers = it_receivers

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.

Thanks ,

Nusrat