A script to automate new columns in Master Excel sheet from another Excel sheet?

Hello,

I've been actively looking for a solution for the question above. I want to know if there is a script or package that allows me to automate a new column in my excel sheet every week.

Ex. I have a master Excel sheet that has columns labeled as weeks from 1-14 with data within all of them. I get a new sheet every week from a 3rd party, so i would get an excel sheet for week 15, and I would have to create a new column in my master sheet every time & copy and paste. It's tedious work because I have to copy and paste to a variety of different excel sheets. Anyway anyone can help? I am greatly appreciative!

Will there is a package called openxlsx which can read excel files and write them as well. But it applies to only xlsx or xls files not to xlsb files. You can read about that package and it will help you load your content from one excel as a data.frame and paste a data frame onto a particular cell in excel. I have used it for same purpose quite a lot and it works.

If you want to get data out of an xlsb file then try rodbc to get such data.

And if you want to schedule such task you try a package called task scheduler which calls Windows scheduler to run your scripts on particular time or day or date etc....

Hey @Anantadinath this is exactly what I want to do! I want to load a column from one excel as a data.frame and paste a data frame onto a particular cell in my other excel. Do you have an example I can base off of? I've been reading through and the only examples I've seen is adding data to new sheets in the workbook.

I don't remember much of the package function. But if this is how it works you can recreate a new excel file everyday with desired format. and delete the old one everyday.

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