Exporting data from R into an Excel File that contains a graphic with additional text causes the graphic to be deleted

I have trouble when exporting data from R into an Excel file that contains a graphic with additional text inserted.

The problem is relatively specific.
So I have a datatable in R, like this one :


MWE <- data.table(
  Date=rep(seq(ymd("2020-1-1"), ymd("2020-3-30"), by = "days")),

I then export it in an Excel file using an openxlsx option

Fichier <- loadWorkbook("File.xlsx")
writeData(Fichier, sheet="Data", MWE , colNames=T)

This datatable, now in an Excel sheet, is used to create a graph (two curves with the values for Country 1 and Country 2 over time), in a separate sheet.

Everything works, as long as there is no additional text on the graph (option insert text). When I do so (e.g. to mention sources), then I get the following error (approximate translation) : We have encountered a problem with the file "file.xlsx" but we can try to retrieve the maximum amount of information. If this file is reliable, click on yes.
Then I get the following message and the graphic is deleted

First is it a problem specific to me ?
And if not what could be the cause and how could I get around that ?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.