diff --git a/samples/templates/32readwriteScatterChart3.xlsx b/samples/templates/32readwriteScatterChart3.xlsx index cfd3a3f2d..1aed96ddb 100644 Binary files a/samples/templates/32readwriteScatterChart3.xlsx and b/samples/templates/32readwriteScatterChart3.xlsx differ diff --git a/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php b/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php index 608eadaf0..37a8e36fc 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php @@ -306,7 +306,7 @@ class StringTable extends WriterPart $objWriter->writeAttribute('val', $value); $alpha = $underlineColor->getAlpha(); if (is_numeric($alpha)) { - $objWriter->startElement('a:alpha'); + $objWriter->startElement($prefix . 'alpha'); $objWriter->writeAttribute('val', ChartColor::alphaToXml((int) $alpha)); $objWriter->endElement(); } diff --git a/tests/PhpSpreadsheetTests/Chart/Charts32ScatterTest.php b/tests/PhpSpreadsheetTests/Chart/Charts32ScatterTest.php index 71b92ab6d..4f8bfaddb 100644 --- a/tests/PhpSpreadsheetTests/Chart/Charts32ScatterTest.php +++ b/tests/PhpSpreadsheetTests/Chart/Charts32ScatterTest.php @@ -262,6 +262,7 @@ class Charts32ScatterTest extends AbstractFunctional self::assertNotNull($chartColor); self::assertSame('000000', $chartColor->getValue()); self::assertSame('srgbClr', $chartColor->getType()); + self::assertSame(50, $chartColor->getAlpha()); $plotArea = $chart->getPlotArea(); self::assertNotNull($plotArea);