So, how can I tell the system to open the file for me? I've tried
Shell(ExcelFilePath)
But an exception was thrown although the file path is from OpenFileDialog.FileOk
So, I am trying to play with Excel.Application, is it possible to open the file with that?
This will open the file with Excel:
Process.Start("EXCEL.EXE", """C:\Folder\file.xls""")
Being the second string the arguments for the process. See the MSDN Dcoumentation.
try this
System.Diagnostics.Process.Start("FilePath")
it will open the file in an application associated with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With