ycphs / openxlsx

openxlsx - a fast way to read and write complex xslx files
https://ycphs.github.io/openxlsx/
Other
226 stars 75 forks source link

Consolidate Excel File with Images and Write the Output with the Image into Excel in R #502

Open richujos opened 2 months ago

richujos commented 2 months ago

I am trying to consolidate two excel file with the same column names and write the output into an another excel file while keeping the images in place.

But whenever I consolidate the output, the images are not visible as its not being read into the data frame.

Would it be possible to create a feature which will help in consolidation of excel images within the data frame along with a data frame.

library(openxlsx)
library(dplyr)

Book1 <- read.xlsx("C:/Users/X/X/Desktop/Book1.xlsx", sheet = "Sheet1")

Book2 <- read.xlsx("C:/Users/X/X/Desktop/Book1.xlsx", sheet = "Sheet2")

Consolidation <- rbind(Book1,Book2)
print(Consolidation)

The data frame 1 looks like this:

image

The data frame 2 looks like :

image

The Expected output from the feature is shown below:

image

Would this be something which you guys can create as a new feature for openxlsx library?