<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Spreadsheet</title><link>https://sourceforge.net/p/weberp-github/wiki/Spreadsheet/</link><description>Recent changes to Spreadsheet</description><atom:link href="https://sourceforge.net/p/weberp-github/wiki/Spreadsheet/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 15 Oct 2024 09:20:30 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/weberp-github/wiki/Spreadsheet/feed" rel="self" type="application/rss+xml"/><item><title>Spreadsheet modified by Tim Schofield</title><link>https://sourceforge.net/p/weberp-github/wiki/Spreadsheet/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -15,24 +15,33 @@
 We currently only use PHPExcel in two scripts, PcAnalysis.php and PcTabExpensesList.php.

 The declaration of the object changes from
-$objPHPExcel = new PHPExcel();
+
+`$objPHPExcel = new PHPExcel();`
+
 to
-$objPHPExcel = new Spreadsheet();
+
+`$objPHPExcel = new Spreadsheet();`

 Setting the horizontal alignment style changes from
-$objPHPExcel-&amp;gt;getActiveSheet()-&amp;gt;getStyle('A:B')-&amp;gt;getAlignment()-&amp;gt;setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);
+
+`$objPHPExcel-&amp;gt;getActiveSheet()-&amp;gt;getStyle('A:B')-&amp;gt;getAlignment()-&amp;gt;setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);`
+
 to
-$objPHPExcel-&amp;gt;getActiveSheet()-&amp;gt;getStyle('A:B')-&amp;gt;getAlignment()-&amp;gt;setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT);
+
+`$objPHPExcel-&amp;gt;getActiveSheet()-&amp;gt;getStyle('A:B')-&amp;gt;getAlignment()-&amp;gt;setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT);`

 and creating the writer changes from
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
-$objWriter-&amp;gt;save('php://output');
+
+`$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');`
+`$objWriter-&amp;gt;save('php://output');`
+
 to
-if ($_POST['Format'] == 'xlsx') {
-        $objWriter = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($objPHPExcel);
-        $objWriter-&amp;gt;save('php://output');
-} else if ($_POST['Format'] == 'ods') {
-        $objWriter = new \PhpOffice\PhpSpreadsheet\Writer\Ods($objPHPExcel);
-        $objWriter-&amp;gt;save('php://output');
-}
+
+`if ($_POST['Format'] == 'xlsx') {`
+        `$objWriter = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($objPHPExcel);`
+        `$objWriter-&amp;gt;save('php://output');`
+`} else if ($_POST['Format'] == 'ods') {`
+        `$objWriter = new \PhpOffice\PhpSpreadsheet\Writer\Ods($objPHPExcel);`
+        `$objWriter-&amp;gt;save('php://output');`
+`}`

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Schofield</dc:creator><pubDate>Tue, 15 Oct 2024 09:20:30 -0000</pubDate><guid>https://sourceforge.netf9a286106f8adeaff0a62ce7f7a81a91b436f82b</guid></item><item><title>Spreadsheet modified by Tim Schofield</title><link>https://sourceforge.net/p/weberp-github/wiki/Spreadsheet/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,3 +1,38 @@
-PHPExcel is no longer maintained, and is not PHP8 compatible.
+# Problem

-Propose we move to PHPSpreadsheet
+PHPExcel is no longer maintained, and is not PHP8 compatible (https://github.com/PHPOffice/PHPExcel).
+
+# Proposal
+
+Propose we move to using PHPSpreadsheet (https://github.com/PHPOffice/PhpSpreadsheet). PHPSpreadsheet is the successor to PHPExcel, so the transition is relatively easy, with just a few function name changes.
+
+# Advantages
+
+As well as maintaining PHP8 compatibility, PHPSpreadsheet has the facility to save spreadsheets in other formats, not just Excel, allowing us to save the spreadsheet in Excel format (*.xlsx), or Open document format (*.ods). As we are an open source project I feel more comfortable offering an open format as well as a proprietary one.
+
+# Implementation
+
+We currently only use PHPExcel in two scripts, PcAnalysis.php and PcTabExpensesList.php.
+
+The declaration of the object changes from
+$objPHPExcel = new PHPExcel();
+to
+$objPHPExcel = new Spreadsheet();
+
+Setting the horizontal alignment style changes from
+$objPHPExcel-&amp;gt;getActiveSheet()-&amp;gt;getStyle('A:B')-&amp;gt;getAlignment()-&amp;gt;setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);
+to
+$objPHPExcel-&amp;gt;getActiveSheet()-&amp;gt;getStyle('A:B')-&amp;gt;getAlignment()-&amp;gt;setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT);
+
+and creating the writer changes from
+$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter-&amp;gt;save('php://output');
+to
+if ($_POST['Format'] == 'xlsx') {
+        $objWriter = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($objPHPExcel);
+        $objWriter-&amp;gt;save('php://output');
+} else if ($_POST['Format'] == 'ods') {
+        $objWriter = new \PhpOffice\PhpSpreadsheet\Writer\Ods($objPHPExcel);
+        $objWriter-&amp;gt;save('php://output');
+}
+ 
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Schofield</dc:creator><pubDate>Tue, 15 Oct 2024 09:20:30 -0000</pubDate><guid>https://sourceforge.net2717e3469057f65fecb000a9c145182fa48164a0</guid></item><item><title>Spreadsheet modified by Tim Schofield</title><link>https://sourceforge.net/p/weberp-github/wiki/Spreadsheet/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;PHPExcel is no longer maintained, and is not PHP8 compatible.&lt;/p&gt;
&lt;p&gt;Propose we move to PHPSpreadsheet&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Schofield</dc:creator><pubDate>Tue, 15 Oct 2024 09:20:30 -0000</pubDate><guid>https://sourceforge.netf39a9e56851d5b17eb414027e0f5902ee56df55f</guid></item></channel></rss>