Hello
I am developing a program that at one point needs to generate and open an excel file from a crystal report. It was fairly straight-forward to generate the excel file, but I am having trouble finding anything about initiating the excel-application from my C#.NET code.
Preferably, I'd like to open excel as a stand-alone application on the side rather than incorporating it into the form, though that too is an option. So is there a way to run dos commands from C# or the .NET framework?
So if anyone knows how to do this or at least point me in the right direction, that'd be great.
Thanks,
Fred
Loading
Fredrik RoaldsetPosted Jan 10, 2006, 6:05 AM
LouisPosted Jan 5, 2006, 6:52 AM
To execute dos commands I suggest that you write out a .bat file from your C# program. Then you can execute the .bat file by creating and Process object.
Example of running the .bat file
private Process prcFTP = new Process(); prcFTP.StartInfo.FileName = "C:\\filename.bat";
prcFTP.Start(); // run the file
Hope this helps for the dos commands!
Regards
Louis