Skip to content

textWrap gives corrupted sheet #17

@SHAESEN2

Description

@SHAESEN2

Hey,

When I use wrapText=TRUE I obtain a corrupted file:

wb <- createWorkbook()

addWorksheet(wb, "Expenditure", gridLines = FALSE) 

writeData(wb, sheet = 1, USPersonalExpenditure, rowNames = TRUE)

bodyStyle <- createStyle(fontSize=10, border="TopBottomLeftRight", borderColour = "black" , wrapText=TRUE)
headerStyle <- createStyle(fontSize=14, border="TopBottomLeftRight", borderColour = "black", textDecoration="bold")

addStyle(wb, sheet = 1, bodyStyle, rows = 2:6, cols = 1:6, gridExpand = TRUE)
addStyle(wb, sheet = 1, headerStyle, rows = 1, cols = 1:6, gridExpand = TRUE)

setColWidths(wb, 1, cols=1, widths = 21) ## set column width for row names column

saveWorkbook(wb, "addStyleExample.xlsx", overwrite = TRUE)

I attached a file with and without text wrapping for your convenience.

addStyleExample_wrapF.xlsx

addStyleExample_wrapT.xlsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions