<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating multiple columns in Excel spreadsheet in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517271#M237966</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the code that you provided, the value of cells is not changing; that is the variable 'index' has the same through one loop pass, while in the loop you are trying to assign 3 or 4 values to different cells but effectively it will overwrite the same cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To resolve this i suggest you manually change the column index. so your code should be like the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;row_indx = sy-tabix + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*This is the first column, we will&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;change this value manually to put values in &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;different columns.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF sheet 'Cells' = cells&lt;/P&gt;&lt;P&gt;EXPORTING #1 = row_indx&lt;/P&gt;&lt;P&gt;#2 = '1'.  "first column&lt;/P&gt;&lt;P&gt;SET PROPERTY OF cells 'Value' = itab-field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now we fill the second column with 3rd field from itab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF sheet 'Cells' = cells&lt;/P&gt;&lt;P&gt;EXPORTING #1 = row_indx&lt;/P&gt;&lt;P&gt;#2 = '2'.&lt;/P&gt;&lt;P&gt;SET PROPERTY OF cells 'Value' = itab-field3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now we fill the 3rd column with 10th field of itab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF sheet 'Cells' = cells&lt;/P&gt;&lt;P&gt;EXPORTING #1 = row_indx&lt;/P&gt;&lt;P&gt;#2 = '3'.&lt;/P&gt;&lt;P&gt;SET PROPERTY OF cells 'Value' = itab-field10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;for a change now fill the 7th column with 11th field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;of itab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF sheet 'Cells' = cells&lt;/P&gt;&lt;P&gt;EXPORTING #1 = row_indx&lt;/P&gt;&lt;P&gt;#2 = '7'.&lt;/P&gt;&lt;P&gt;SET PROPERTY OF cells 'Value' = itab-field11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Aug 2006 04:24:32 GMT</pubDate>
    <dc:creator>Rashid_Javed</dc:creator>
    <dc:date>2006-08-16T04:24:32Z</dc:date>
    <item>
      <title>Creating multiple columns in Excel spreadsheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517267#M237962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the sample code from this link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/ms/ms_excel.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/ms/ms_excel.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I write to the worksheet with multiple columns corresponding to each column field of the internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create second Excel sheet&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD OF application 'Worksheets' = sheet&lt;/P&gt;&lt;P&gt;                               EXPORTING #1 = 2.&lt;/P&gt;&lt;P&gt;  SET PROPERTY OF sheet 'Name' = 'Sheet2'.&lt;/P&gt;&lt;P&gt;  CALL METHOD OF sheet 'Activate'.&lt;/P&gt;&lt;P&gt;  LOOP AT itab2.&lt;/P&gt;&lt;P&gt;    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name&lt;/P&gt;&lt;P&gt;    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value' = itab2-last_name.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say I have the internal table itab2 with the following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab2 occurs 0,&lt;/P&gt;&lt;P&gt;        field1(10),&lt;/P&gt;&lt;P&gt;        field2(9),&lt;/P&gt;&lt;P&gt;        field3(3),&lt;/P&gt;&lt;P&gt;        field4(12),&lt;/P&gt;&lt;P&gt;        field5(3),&lt;/P&gt;&lt;P&gt;        etc.&lt;/P&gt;&lt;P&gt;end of itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would someone recommend me on this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;RT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rob  Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 01:42:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517267#M237962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-15T01:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple columns in Excel spreadsheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517268#M237963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your case simply downloading a internal table into a excel file, you can use GUI_DOWNLOAD function (Method GUI_DOWNLOAD of Class CL_GUI_FRONTEND_SERVICES) with DAT as the file type and each field of the internal table, will be in a column of the excel sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note : Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 01:56:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517268#M237963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-15T01:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple columns in Excel spreadsheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517269#M237964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well for this we have to slightly change the code. The following code can be used. It is the same that you pasted, but i have made a few adjustments in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab2 occurs 0,&lt;/P&gt;&lt;P&gt;field1(10),&lt;/P&gt;&lt;P&gt;field2(9),&lt;/P&gt;&lt;P&gt;field3(3),&lt;/P&gt;&lt;P&gt;field4(12),&lt;/P&gt;&lt;P&gt;field5(3),&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;end of itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*We need variables for column and row index&lt;/P&gt;&lt;P&gt;Data: col_indx type I, row_indx type i.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and also a field symbol to hold values&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;field-symbols: &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD OF application 'Worksheets' = sheet&lt;/P&gt;&lt;P&gt;EXPORTING #1 = 2.&lt;/P&gt;&lt;P&gt;SET PROPERTY OF sheet 'Name' = 'Sheet2'.&lt;/P&gt;&lt;P&gt;CALL METHOD OF sheet 'Activate'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab2.&lt;/P&gt;&lt;P&gt;*Row index is simply your sy-tabix.&lt;/P&gt;&lt;P&gt;Row_indx = sy-tabix + 1. "assuming in excel first row is for headings&lt;/P&gt;&lt;P&gt;*for this row we fill all the coluns.&lt;/P&gt;&lt;P&gt;Clear col_indx.&lt;/P&gt;&lt;P&gt;Do.&lt;/P&gt;&lt;P&gt;Assign component sy-index of structure itab2 to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;Exit.&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;Col_indx = sy-index.&lt;/P&gt;&lt;P&gt;CALL METHOD OF sheet 'Cells' = cells&lt;/P&gt;&lt;P&gt;EXPORTING #1 = row_indx&lt;/P&gt;&lt;P&gt;          #2 = col_indx.&lt;/P&gt;&lt;P&gt;SET PROPERTY OF cells 'Value' = &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;Enddo.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will solve your problem! hopefully !&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 08:28:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517269#M237964</guid>
      <dc:creator>Rashid_Javed</dc:creator>
      <dc:date>2006-08-15T08:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple columns in Excel spreadsheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517270#M237965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rashid,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works really well, but I was wondering if I could pick and choose the fields from the table that I only want to be written to the spreadsheet. This seems to write all the table fields to the spreadsheet. The field symbols are great if I want to display all fields. I have the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT itab.&lt;/P&gt;&lt;P&gt;    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name&lt;/P&gt;&lt;P&gt;    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value'  = itab-field2.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value1' = itab-field3.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value2' = itab-field10.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value3' = itab-field11 .&lt;/P&gt;&lt;P&gt;    etc....&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I 2-click on the 'cells' and it doesn't have the srtucture fields for me to specify the 'value'. What I am doing is overwriting the cells for the field values that I have specified in the LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;RT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rob  Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 16:34:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517270#M237965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-15T16:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple columns in Excel spreadsheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517271#M237966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the code that you provided, the value of cells is not changing; that is the variable 'index' has the same through one loop pass, while in the loop you are trying to assign 3 or 4 values to different cells but effectively it will overwrite the same cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To resolve this i suggest you manually change the column index. so your code should be like the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;row_indx = sy-tabix + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*This is the first column, we will&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;change this value manually to put values in &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;different columns.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF sheet 'Cells' = cells&lt;/P&gt;&lt;P&gt;EXPORTING #1 = row_indx&lt;/P&gt;&lt;P&gt;#2 = '1'.  "first column&lt;/P&gt;&lt;P&gt;SET PROPERTY OF cells 'Value' = itab-field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now we fill the second column with 3rd field from itab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF sheet 'Cells' = cells&lt;/P&gt;&lt;P&gt;EXPORTING #1 = row_indx&lt;/P&gt;&lt;P&gt;#2 = '2'.&lt;/P&gt;&lt;P&gt;SET PROPERTY OF cells 'Value' = itab-field3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now we fill the 3rd column with 10th field of itab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF sheet 'Cells' = cells&lt;/P&gt;&lt;P&gt;EXPORTING #1 = row_indx&lt;/P&gt;&lt;P&gt;#2 = '3'.&lt;/P&gt;&lt;P&gt;SET PROPERTY OF cells 'Value' = itab-field10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;for a change now fill the 7th column with 11th field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;of itab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF sheet 'Cells' = cells&lt;/P&gt;&lt;P&gt;EXPORTING #1 = row_indx&lt;/P&gt;&lt;P&gt;#2 = '7'.&lt;/P&gt;&lt;P&gt;SET PROPERTY OF cells 'Value' = itab-field11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 04:24:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517271#M237966</guid>
      <dc:creator>Rashid_Javed</dc:creator>
      <dc:date>2006-08-16T04:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple columns in Excel spreadsheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517272#M237967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also use column names, that's far more readable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT gt_excel INTO gw_excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    row = row + 1.&lt;/P&gt;&lt;P&gt;    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = row #2 = 'A'.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value' = gw_excel-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = row #2 = 'B'.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value' = gw_excel-naam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = row #2 = 'C'.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value' = gw_excel-adres.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = row #2 = 'D'.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value' = gw_excel-postcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = row #2 = 'E'.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value' = gw_excel-plaats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = row #2 = 'F'.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value' = gw_excel-gewicht.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = row #2 = 'G'.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value' = gw_excel-date_size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = row #2 = 'H'.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value' = gw_excel-kooiaap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = row #2 = 'I'.&lt;/P&gt;&lt;P&gt;    SET PROPERTY OF cells 'Value' = gw_excel-opmerking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arnold.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 09:12:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517272#M237967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T09:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple columns in Excel spreadsheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517273#M237968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZETA_EXCEL_DOWNLOAD_CLIPBOARD                               *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report  zeta_excel_download_clipboard           .&lt;/P&gt;&lt;P&gt;include ole2incl.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;data:  w_cell1     type ole2_object,&lt;/P&gt;&lt;P&gt;       w_cell2     type ole2_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Ole data Declarations&lt;/P&gt;&lt;P&gt;data: h_excel     type ole2_object,        " Excel object&lt;/P&gt;&lt;P&gt;      h_mapl      type ole2_object,        " list of workbooks&lt;/P&gt;&lt;P&gt;      h_map       type ole2_object,        " workbook&lt;/P&gt;&lt;P&gt;      h_zl        type ole2_object,        " cell&lt;/P&gt;&lt;P&gt;      h_f         type ole2_object,        " font&lt;/P&gt;&lt;P&gt;      gs_interior type ole2_object,        " Pattern&lt;/P&gt;&lt;P&gt;      worksheet   type ole2_object,&lt;/P&gt;&lt;P&gt;      h_cell      type ole2_object,&lt;/P&gt;&lt;P&gt;      h_cell1     type ole2_object,&lt;/P&gt;&lt;P&gt;      range       type ole2_object,&lt;/P&gt;&lt;P&gt;      h_sheet2    type ole2_object,&lt;/P&gt;&lt;P&gt;      h_sheet3    type ole2_object,&lt;/P&gt;&lt;P&gt;      gs_font     type ole2_object,&lt;/P&gt;&lt;P&gt;      flg_stop(1) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;          Internal table Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of t_excel occurs 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vkorg(20) type c, "Sales Org&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vbtyp(20) type c, "Document Category&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;auart(20) type c, "Document Type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ernam(20) type c, "Created By&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vbeln(20) type c, "Document Number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;posnr(20) type c, "Item Number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;erdat(20) type c, "Created Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vdatu(20) type c, "Header Requested Delivery Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reqdat(20) type c, "Request date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;condat(20) type c, "Confirm date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lifsk(20) type c, "Header Block&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;txt30(30) type c, "Order User Status Description&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lifsp(20) type c, "Line Block&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dispo(20) type c, "MRP Controller&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dsnam(20) type c, "MRP Controller Description&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vmsta(20) type c, "Material Sales Status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kunnr(20) type c, "Sold To&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cname(35) type c, "Sold To Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regio(20) type c, "State&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cufd(10) type c, "CUD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bstnk(20) type c, "PO#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bsark(20) type c, "Ordering Method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matnr(20) type c, "Material&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maktx(35) type c, "Material Description&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t200(20) type c, "T200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vtext(20) type c, "T200 Description&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matkl(20) type c, "Material Group&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zzbomind(7) type c, "BOM Indicator&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ostat(20) type c, "Order Status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cmgst(20) type c, "CRD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inco1(20) type c, "Incoterms&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oqty(20) type c, "Order Quantity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pqty(20) type c, "Open Quantity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unit(20) type c, "UOM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;onet(20) type c, "Order Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pnet(20) type c, "Open Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;curr(20) type c, "Currency key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so_bezei like tvkbt-bezei,"Sales Office&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sg_bezei like tvgrt-bezei,"Sales Group&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bname(20) type c, "Ordering Party&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;contact(20) type c, "Contact Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;telf1(20) type c, "Contact telf1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reqqty(20) type c, "Item Request qty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reqval(20) type c, "Item Request value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;conqty(20) type c, "Item Confirm qty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;conval(20) type c, "Item Confirm value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zzrev(02) type c, "Revenue recognition acceptance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bezei(20) type c, "Revenue recognition text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vgbel(20) type c, "Reference Order for RETURNS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0008text(255) type c, "Internal Order Comment Text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end of t_excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_excel_bckord like t_excel occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      t_excel_bcklog like t_excel occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      t_excel_blkord like t_excel occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  types: data1(1500) type c,&lt;/P&gt;&lt;P&gt;         ty          type table of data1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data:  it          type ty with header line,&lt;/P&gt;&lt;P&gt;it_2          type ty with header line,&lt;/P&gt;&lt;P&gt;it_3          type ty with header line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         rec         type sy-tfill,&lt;/P&gt;&lt;P&gt;         deli(1)     type c,&lt;/P&gt;&lt;P&gt;         l_amt(18)   type c.&lt;/P&gt;&lt;P&gt; data: begin of hex,&lt;/P&gt;&lt;P&gt;         tab type x,&lt;/P&gt;&lt;P&gt;        end of hex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  field-symbols: &amp;lt;fs&amp;gt;      .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  constants cns_09(2) type n value 09.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  assign deli to &amp;lt;fs&amp;gt; type 'X'.&lt;/P&gt;&lt;P&gt;  hex-tab = cns_09.&lt;/P&gt;&lt;P&gt;  &amp;lt;fs&amp;gt; = hex-tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data gv_sheet_name(20) type c .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;M A C R O Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define ole_check_error.&lt;/P&gt;&lt;P&gt;  if &amp;amp;1 ne 0.&lt;/P&gt;&lt;P&gt;    message e001(zz) with &amp;amp;1.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;end-of-definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-vkorg = 'ABC'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-vbtyp = 'DEF'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-auart = 'GHI'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-ernam = 'JKL'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-vbeln = 'MNO'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-0008text = 'XYZ'.&lt;/P&gt;&lt;P&gt;append t_excel_bckord.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-vkorg = 'ABC1'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-vbtyp = 'DEF1'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-auart = 'GHI1'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-ernam = 'JKL1'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-vbeln = 'MNO1'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-0008text = 'XYZ1'.&lt;/P&gt;&lt;P&gt;append t_excel_bckord.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-vkorg = 'ABC2'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-vbtyp = 'DEF2'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-auart = 'GHI2'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-ernam = 'JKL2'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-vbeln = 'MNO2'.&lt;/P&gt;&lt;P&gt;t_excel_bckord-0008text = 'XYZ2'.&lt;/P&gt;&lt;P&gt;append t_excel_bckord.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vkorg = 'ABC'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vbtyp = 'DEF'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-auart = 'GHI'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-ernam = 'JKL'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vbeln = 'MNO'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-0008text = 'XYZ'.&lt;/P&gt;&lt;P&gt;append t_excel_bcklog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vkorg = 'ABC1'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vbtyp = 'DEF1'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-auart = 'GHI1'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-ernam = 'JKL1'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vbeln = 'MNO1'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-0008text = 'XYZ1'.&lt;/P&gt;&lt;P&gt;append t_excel_bcklog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vkorg = 'ABC2'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vbtyp = 'DEF2'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-auart = 'GHI2'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-ernam = 'JKL2'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vbeln = 'MNO2'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-0008text = 'XYZ2'.&lt;/P&gt;&lt;P&gt;append t_excel_bcklog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vkorg = 'ABC3'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vbtyp = 'DEF3'..&lt;/P&gt;&lt;P&gt;t_excel_bcklog-auart = 'GHI3'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-ernam = 'JKL3'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vbeln = 'MNO3'.&lt;/P&gt;&lt;P&gt;t_excel_bcklog-0008text = 'XYZ3'.&lt;/P&gt;&lt;P&gt;append t_excel_bcklog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-vkorg = 'ABC'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbtyp = 'DEF'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-auart = 'GHI'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-ernam = 'JKL'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbeln = 'MNO'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-0008text = 'XYZ'.&lt;/P&gt;&lt;P&gt;append t_excel_blkord.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-vkorg = 'ABC1'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbtyp = 'DEF1'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-auart = 'GHI1'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-ernam = 'JKL1'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbeln = 'MNO1'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-0008text = 'XYZ1'.&lt;/P&gt;&lt;P&gt;append t_excel_blkord.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-vkorg = 'ABC2'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbtyp = 'DEF2'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-auart = 'GHI2'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-ernam = 'JKL2'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbeln = 'MNO2'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-0008text = 'XYZ2'.&lt;/P&gt;&lt;P&gt;append t_excel_blkord.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-vkorg = 'ABC3'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbtyp = 'DEF3'..&lt;/P&gt;&lt;P&gt;t_excel_blkord-auart = 'GHI3'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-ernam = 'JKL3'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbeln = 'MNO3'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-0008text = 'XYZ3'.&lt;/P&gt;&lt;P&gt;append t_excel_blkord.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-vkorg = 'ABC4'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbtyp = 'DEF4'..&lt;/P&gt;&lt;P&gt;t_excel_blkord-auart = 'GHI4'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-ernam = 'JKL4'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbeln = 'MNO4'.&lt;/P&gt;&lt;P&gt;t_excel_blkord-0008text = 'XYZ4'.&lt;/P&gt;&lt;P&gt;append t_excel_blkord.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_excel_bckord.&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;t_excel_bckord-vkorg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-vbtyp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-auart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-ernam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-vbeln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-posnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-erdat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-vdatu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-reqdat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-condat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-lifsk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-txt30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-lifsp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-dispo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-dsnam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-vmsta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-kunnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-cname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-regio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-cufd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-bstnk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-bsark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-maktx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-t200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-vtext&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-matkl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-zzbomind&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-ostat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-cmgst&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-inco1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-oqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-pqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-unit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-onet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-pnet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-curr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-so_bezei&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-sg_bezei&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-bname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-contact&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-telf1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-reqqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-reqval&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-conqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-conval&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-zzrev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-bezei&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-vgbel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bckord-0008text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into it&lt;/P&gt;&lt;P&gt;separated by deli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; append it.&lt;/P&gt;&lt;P&gt;    clear it.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_excel_bcklog.&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vkorg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vbtyp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-auart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-ernam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vbeln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-posnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-erdat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vdatu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-reqdat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-condat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-lifsk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-txt30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-lifsp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-dispo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-dsnam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vmsta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-kunnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-cname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-regio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-cufd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-bstnk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-bsark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-maktx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-t200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vtext&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-matkl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-zzbomind&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-ostat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-cmgst&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-inco1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-oqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-pqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-unit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-onet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-pnet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-curr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-so_bezei&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-sg_bezei&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-bname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-contact&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-telf1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-reqqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-reqval&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-conqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-conval&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-zzrev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-bezei&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-vgbel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_bcklog-0008text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into it_2&lt;/P&gt;&lt;P&gt;separated by deli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; append it_2.&lt;/P&gt;&lt;P&gt;    clear it_2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_excel_blkord.&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;t_excel_blkord-vkorg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbtyp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-auart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-ernam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-vbeln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-posnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-erdat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-vdatu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-reqdat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-condat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-lifsk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-txt30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-lifsp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-dispo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-dsnam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-vmsta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-kunnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-cname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-regio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-cufd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-bstnk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-bsark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-maktx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-t200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-vtext&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-matkl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-zzbomind&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-ostat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-cmgst&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-inco1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-oqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-pqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-unit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-onet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-pnet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-curr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-so_bezei&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-sg_bezei&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-bname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-contact&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-telf1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-reqqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-reqval&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-conqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-conval&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-zzrev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-bezei&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-vgbel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_excel_blkord-0008text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into it_3&lt;/P&gt;&lt;P&gt;separated by deli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; append it_3.&lt;/P&gt;&lt;P&gt;    clear it_3.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if h_excel-header = space or h_excel-handle = -1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;start Excel&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    create object h_excel 'EXCEL.APPLICATION'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM err_hdl.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- get list of workbooks, initially empty&lt;/P&gt;&lt;P&gt;  call method of h_excel 'Workbooks' = h_mapl.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM err_hdl.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  set property of h_excel 'Visible' = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add a new workbook&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call method of h_mapl 'Add' = h_map.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM err_hdl.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*GV_SHEET_NAME = '1st SHEET'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gv_sheet_name = 'Back Orders'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  get property of  h_excel 'ACTIVESHEET' = worksheet.&lt;/P&gt;&lt;P&gt;set property of worksheet 'Name' = gv_sheet_name .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Formatting the area of additional data 1 and doing the BOLD&lt;/P&gt;&lt;P&gt;call method of h_excel 'Cells' = w_cell1&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = 1&lt;/P&gt;&lt;P&gt;#2 = 1.&lt;/P&gt;&lt;P&gt;call method of h_excel 'Cells' = w_cell2&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = 1&lt;/P&gt;&lt;P&gt;#2 = 50.&lt;/P&gt;&lt;P&gt;call method of h_excel 'Range' = h_cell&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = w_cell1&lt;/P&gt;&lt;P&gt;#2 = w_cell2.&lt;/P&gt;&lt;P&gt;*CALL METHOD OF gs_cells 'Select' .&lt;/P&gt;&lt;P&gt;get property of h_cell 'Font' = gs_font .&lt;/P&gt;&lt;P&gt;set property of gs_font 'Bold' = 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        data l_rc type i.&lt;/P&gt;&lt;P&gt;  call method cl_gui_frontend_services=&amp;gt;clipboard_export&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      data                 = it[]&lt;/P&gt;&lt;P&gt;    changing&lt;/P&gt;&lt;P&gt;      rc                   = l_rc&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      cntl_error           = 1&lt;/P&gt;&lt;P&gt;      error_no_gui         = 2&lt;/P&gt;&lt;P&gt;      not_supported_by_gui = 3&lt;/P&gt;&lt;P&gt;      others               = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of h_excel 'Cells' = w_cell1&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      #1 = 1&lt;/P&gt;&lt;P&gt;      #2 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of h_excel 'Cells' = w_cell2&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      #1 = 1&lt;/P&gt;&lt;P&gt;      #2 = 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM err_hdl.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   call method of h_excel 'Range' = range&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      #1 = w_cell1&lt;/P&gt;&lt;P&gt;      #2 = w_cell2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of range 'Select'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM err_hdl.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call method of worksheet 'Paste'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM err_hdl.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL METHOD OF h_excel 'QUIT'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*GV_SHEET_NAME = '2ND SHEET'.&lt;/P&gt;&lt;P&gt;gv_sheet_name = 'Backlog'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get property of h_excel 'Sheets' = h_sheet2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of h_sheet2 'Add' = h_map.&lt;/P&gt;&lt;P&gt;set property of h_map 'Name' = gv_sheet_name .&lt;/P&gt;&lt;P&gt;  get property of  h_excel 'ACTIVESHEET' = worksheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Formatting the area of additional data 1 and doing the BOLD&lt;/P&gt;&lt;P&gt;call method of h_excel 'Cells' = w_cell1&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = 1&lt;/P&gt;&lt;P&gt;#2 = 1.&lt;/P&gt;&lt;P&gt;call method of h_excel 'Cells' = w_cell2&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = 1&lt;/P&gt;&lt;P&gt;#2 = 50.&lt;/P&gt;&lt;P&gt;call method of h_excel 'Range' = h_cell&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = w_cell1&lt;/P&gt;&lt;P&gt;#2 = w_cell2.&lt;/P&gt;&lt;P&gt;get property of h_cell 'Font' = gs_font .&lt;/P&gt;&lt;P&gt;set property of gs_font 'Bold' = 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method cl_gui_frontend_services=&amp;gt;clipboard_export&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      data                 = it_2[]&lt;/P&gt;&lt;P&gt;    changing&lt;/P&gt;&lt;P&gt;      rc                   = l_rc&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      cntl_error           = 1&lt;/P&gt;&lt;P&gt;      error_no_gui         = 2&lt;/P&gt;&lt;P&gt;      not_supported_by_gui = 3&lt;/P&gt;&lt;P&gt;      others               = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of h_excel 'Cells' = w_cell1&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      #1 = 1&lt;/P&gt;&lt;P&gt;      #2 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of h_excel 'Cells' = w_cell2&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      #1 = 1&lt;/P&gt;&lt;P&gt;      #2 = 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM err_hdl.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   call method of h_excel 'Range' = range&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      #1 = w_cell1&lt;/P&gt;&lt;P&gt;      #2 = w_cell2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of range 'Select'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM err_hdl.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call method of worksheet 'Paste'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*GV_SHEET_NAME = '3rd SHEET'.&lt;/P&gt;&lt;P&gt;gv_sheet_name = 'Blocked Orders'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get property of h_excel 'Sheets' = h_sheet3 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of h_sheet3 'Add' = h_map.&lt;/P&gt;&lt;P&gt;set property of h_map 'Name' = gv_sheet_name .&lt;/P&gt;&lt;P&gt;  get property of  h_excel 'ACTIVESHEET' = worksheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Formatting the area of additional data 1 and doing the BOLD&lt;/P&gt;&lt;P&gt;call method of h_excel 'Cells' = w_cell1&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = 1&lt;/P&gt;&lt;P&gt;#2 = 1.&lt;/P&gt;&lt;P&gt;call method of h_excel 'Cells' = w_cell2&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = 1&lt;/P&gt;&lt;P&gt;#2 = 50.&lt;/P&gt;&lt;P&gt;call method of h_excel 'Range' = h_cell&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = w_cell1&lt;/P&gt;&lt;P&gt;#2 = w_cell2.&lt;/P&gt;&lt;P&gt;get property of h_cell 'Font' = gs_font .&lt;/P&gt;&lt;P&gt;set property of gs_font 'Bold' = 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method cl_gui_frontend_services=&amp;gt;clipboard_export&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      data                 = it_3[]&lt;/P&gt;&lt;P&gt;    changing&lt;/P&gt;&lt;P&gt;      rc                   = l_rc&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      cntl_error           = 1&lt;/P&gt;&lt;P&gt;      error_no_gui         = 2&lt;/P&gt;&lt;P&gt;      not_supported_by_gui = 3&lt;/P&gt;&lt;P&gt;      others               = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of h_excel 'Cells' = w_cell1&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      #1 = 1&lt;/P&gt;&lt;P&gt;      #2 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of h_excel 'Cells' = w_cell2&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      #1 = 1&lt;/P&gt;&lt;P&gt;      #2 = 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM err_hdl.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   call method of h_excel 'Range' = range&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      #1 = w_cell1&lt;/P&gt;&lt;P&gt;      #2 = w_cell2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of range 'Select'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM err_hdl.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call method of worksheet 'Paste'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- disconnect from Excel&lt;/P&gt;&lt;P&gt;  free object h_zl.&lt;/P&gt;&lt;P&gt;  free object h_mapl.&lt;/P&gt;&lt;P&gt;  free object h_map.&lt;/P&gt;&lt;P&gt;  free object h_excel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 18:10:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-multiple-columns-in-excel-spreadsheet/m-p/1517273#M237968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-27T18:10:38Z</dc:date>
    </item>
  </channel>
</rss>

