Skip to content

Commit cf8de60

Browse files
committed
phpoffice/phpspreadsheet: Allow version 1.9 or 2.0
1 parent 7a70b57 commit cf8de60

File tree

6 files changed

+24
-14
lines changed

6 files changed

+24
-14
lines changed

README.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
# ![PHPPresentation](https://raw.githubusercontent.com/mvargasmoran/PHPPresentation/develop/docs/images/PHPPresentationLogo.png "PHPPresentation")
22

3-
[![Latest Stable Version](https://poser.pugx.org/phpoffice/phppresentation/v/stable.png)](https://packagist.org/packages/phpoffice/phppresentation)
4-
[![Coverage Status](https://coveralls.io/repos/github/PHPOffice/PHPPresentation/badge.svg?branch=develop)](https://coveralls.io/github/PHPOffice/PHPPresentation?branch=develop)
5-
[![Total Downloads](https://poser.pugx.org/phpoffice/phppresentation/downloads.png)](https://packagist.org/packages/phpoffice/phppresentation)
6-
[![License](https://poser.pugx.org/phpoffice/phppresentation/license.png)](https://packagist.org/packages/phpoffice/phppresentation)
7-
[![BountySource](https://img.shields.io/bountysource/team/phpoffice/activity.svg)](https://www.bountysource.com/teams/phpoffice)
8-
[![Join the chat at https://gitter.im/PHPOffice/PHPPresentation](https://img.shields.io/badge/Gitter-join%20chat-green.svg)](https://gitter.im/PHPOffice/PHPPresentation)
3+
[![Latest Stable Version](https://poser.pugx.org/phpoffice/phppresentation/v)](https://packagist.org/packages/phpoffice/phppresentation)
4+
[![Coverage Status](https://coveralls.io/repos/github/PHPOffice/PHPPresentation/badge.svg?branch=master)](https://coveralls.io/github/PHPOffice/PHPPresentation?branch=master)
5+
[![Total Downloads](https://poser.pugx.org/phpoffice/phppresentation/downloads)](https://packagist.org/packages/phpoffice/phppresentation)
6+
[![License](https://poser.pugx.org/phpoffice/phppresentation/license)](https://packagist.org/packages/phpoffice/phppresentation)
97

108
Branch Master : [![PHPPresentation](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml)
119

12-
Branch Develop : [![PHPPresentation](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml/badge.svg?branch=develop)](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml)
13-
1410
PHPPresentation is a library written in pure PHP that provides a set of classes to write to different presentation file formats, i.e. Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML) or OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF).
1511

1612
PHPPresentation is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPPresentation/blob/develop/COPYING.LESSER). PHPPresentation is aimed to be a high quality software product by incorporating [continuous integration](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml) and [unit testing](https://coveralls.io/github/PHPOffice/PHPPresentation). You can learn more about PHPPresentation by reading the [Developers' Documentation](https://phpoffice.github.io/PHPPresentation) and the [API Documentation](https://phpoffice.github.io/PHPPresentation/docs/).

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"ext-xml": "*",
2424
"ext-zip": "*",
2525
"phpoffice/common": "^1",
26-
"phpoffice/phpspreadsheet": "^1.9.0"
26+
"phpoffice/phpspreadsheet": "^1.9 || ^2.0"
2727
},
2828
"require-dev": {
2929
"phpunit/phpunit": ">=7.0",

docs/changes/1.1.0.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 1.1.0 - WIP
1+
# 1.1.0
22

33
## Features
44

docs/changes/1.2.0.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# 1.2.0
2+
3+
[Full Changelog](https://github.com/PHPOffice/PHPPresentation/compare/1.1.0...1.2.0)
4+
5+
## Enhancements
6+
7+
- `phpoffice/phpspreadsheet`: Allow version 1.9 or 2.0 by [@Progi1984](https://github.com/Progi1984) fixing [#790](https://github.com/PHPOffice/PHPPresentation/pull/790), [#812](https://github.com/PHPOffice/PHPPresentation/pull/812) in [#816](https://github.com/PHPOffice/PHPPresentation/pull/816)
8+
9+
## Bug fixes
10+
11+
## Miscellaneous
12+
13+
## BC Breaks

mkdocs.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ nav:
6767
- FAQ: 'faq.md'
6868
- Credits: 'credits.md'
6969
- Releases:
70-
- '1.1.0 (WIP)': 'changes/1.1.0.md'
70+
- '1.2.0 (WIP)': 'changes/1.2.0.md'
71+
- '1.1.0': 'changes/1.1.0.md'
7172
- '1.0.0': 'changes/1.0.0.md'
7273
- '0.9.0': 'changes/0.9.0.md'
7374
- '0.8.0': 'changes/0.8.0.md'

src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -253,20 +253,20 @@ protected function writeSpreadsheet(PhpPresentation $presentation, Chart $chart,
253253
$seriesIndex = 0;
254254
foreach ($chart->getPlotArea()->getType()->getSeries() as $series) {
255255
// Title
256-
$sheet->setCellValueByColumnAndRow(2 + $seriesIndex, 1, $series->getTitle());
256+
$sheet->setCellValue(Coordinate::stringFromColumnIndex(2 + $seriesIndex) . 1, $series->getTitle());
257257

258258
// X-axis
259259
$axisXData = array_keys($series->getValues());
260260
$numAxisXData = count($axisXData);
261261
for ($i = 0; $i < $numAxisXData; ++$i) {
262-
$sheet->setCellValueByColumnAndRow(1, $i + 2, $axisXData[$i]);
262+
$sheet->setCellValue('A' . ($i + 2), $axisXData[$i]);
263263
}
264264

265265
// Y-axis
266266
$axisYData = array_values($series->getValues());
267267
$numAxisYData = count($axisYData);
268268
for ($i = 0; $i < $numAxisYData; ++$i) {
269-
$sheet->setCellValueByColumnAndRow(2 + $seriesIndex, $i + 2, $axisYData[$i]);
269+
$sheet->setCellValue(Coordinate::stringFromColumnIndex(2 + $seriesIndex) . ($i + 2), $axisYData[$i]);
270270
}
271271

272272
++$seriesIndex;

0 commit comments

Comments
 (0)