Excel.WriteToFile is not working


Excel.WriteToFile is not working. I get the error “…That name is already taken…” :confused:

I’ve tried to change location and name of the file but nothing is working.

I’m using Excel 2016 and Dynamo, Revit 2016, Windows10 64bit

Hi, the Sheet1 could be your issue as its default in excel - try changing the code block “sheet1” to “sheet2” or “test”. Other than that its probably your data.


Hi Salvo,
Try to change name of the path with .xlsx extension after the file name (D:\OneDrive\Test1.xlsx).

Thanks @RevitOnMAC @Kulkul. It was the sheet name:grin: