<?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: EXport Data to Excel with Columns format in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/export-data-to-excel-with-columns-format/m-p/7390097#M1545268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: go_excel       type ole2_object,&lt;/P&gt;&lt;P&gt;          Go_CELL        TYPE OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_workbooks   TYPE OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_workbook    TYPE OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_sheet       type OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_application type OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_activesheet type OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_text        type OLE2_OBJECT.&lt;/P&gt;&lt;P&gt;    gv_EXTRD = sy-datum.&lt;/P&gt;&lt;P&gt;    gv_EXTRT = sy-uzeit.&lt;/P&gt;&lt;P&gt;    concatenate pfile gv_EXTRD gv_EXTRT  'check.xls' into gv_file.&lt;/P&gt;&lt;P&gt;    clear: gt_export, gs_export.&lt;/P&gt;&lt;P&gt;****INITIATE EXCEL&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create object Excel&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    create object go_excel 'EXCEL.APPLICATION'.&lt;/P&gt;&lt;P&gt;    set property of go_excel 'Visible' = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create workbook object&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call method of go_excel 'WORKBOOKS' = go_workbook .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Add workbook&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call method of go_workbook 'Add' = go_workbook.&lt;/P&gt;&lt;P&gt;    lv_line = 0.&lt;/P&gt;&lt;P&gt;    loop at gt_collect ASSIGNING &amp;lt;collect&amp;gt;.&lt;/P&gt;&lt;P&gt;      lv_line = lv_line + 1.&lt;/P&gt;&lt;P&gt;      move-corresponding &amp;lt;collect&amp;gt; to gs_export.&lt;/P&gt;&lt;P&gt;      clear: gs_export-ZALDT.&lt;/P&gt;&lt;P&gt;      concatenate &amp;lt;collect&amp;gt;-ZALDT&lt;EM&gt;4(2) '-' &amp;lt;collect&amp;gt;-ZALDT&lt;/EM&gt;6(2) '-' &amp;lt;collect&amp;gt;-ZALDT+0(4)&lt;/P&gt;&lt;P&gt;           into gs_export-ZALDT.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate cells&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      call method of go_excel 'Cells' = Go_CELL&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          #1 = lv_line&lt;/P&gt;&lt;P&gt;          #2 = 1.&lt;/P&gt;&lt;P&gt;**************SET UP PROPERTY WIDTH ****************************&lt;/P&gt;&lt;P&gt;      SET PROPERTY OF GO_CELL 'ColumnWidth' = '11'.&lt;/P&gt;&lt;P&gt;      SET PROPERTY OF GO_CELL 'Value' = gs_export-BANKL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********&lt;STRONG&gt;SET PROPERTY CELL NUMBER&lt;/STRONG&gt;**************************************&lt;/P&gt;&lt;P&gt;      call method of go_excel 'Cells' = Go_CELL&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          #1 = lv_line&lt;/P&gt;&lt;P&gt;          #2 = 4.&lt;/P&gt;&lt;P&gt;      SET PROPERTY OF go_cell 'NumberFormat' = '@'.     "PROPERTY NUMBER&lt;/P&gt;&lt;P&gt;      SET PROPERTY OF GO_CELL 'ColumnWidth' = '10'.&lt;/P&gt;&lt;P&gt;      SET PROPERTY OF GO_CELL 'Value' = gs_export-ZALDT.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;CLOSE EXCEL&lt;/STRONG&gt;**********&lt;/P&gt;&lt;P&gt;    CALL METHOD OF go_workbook 'SaveAs'&lt;/P&gt;&lt;P&gt;      EXPORTING #1 = gv_file&lt;/P&gt;&lt;P&gt;      #2 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    "file format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD OF go_workbook 'close'.                                    "file format&lt;/P&gt;&lt;P&gt;    call method of go_excel 'QUIT'.&lt;/P&gt;&lt;P&gt;****OPEN CREATED EXCEL FILE ****************************&lt;/P&gt;&lt;P&gt;    call method of go_excel 'Workbooks' = go_workbooks.&lt;/P&gt;&lt;P&gt;    call method of go_workbooks 'Open'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        #1 = gv_file.&lt;/P&gt;&lt;P&gt;    set property of go_excel 'Visible' = 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Oct 2010 05:40:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-10-28T05:40:11Z</dc:date>
    <item>
      <title>EXport Data to Excel with Columns format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/export-data-to-excel-with-columns-format/m-p/7390096#M1545267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may  be a basic question, however, I just need a tip to conclude my issue.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Report that displays Financial Budget data (AFE).  I am able to download to the Excel sheet.  However, I need to conclude it with the column formatted at code itself and not given to the user. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is I want to set couple of column to Numeric, and Set Colum width defined at Code level itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am already using the Function module : MS_EXCEL_OLE_STANDARD_DAT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Oct 2010 12:14:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/export-data-to-excel-with-columns-format/m-p/7390096#M1545267</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2010-10-27T12:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: EXport Data to Excel with Columns format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/export-data-to-excel-with-columns-format/m-p/7390097#M1545268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: go_excel       type ole2_object,&lt;/P&gt;&lt;P&gt;          Go_CELL        TYPE OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_workbooks   TYPE OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_workbook    TYPE OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_sheet       type OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_application type OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_activesheet type OLE2_OBJECT,&lt;/P&gt;&lt;P&gt;          go_text        type OLE2_OBJECT.&lt;/P&gt;&lt;P&gt;    gv_EXTRD = sy-datum.&lt;/P&gt;&lt;P&gt;    gv_EXTRT = sy-uzeit.&lt;/P&gt;&lt;P&gt;    concatenate pfile gv_EXTRD gv_EXTRT  'check.xls' into gv_file.&lt;/P&gt;&lt;P&gt;    clear: gt_export, gs_export.&lt;/P&gt;&lt;P&gt;****INITIATE EXCEL&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create object Excel&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    create object go_excel 'EXCEL.APPLICATION'.&lt;/P&gt;&lt;P&gt;    set property of go_excel 'Visible' = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create workbook object&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call method of go_excel 'WORKBOOKS' = go_workbook .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Add workbook&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call method of go_workbook 'Add' = go_workbook.&lt;/P&gt;&lt;P&gt;    lv_line = 0.&lt;/P&gt;&lt;P&gt;    loop at gt_collect ASSIGNING &amp;lt;collect&amp;gt;.&lt;/P&gt;&lt;P&gt;      lv_line = lv_line + 1.&lt;/P&gt;&lt;P&gt;      move-corresponding &amp;lt;collect&amp;gt; to gs_export.&lt;/P&gt;&lt;P&gt;      clear: gs_export-ZALDT.&lt;/P&gt;&lt;P&gt;      concatenate &amp;lt;collect&amp;gt;-ZALDT&lt;EM&gt;4(2) '-' &amp;lt;collect&amp;gt;-ZALDT&lt;/EM&gt;6(2) '-' &amp;lt;collect&amp;gt;-ZALDT+0(4)&lt;/P&gt;&lt;P&gt;           into gs_export-ZALDT.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate cells&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      call method of go_excel 'Cells' = Go_CELL&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          #1 = lv_line&lt;/P&gt;&lt;P&gt;          #2 = 1.&lt;/P&gt;&lt;P&gt;**************SET UP PROPERTY WIDTH ****************************&lt;/P&gt;&lt;P&gt;      SET PROPERTY OF GO_CELL 'ColumnWidth' = '11'.&lt;/P&gt;&lt;P&gt;      SET PROPERTY OF GO_CELL 'Value' = gs_export-BANKL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********&lt;STRONG&gt;SET PROPERTY CELL NUMBER&lt;/STRONG&gt;**************************************&lt;/P&gt;&lt;P&gt;      call method of go_excel 'Cells' = Go_CELL&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          #1 = lv_line&lt;/P&gt;&lt;P&gt;          #2 = 4.&lt;/P&gt;&lt;P&gt;      SET PROPERTY OF go_cell 'NumberFormat' = '@'.     "PROPERTY NUMBER&lt;/P&gt;&lt;P&gt;      SET PROPERTY OF GO_CELL 'ColumnWidth' = '10'.&lt;/P&gt;&lt;P&gt;      SET PROPERTY OF GO_CELL 'Value' = gs_export-ZALDT.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;CLOSE EXCEL&lt;/STRONG&gt;**********&lt;/P&gt;&lt;P&gt;    CALL METHOD OF go_workbook 'SaveAs'&lt;/P&gt;&lt;P&gt;      EXPORTING #1 = gv_file&lt;/P&gt;&lt;P&gt;      #2 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    "file format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD OF go_workbook 'close'.                                    "file format&lt;/P&gt;&lt;P&gt;    call method of go_excel 'QUIT'.&lt;/P&gt;&lt;P&gt;****OPEN CREATED EXCEL FILE ****************************&lt;/P&gt;&lt;P&gt;    call method of go_excel 'Workbooks' = go_workbooks.&lt;/P&gt;&lt;P&gt;    call method of go_workbooks 'Open'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        #1 = gv_file.&lt;/P&gt;&lt;P&gt;    set property of go_excel 'Visible' = 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 05:40:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/export-data-to-excel-with-columns-format/m-p/7390097#M1545268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-28T05:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: EXport Data to Excel with Columns format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/export-data-to-excel-with-columns-format/m-p/7390098#M1545269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot.  Helpful note.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2011 06:06:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/export-data-to-excel-with-columns-format/m-p/7390098#M1545269</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2011-08-16T06:06:09Z</dc:date>
    </item>
  </channel>
</rss>

