Re: [ADVANCED-DOTNET] Get OS to open a file using the default file association

2008-06-21 Thread Stuart Dunkeld
Process.Start(filename); Regards Stuart On Thu, Jun 12, 2008 at 4:47 PM, Holly Styles <[EMAIL PROTECTED]> wrote: > Hi There, > > I'm wondering if anyone has an opinion on the best way to appraoch this. > I am using SpreadsheetGear to create an xls file from a windows forms > application. > I hav

Re: [ADVANCED-DOTNET] Get OS to open a file using the default file association

2008-06-21 Thread Steve Johnson
Process.Start("filename"); -- Steve Johnson On Thu, Jun 12, 2008 at 11:47 AM, Holly Styles <[EMAIL PROTECTED]> wrote: > Hi There, > > I'm wondering if anyone has an opinion on the best way to appraoch this. > I am using SpreadsheetGear to create an xls file from a windows forms > application. >

Re: [ADVANCED-DOTNET] Get OS to open a file using the default file association

2008-06-21 Thread Peter Ritchie
Hi Holly, this will do what you've described: Process process = new Process(); process.StartInfo.FileName = @"C:\spreadsheet.xls"; process.StartInfo.UseShellExecute = true; process.Start(); On Thu, 12 Jun 2008 16:47:51 +0100, Holly Styles <[EMAIL PROTECTED]> wrote: >Hi There, > >I'm wondering if

Re: [ADVANCED-DOTNET] Get OS to open a file using the default file association

2008-06-21 Thread Sébastien Lorion
Check System.Diagnostics.Process.Start(string filename) Sébastien On 6/12/08, Holly Styles <[EMAIL PROTECTED]> wrote: > Hi There, > > I'm wondering if anyone has an opinion on the best way to appraoch this. > I am using SpreadsheetGear to create an xls file from a windows forms > application.

Re: [ADVANCED-DOTNET] Get OS to open a file using the default file association

2008-06-21 Thread Curt Hagenlocher
You can just use System.Diagnostics.Process to do this directly. Here's an example done in IronPython that should trivially convert to any other language: import System from System.Diagnostics import Process process = Process() process.StartInfo.FileName = 'f:\\book1.xlsx' process.StartInfo.UseSh

[ADVANCED-DOTNET] Get OS to open a file using the default file association

2008-06-21 Thread Holly Styles
Hi There, I'm wondering if anyone has an opinion on the best way to appraoch this. I am using SpreadsheetGear to create an xls file from a windows forms application. I have looked at office interop for opening this file in Excel once it has been written to disk. But I'm not comfortable with that.