Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cells' style are not retain when merging cells #9

Closed
DCourtel opened this issue Nov 4, 2018 · 1 comment
Closed

Cells' style are not retain when merging cells #9

DCourtel opened this issue Nov 4, 2018 · 1 comment
Labels
bug Error, misbehavior or unexpected behavior of the library

Comments

@DCourtel
Copy link

DCourtel commented Nov 4, 2018

Hi, when merging several cells, for which the first has an applied style, the merged cell doesn't have any style applied.
The method «ResolveMergedCells» always replace the style of ALL CELLS by the MergeCellStyle (which is empty).

if (pos != 0)
   {
      cell.DataType = Cell.CellType.EMPTY;
   }
   cell.SetStyle(mergeStyle);

To preserve the style of the first cell, it should be:

if (pos != 0)
   {
      cell.DataType = Cell.CellType.EMPTY;
      cell.SetStyle(mergeStyle);
   }
@rabanti-github rabanti-github added the bug Error, misbehavior or unexpected behavior of the library label Nov 4, 2018
@rabanti-github
Copy link
Owner

Hi
Thank you for the report and the provided fix.
The bug was fixed with commit 75cc06e.

All NuGet Packages (PicoXLSX, NanoXlsx) as well as the Java artifacts (PicoXLSX4j, NanoXLSX4j) will be available in a few minutes.

Please let me know if something is not workig as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Error, misbehavior or unexpected behavior of the library
Projects
None yet
Development

No branches or pull requests

2 participants