-
Notifications
You must be signed in to change notification settings - Fork 76
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
I can't see the preview with iphone of a .xlsx file sent by email created with openxlsx #484
Comments
Try openxlsx2. There are known issues with openxlsx. |
solved! It works |
unfortunately i can see the preview but losting all of customized formattation. Is there a way to see by using a smartphone the preview with the customized formattation without the excel app installed in the smartphone? |
You must be doing something wrong. If you can provide some code for a minimal example to reproduce what you are doing. Otherwise, it works fine with ms365 on my phone. |
pkgEnv$wb_revenues_arpu <- openxlsx2::wb_workbook() openxlsx2::wb_save(pkgEnv$test1, "results/test1.xlsx", overwrite = TRUE) |
Please, something to reproduce ... TAB <- mtcars[1:10, ]
# t(tassi_chart$EBC)
t_tassi_chart_EBC <- t(1:2)
ncols <- ncol(TAB)
wb_revenues_arpu <- openxlsx2::wb_workbook()
wb_revenues_arpu$add_worksheet("test1")
wb_revenues_arpu$add_data("test1", x = TAB, na.strings = "", start_col = 1,
start_row = 1, col_names = TRUE)
wb_revenues_arpu$add_data("test1", x = "Tasso", na.strings = "", start_col = 1, start_row = 20, col_names = FALSE)
wb_revenues_arpu$add_data("test1", x = t_tassi_chart_EBC, na.strings = "", start_col = 2,
start_row = 20, col_names = FALSE)
wb_revenues_arpu$add_numfmt("test1", dims = "B20:N20", numfmt = "0.00%")
wb_revenues_arpu$set_col_widths("test1", cols = 1:ncols, widths = 7.5)
wb_revenues_arpu$add_cell_style("test1", dims = "A1:P20", horizontal = "center", vertical = "center", wrap_text = 1)
wb_revenues_arpu$add_numfmt("test1", dims = "B2:P18", numfmt = "#,##0\u20AC")
wb_revenues_arpu$add_dxfs_style(name = "negStyle", font_color = openxlsx2::wb_color(hex = "#9C0006"),
bgFill = openxlsx2::wb_color(hex = "#FFC7CE"))
wb_revenues_arpu$add_dxfs_style(name = "posStyle", font_color = openxlsx2::wb_color(hex = "#006100"),
bgFill = openxlsx2::wb_color(hex = "#C6EFCE"))
wb_revenues_arpu$save("~/Documents/test.xlsx") Works fine. Looks the same on Mac and iPhone |
yes but you opened it by using excel app, instead i mean just the preview in which you see it just in reading mode so without using office app or excel app |
i created a file in this way:
wb_test1 <- createWorkbook()
addWorksheet(wb_test1, "KPI business")
writeData(wb_test1, sheet = 1, x = "Liquidity * (ECB rate - 0.25)",
startCol = 1, startRow = 2, colNames = FALSE)
addStyle(wb_test1, sheet = 1, rows = 2, cols = 1, style =
createStyle(halign = "center", valign = "center", textDecoration = "bold", wrapText = TRUE,
border = "TopBottomLeftRight"), gridExpand = TRUE)
saveWorkbook(wb_test1, "results/test1.xlsx", overwrite = TRUE)
i sent it by email and unfortunately if i try to open it with my iphone i can't see the preview because "is not supported" but i can opened it if i use excel app, but i need to be able to see alredy the preview. If i use write.xlsx to save file it works but i lose the whole formattation. Any solutions?
The text was updated successfully, but these errors were encountered: