2012 Jan 27 6:36 AM
hi all,
i made one program in which i get multiple tabs in one excel .n ow i want to fill data in it. but as soon as i do that my data is overwritten on my header. kindly help me for this.
this is my block of code which i am using:
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 2.
SET PROPERTY OF sheet 'Name' = 'region'.
CALL METHOD OF sheet 'Activate'.
LOOP AT IT_REGION.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = 1."index.
SET PROPERTY OF cells 'Value' = IT_REGION-REGIONName.
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = 2."index.
SET PROPERTY OF cells 'Value' = IT_REGION-REGIONCode.
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = 3."index.
SET PROPERTY OF cells 'Value' = IT_REGION-REGIONDescription.
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = 4."index.
SET PROPERTY OF cells 'Value' = IT_REGION-CountryCode.
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = 5."index.
SET PROPERTY OF cells 'Value' = IT_REGION-ChangeType.
ENDLOOP.
i want to take data from t005 table.
kindly help me for the same.
With Regards,
Sulabh
hi all,
i made one program in which i get multiple tabs in one excel .n ow i want to fill data in it. but as soon as i do that my data is overwritten on my header. kindly help me for this.
this is my block of code which i am using:
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 2.
SET PROPERTY OF sheet 'Name' = 'region'.
CALL METHOD OF sheet 'Activate'.
LOOP AT IT_REGION.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = 1."index.
SET PROPERTY OF cells 'Value' = IT_REGION-REGIONName.
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = 2."index.
SET PROPERTY OF cells 'Value' = IT_REGION-REGIONCode.
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = 3."index.
SET PROPERTY OF cells 'Value' = IT_REGION-REGIONDescription.
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = 4."index.
SET PROPERTY OF cells 'Value' = IT_REGION-CountryCode.
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = 5."index.
SET PROPERTY OF cells 'Value' = IT_REGION-ChangeType.
ENDLOOP.
i want to take data from t005 table.
kindly help me for the same.
With Regards,
Sulabh
2012 Jan 28 10:10 AM
by my own... use ole method to maintain multiple sheets in a excel
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |