Skip to content

RODBC - XLSX files - dropping/clearing sheets

2 messages · Daniel Bradley, Gabor Grothendieck

#
Try using RDCOMClient or rcom:

	library(RDCOMClient)
	xl <- COMCreate("Excel.Application")

	# next line optional
	xl[["Visible"]] <- TRUE
	
	wb <- xl[["Workbooks"]]$Open("/mydir/sample.xlsx")
	sheet <- wb$Sheets("Sheet2")
	xl[["DisplayAlerts"]] <- FALSE
	sheet$Delete()
	xl[["DisplayAlerts"]] <- TRUE
	xl$Save()
	xl$Quit()
On Sun, Apr 26, 2009 at 8:06 PM, Daniel Bradley <dannyboy477 at gmail.com> wrote: