<?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: Create multiple worksheets in single workbook in application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963518#M1490200</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks for your reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create the excel sheets in APPLICATION SERVER ....and i need to transfer the internal table contents to excel sheets which is application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help me.&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;Krishnamoorthy  V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jun 2010 11:14:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-21T11:14:24Z</dc:date>
    <item>
      <title>Create multiple worksheets in single workbook in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963516#M1490198</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;How to create the excel file which is having multiple sheets in single workbook to transfer two internal table contents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've two internal tables and i need to tranfer this to applicationserver with the excel sheet (Each interanl table to each excel sheet). I can able to create SINGLE excel workbook in application server with one sheet and not able to create with two different sheets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help me....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Krishna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 10:36:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963516#M1490198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T10:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple worksheets in single workbook in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963517#M1490199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;INCLUDE ole2incl.

DATA: h_excel TYPE ole2_object,        " Excel object
      h_mapl  TYPE ole2_object,        " list of workbooks
      h_sheet TYPE ole2_object,        " Sheet
      h_map   TYPE ole2_object,        " workbook
      h_zl    TYPE ole2_object,        " cell
      h_f     TYPE ole2_object,        " font
      int     TYPE ole2_object,        " color
      g_worksheet TYPE ole2_object,
      g_worksheets TYPE ole2_object.

DATA: g_first_ws VALUE 'Y',
      count TYPE i VALUE 1,
      h  TYPE  i   ,
      g_row TYPE i,
      g_col TYPE i,

PERFORM download_excel .

FORM download_excel .

  DATA : x TYPE i,
        gs_adrc LIKE adrc.

  CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
  SET PROPERTY OF h_excel  'Visible' = 1.
  CALL METHOD OF h_excel 'Workbooks' = h_mapl.
  CALL METHOD OF h_mapl 'Add' = h_map.
  x = 0.
  GET PROPERTY OF h_map 'Worksheets' = g_worksheets.
  h = 1.

*for first internal table
  PERFORM  add_worksheet.
  LOOP AT gt_outtab.
    h = h + 1.
    PERFORM fill_cell USING h 2 1 gt_outtab-matnr.
    PERFORM fill_cell USING h 3 0 gt_outtab-maktx.
  ENDLOOP.

*for second internal table
  PERFORM  add_worksheet.
  LOOP AT gt_outtab.
    h = h + 1.
    PERFORM fill_cell USING h 2 1 gt_outtab-matnr.
    PERFORM fill_cell USING h 3 0 gt_outtab-maktx.
  ENDLOOP.

ENDFORM.                    "download_excel


FORM fill_cell USING i j bold val.
  CALL METHOD OF h_excel 'Cells' = h_zl
    EXPORTING
    #1 = i
    #2 = j.
  SET PROPERTY OF h_zl 'Value' = val .

  GET PROPERTY OF h_zl 'Font' = h_f.

  SET PROPERTY OF h_f 'Bold' = bold .

ENDFORM.                    "FILL_CELL


FORM add_worksheet.

  IF g_first_ws ='N'.
    g_first_ws = 'N'.
    GET PROPERTY OF h_excel 'ACTIVESHEET' = g_worksheet.
  ELSE.
    CALL METHOD OF g_worksheets 'Add' = g_worksheet.
  ENDIF.
  SET PROPERTY OF g_worksheet 'NAME' = count.
  h = 1.
  g_col = 1.
  count = count + 1.
ENDFORM.                    "add_worksheet&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 11:07:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963517#M1490199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T11:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple worksheets in single workbook in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963518#M1490200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks for your reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create the excel sheets in APPLICATION SERVER ....and i need to transfer the internal table contents to excel sheets which is application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help me.&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;Krishnamoorthy  V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 11:14:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963518#M1490200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T11:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple worksheets in single workbook in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963519#M1490201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;If you need to deal with application server then &lt;/P&gt;&lt;P&gt;make use of &lt;/P&gt;&lt;P&gt;Open Data Set&lt;/P&gt;&lt;P&gt;Transfer contents to and from file/application server/ internal table work area &lt;/P&gt;&lt;P&gt;Close Data Set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Uma Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 11:24:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963519#M1490201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T11:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple worksheets in single workbook in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963520#M1490202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="735130"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 11:32:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963520#M1490202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T11:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple worksheets in single workbook in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963521#M1490203</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;Thank for your reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to transfer two internal contents to two worksheets in single excel workbook ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;materialdetails.xls is having two sheets as below and i need to transfer two internal table contents.&lt;/P&gt;&lt;P&gt;Open dataset is creating excelsheet as well but with only one sheet...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lt_matnr  = sheet1_matnr.&lt;/P&gt;&lt;P&gt;lt_matnr2 = sheet2_matnr2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Krishnamoorthy .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 13:36:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963521#M1490203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T13:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple worksheets in single workbook in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963522#M1490204</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;Thank for your reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to transfer two internal contents to two worksheets in single excel workbook ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;materialdetails.xls is having two sheets as below and i need to transfer two internal table contents.&lt;/P&gt;&lt;P&gt;Open dataset is creating excelsheet as well but with only one sheet...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lt_matnr  = sheet1_matnr.&lt;/P&gt;&lt;P&gt;lt_matnr2 = sheet2_matnr2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Krishnamoorthy .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 13:36:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963522#M1490204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T13:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple worksheets in single workbook in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963523#M1490205</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;How can i make this excel generated in background and attach to an email later? &lt;/P&gt;&lt;P&gt;I can see this excel generated with 2 tabs in front end.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 14:21:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-multiple-worksheets-in-single-workbook-in-application-server/m-p/6963523#M1490205</guid>
      <dc:creator>ricky_shaw</dc:creator>
      <dc:date>2021-03-31T14:21:25Z</dc:date>
    </item>
  </channel>
</rss>

