0

I have a sheet that looks like this: sample data

What I want to do is fill values in empty cells using data from some other excel file, but without overwriting the other data (and it's formatting). After some search I found that the command "setStyleAction" in XLConnect allows to do it (though I could not check if it works), but I need to use the "xlsx" package instead, due to some other limitation of XLConnect. Is there equivalent function in "xlsx" package? It has been mentioned in some other answers that there is actually one, but nobody mentioned what function, also I myself couldn't figure it out. Can somebody please tell me any such function, or some other way altogether to add data to specific cells without changing data in other cells of same sheet?

  • I've used two different excel packages in the past to do things like this. It seems like there isn't one package that does it all, and some do better on certain files than others. My point is... why not just use both packages? – cory Mar 14 '16 at 15:22
  • @Cory, I tried that. But for one thing, if I load workbook with xlconnect (because with this I can use 'setStyleAction') and then try 'getsheets' with 'xlsx', I get error like, unable to recognize data class. Also get some errors while trying both packages together which are not there while using one alone. – Ganesh Birajdar Mar 15 '16 at 04:08
  • Hi, actually answer on this thread worked for me [http://stackoverflow.com/questions/11228942/write-from-r-into-template-in-excel-while-preserving-formatting] . I realized that key is to specify the 'startrow' and 'startcol' in the 'writeworkbook' function given in this answer. How can I close this question? – Ganesh Birajdar Mar 15 '16 at 05:58

0 Answers0