Home » excel » Opening an excel template for editing in VB.NET via Process.Start()

Opening an excel template for editing in VB.NET via Process.Start()

Posted by: admin May 14, 2020 Leave a comment

Questions:

I need to open a .xlt for editing, like so:

System.Diagnostics.Process.Start("Template.xlt", "Editable=True")

But I don’t know the correct switch in Excel. This is the same as right-clicking on an .xlt and choosing “Open”, whereas the default action is “New”.

Thanks.

How to&Answers:
Process.Start("Excel.exe", @"C:\Users\Master\Desktop\Book1.xltx");

(Looks like in VB you just omit the @ and ;.)