<?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 Export and Import Excel Sheet in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/export-and-import-excel-sheet/m-p/1328318#M167876</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can we read and write to excel sheets from ABAP?&lt;/P&gt;&lt;P&gt;What are the function modules to do that??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 May 2006 05:01:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-18T05:01:16Z</dc:date>
    <item>
      <title>Export and Import Excel Sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/export-and-import-excel-sheet/m-p/1328318#M167876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can we read and write to excel sheets from ABAP?&lt;/P&gt;&lt;P&gt;What are the function modules to do that??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 05:01:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/export-and-import-excel-sheet/m-p/1328318#M167876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-18T05:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Export and Import Excel Sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/export-and-import-excel-sheet/m-p/1328319#M167877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi anandaraja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. To upload data from excel file into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. There are TWO options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) either save the excel to TAB Delimited file, &lt;/P&gt;&lt;P&gt;and use GUI_UPLOAD to upload the data in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) use FM for excel purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. a) is easy and recommended&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. b) there is a FM for it,&lt;/P&gt;&lt;P&gt;but we have to apply some more logic&lt;/P&gt;&lt;P&gt;bcos the FM uploads data of excel&lt;/P&gt;&lt;P&gt;in the intenal table, &lt;/P&gt;&lt;P&gt;CELL BY CELL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. afTER THAT , we have to convert this cell by cell data,&lt;/P&gt;&lt;P&gt;into our format of internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. use this code (just copy paste in new program)&lt;/P&gt;&lt;P&gt;(it is tried wit T001 structure data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(it will AUTOMATICALLY based upon the&lt;/P&gt;&lt;P&gt;fields of internal table,&lt;/P&gt;&lt;P&gt;convert data from cell by cell,&lt;/P&gt;&lt;P&gt;to that of internal table fields)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------" /&gt;&lt;P&gt;DATA : ex LIKE TABLE OF alsmex_tabline WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : cmp LIKE TABLE OF rstrucinfo WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : col TYPE i.&lt;/P&gt;&lt;P&gt;DATA : col1 TYPE i.&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;DATA : fldname(50) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;filename = 'd:\def.xls'&lt;/P&gt;&lt;P&gt;i_begin_col = 1&lt;/P&gt;&lt;P&gt;i_begin_row = 1&lt;/P&gt;&lt;P&gt;i_end_col = 100&lt;/P&gt;&lt;P&gt;i_end_row = 100&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;intern = ex&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;inconsistent_parameters = 1&lt;/P&gt;&lt;P&gt;upload_ole = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_COMPONENT_LIST'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;program = sy-repid&lt;/P&gt;&lt;P&gt;fieldname = 'T001'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;components = cmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT NEW row.&lt;/P&gt;&lt;P&gt;IF sy-tabix &amp;lt;&amp;gt; 1.&lt;/P&gt;&lt;P&gt;APPEND t001.&lt;/P&gt;&lt;P&gt;CLEAR t001.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;col = ex-col.&lt;/P&gt;&lt;P&gt;col1 = col + 1.&lt;/P&gt;&lt;P&gt;READ TABLE cmp INDEX col.&lt;/P&gt;&lt;P&gt;CONCATENATE 'T001-' cmp-compname INTO fldname.&lt;/P&gt;&lt;P&gt;ASSIGN (fldname) TO &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;lt;fs&amp;gt; = ex-value.&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;BREAK-POINT. &lt;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 05:06:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/export-and-import-excel-sheet/m-p/1328319#M167877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-18T05:06:33Z</dc:date>
    </item>
  </channel>
</rss>

