<?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: php script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/php-script/m-p/3858097#M98277</link>
    <description>Try Adding One and add data to it and add the second one. Else use the select() oject to select the sheet  and then add. or you can use seperate variables for each sheet and then you can add it.&lt;BR /&gt;&lt;BR /&gt;A Sibple sample is given below.&lt;BR /&gt;&lt;BR /&gt;require_once 'C:\php\Excel\Writer.php';&lt;BR /&gt;&lt;BR /&gt;// We give the path to our file here&lt;BR /&gt;$workbook = new Spreadsheet_Excel_Writer('C:\php\Excel\test.xls');&lt;BR /&gt;&lt;BR /&gt;$worksheet1 =&amp;amp; $workbook-&amp;gt;addWorksheet('Products');&lt;BR /&gt;$worksheet1-&amp;gt;write(0, 0, 'Name');&lt;BR /&gt;$worksheet1-&amp;gt;write(0, 1, 'Age');&lt;BR /&gt;$worksheet1-&amp;gt;write(1, 0, 'John Smith');&lt;BR /&gt;$worksheet1-&amp;gt;write(1, 1, 30);&lt;BR /&gt;$worksheet1-&amp;gt;write(2, 0, 'Johann Schmidt');&lt;BR /&gt;$worksheet1-&amp;gt;write(2, 1, 31);&lt;BR /&gt;$worksheet1-&amp;gt;write(3, 0, 'Juan Herrera');&lt;BR /&gt;$worksheet1-&amp;gt;write(3, 1, 32);&lt;BR /&gt;$worksheet1 =&amp;amp; $workbook-&amp;gt;addWorksheet('Products');&lt;BR /&gt;&lt;BR /&gt;$worksheet2 =&amp;amp; $workbook-&amp;gt;addWorksheet('Products_details');&lt;BR /&gt;$worksheet2-&amp;gt;write(0, 0, 'Name');&lt;BR /&gt;$worksheet2-&amp;gt;write(0, 1, 'Age');&lt;BR /&gt;$worksheet2-&amp;gt;write(1, 0, 'Frijo');&lt;BR /&gt;$worksheet2-&amp;gt;write(1, 1, 30);&lt;BR /&gt;$worksheet2-&amp;gt;write(2, 0, 'John Antony');&lt;BR /&gt;$worksheet2-&amp;gt;write(2, 1, 31);&lt;BR /&gt;$worksheet2-&amp;gt;write(3, 0, 'James Rad');&lt;BR /&gt;$worksheet2-&amp;gt;write(3, 1, 32);&lt;BR /&gt;// We still need to explicitly close the workbook&lt;BR /&gt;$workbook-&amp;gt;close();&lt;BR /&gt;?&amp;gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 08 Sep 2006 05:06:49 GMT</pubDate>
    <dc:creator>Frijo Franco</dc:creator>
    <dc:date>2006-09-08T05:06:49Z</dc:date>
    <item>
      <title>php script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-script/m-p/3858096#M98276</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I generated a excel file which contains the data fetched form mysql database.I used the following to do it&lt;BR /&gt;&lt;BR /&gt;header("Content-type: application/octet-stream");&lt;BR /&gt;header("Content-Disposition: attachment; filename=spreadsheet.xls");&lt;BR /&gt;header("Pragma: no-cache");&lt;BR /&gt;header("Expires: 0″);&lt;BR /&gt;print “$headern$data";&lt;BR /&gt;&lt;BR /&gt;using this I could generate an excel file with only one spreadsheet having the file name.&lt;BR /&gt;I NEED TO GENERATE 2 SPREADSHEETS in a single excel sheet and each sheet should contain a table content fetched from the db in the same format as in db.&lt;BR /&gt;&lt;BR /&gt;The another way I tried is like below&lt;BR /&gt;&lt;BR /&gt;  require_once('C:\apachefriends\xampp\php\pear\Spreadsheet\Excel\Writer.php'); //specify path&lt;BR /&gt;  // Creating a workbook&lt;BR /&gt;  $workbook = new Spreadsheet_Excel_Writer();&lt;BR /&gt;  // sending HTTP headers&lt;BR /&gt; $sel_USchema = filename;&lt;BR /&gt;  if($sel_USchema!= 'None')&lt;BR /&gt; {&lt;BR /&gt;   $workbook-&amp;gt;send($sel_USchema.'.xls'); //specify path&lt;BR /&gt;   // Creating a worksheet&lt;BR /&gt;   $worksheet =&amp;amp; $workbook-&amp;gt;addWorksheet('Products');&lt;BR /&gt;   $worksheet =&amp;amp; $workbook-&amp;gt;addWorksheet('Products_details');&lt;BR /&gt;   $workbook-&amp;gt;close();&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt;   alert("Please select any UserSchema Name");&lt;BR /&gt; }&lt;BR /&gt; ?&amp;gt;&lt;BR /&gt; with the above code I was could generate 2 spread sheets in single excel file but struck up while trying to write the data in the 2 sheets..&lt;BR /&gt;&lt;BR /&gt;Please help me out..&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Sep 2006 23:36:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-script/m-p/3858096#M98276</guid>
      <dc:creator>Sasirekha</dc:creator>
      <dc:date>2006-09-06T23:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: php script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-script/m-p/3858097#M98277</link>
      <description>Try Adding One and add data to it and add the second one. Else use the select() oject to select the sheet  and then add. or you can use seperate variables for each sheet and then you can add it.&lt;BR /&gt;&lt;BR /&gt;A Sibple sample is given below.&lt;BR /&gt;&lt;BR /&gt;require_once 'C:\php\Excel\Writer.php';&lt;BR /&gt;&lt;BR /&gt;// We give the path to our file here&lt;BR /&gt;$workbook = new Spreadsheet_Excel_Writer('C:\php\Excel\test.xls');&lt;BR /&gt;&lt;BR /&gt;$worksheet1 =&amp;amp; $workbook-&amp;gt;addWorksheet('Products');&lt;BR /&gt;$worksheet1-&amp;gt;write(0, 0, 'Name');&lt;BR /&gt;$worksheet1-&amp;gt;write(0, 1, 'Age');&lt;BR /&gt;$worksheet1-&amp;gt;write(1, 0, 'John Smith');&lt;BR /&gt;$worksheet1-&amp;gt;write(1, 1, 30);&lt;BR /&gt;$worksheet1-&amp;gt;write(2, 0, 'Johann Schmidt');&lt;BR /&gt;$worksheet1-&amp;gt;write(2, 1, 31);&lt;BR /&gt;$worksheet1-&amp;gt;write(3, 0, 'Juan Herrera');&lt;BR /&gt;$worksheet1-&amp;gt;write(3, 1, 32);&lt;BR /&gt;$worksheet1 =&amp;amp; $workbook-&amp;gt;addWorksheet('Products');&lt;BR /&gt;&lt;BR /&gt;$worksheet2 =&amp;amp; $workbook-&amp;gt;addWorksheet('Products_details');&lt;BR /&gt;$worksheet2-&amp;gt;write(0, 0, 'Name');&lt;BR /&gt;$worksheet2-&amp;gt;write(0, 1, 'Age');&lt;BR /&gt;$worksheet2-&amp;gt;write(1, 0, 'Frijo');&lt;BR /&gt;$worksheet2-&amp;gt;write(1, 1, 30);&lt;BR /&gt;$worksheet2-&amp;gt;write(2, 0, 'John Antony');&lt;BR /&gt;$worksheet2-&amp;gt;write(2, 1, 31);&lt;BR /&gt;$worksheet2-&amp;gt;write(3, 0, 'James Rad');&lt;BR /&gt;$worksheet2-&amp;gt;write(3, 1, 32);&lt;BR /&gt;// We still need to explicitly close the workbook&lt;BR /&gt;$workbook-&amp;gt;close();&lt;BR /&gt;?&amp;gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 08 Sep 2006 05:06:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-script/m-p/3858097#M98277</guid>
      <dc:creator>Frijo Franco</dc:creator>
      <dc:date>2006-09-08T05:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: php script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/php-script/m-p/3858098#M98278</link>
      <description>Hi,&lt;BR /&gt;seems you have forgotten about your other thread covering the same topic:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1057181" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1057181&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Everytime you provide updates, your thread 'bounces' to the top of the forum tree, so no need to generate additional threads.</description>
      <pubDate>Fri, 08 Sep 2006 05:14:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/php-script/m-p/3858098#M98278</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-09-08T05:14:30Z</dc:date>
    </item>
  </channel>
</rss>

