Skip to content

Conversation

@Slamdunk
Copy link
Contributor

@Slamdunk Slamdunk commented Mar 10, 2022

See box/spout#738

  • Set cell width or set column autofit xlsx. box/spout#729 - fix shrink to fit + add test shrinkToFit was not handled in StyleMerger so it was overwritten by the default cell style StyleManager didn't add the property to the xml if shrinkToFit was used without alignment or text wrap. Unit test
  • Propose of the way of cell merging in Writer box/spout#529 - tests for column width, row height and cell merge + minor refact Tests Added 'addOption' to OptionsManagerInterface Moved 'setColumnWidths' and 'mergeCells' methods to Xlsx Writer implementation since the actual feature only works for Xlsx at the moment

quamis and others added 5 commits March 10, 2022 08:45
Added support for
    mergeCells:
        // mergeCells (B2:G2), you may use CellHelper::getColumnLettersFromColumnIndex() to convert from "B2" to "[1,2]"
	    $writer->mergeCells([1,2], [6, 2]);

    cell height:
        $row->setHeight(30);

    shouldShrinkToFit:
        $style->setShouldShrinkToFit();

These changes are implemented for XLSX as that's what I need and test spout on.
shrinkToFit was not handled in StyleMerger so it was overwritten by the default cell style
StyleManager didn't add the property to the xml if shrinkToFit was used without alignment or text wrap.
Unit test
Tests
Added 'addOption' to OptionsManagerInterface
Moved 'setColumnWidths' and 'mergeCells' methods to Xlsx Writer implementation since the actual feature only works for Xlsx at the moment
@Slamdunk Slamdunk added the enhancement New feature or request label Mar 10, 2022
@Slamdunk Slamdunk merged commit 55eb55e into openspout:main Mar 10, 2022
@Slamdunk Slamdunk deleted the merge_cells branch March 10, 2022 08:11
@Slamdunk
Copy link
Contributor Author

Thank you @quamis and @ignaczistvan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants