You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a named region "NameReg" -> A1:D3 with some merged cells inside in an excel file NamedMergedCell_Example.xlsx.
If I access this region without the name option it workes nicely, all merged cells are recognized and each cell is filled with the value of the merged cell:
dput(openxlsx::read.xlsx("NamedMergedCell_Example.xlsx", fillMergedCells = TRUE))
structure(list(Hello = c("A", "B"), World = c(1, 4), World = c(2,
4), World = c(3, 4)), row.names = 1:2, class = "data.frame")
1. Put NamedMergedCell_Example.xlsx in your working directory.
2. Execute dput(openxlsx::read.xlsx("MergedCell_Example.xlsx", namedRegion = "NameReg", fillMergedCells = TRUE))
sessionInfo()
Version of openxlsx: 4.2.3
Version of R: 4.0.5
The text was updated successfully, but these errors were encountered:
It seems to be related to another open issue openxlsx/issues/499.
I installed openxlsx here from github again, but still the problem persists, also the example from 499 gives still the problematic behaviour on my machine.
Expected Behavior
I created a named region "NameReg" -> A1:D3 with some merged cells inside in an excel file
NamedMergedCell_Example.xlsx.
If I access this region without the name option it workes nicely, all merged cells are recognized and each cell is filled with the value of the merged cell:
dput(openxlsx::read.xlsx("NamedMergedCell_Example.xlsx", fillMergedCells = TRUE))
structure(list(Hello = c("A", "B"), World = c(1, 4), World = c(2,
4), World = c(3, 4)), row.names = 1:2, class = "data.frame")
This should also work if I use the named Region
dput(openxlsx::read.xlsx("NamedMergedCell_Example.xlsx", namedRegion = "NameReg",fillMergedCells = TRUE))
but it does not.
Actual Behavior
dput(openxlsx::read.xlsx("NamedMergedCell_Example.xlsx", namedRegion = "NameReg",fillMergedCells = TRUE))
leads to
structure(list(Hello = c("A", "B"), World = c(1, 4), X3 = c(2,
NA), X4 = c(3, NA)), row.names = 1:2, class = "data.frame")
The merged cell is not resolved. Only the first cell gets its value all others are NA.
Steps to Reproduce the Problem
NamedMergedCell_Example.xlsx
sessionInfo()
The text was updated successfully, but these errors were encountered: