Closed wspagnola closed 6 months ago
Just a guess: it might be because every merged cell still contains data. You could try to erase the duplicated cells and keep only a single cell value. mergeCell simply sets the XML string that tells excel to combine the cells. If you unmerge the cells you see a value in every cell.
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Hello,
I'm trying to export data into an excel file and create a file that looks this
I use this code to create a report and use the mergeCells function to merge ela and math into one cell
`` wb <- createWorkbook() addWorksheet(wb, "Report") writeData(wb, "Report", school_report, startCol = 1, startRow = 1, rowNames = FALSE)
mergeCells(wb, "Report", cols = 1, rows = 2:(length(grades)+1)) mergeCells(wb, "Report", cols = 1, rows = (length(grades)+2):(nrow(school_report)+1))
saveWorkbook(wb, file = paste0(path, "school_report.xlsx"), TRUE) `` However, when I create the save file and create a chart the subject in the x-axis appears unmerged even though the cells in the sheet are clearly merged. If I manually unmerge and re-merge the cells the chart appears the way I want it to.
I was wondering if there is something I can do in R to fix this or if this is excel issue.