Open a .CSV file with OpenOffice` scalc.exe

MSFanboy
MSFanboy used Ask the Experts™
on
Hello,

I want to call the scalc.exe and pass the path+filename to it. That does not work.

ProcessStartInfo proc = new ProcessStartInfo();
proc.Filename = "scalc.exe 'myPathToCSVFile'; OR "soffice -calc 'myPathToCSVFile
Process.Start(proc);

does not work... :/

Can someone tell me please what is the proper commandline parameter to open a .csv File with scalc.exe ? The OO help is not very good...
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Hi! Do it something like this
            using (System.Diagnostics.Process process = new System.Diagnostics.Process())
            {
                string fileName = @"C:\Program Files\OpenOffice.org 3\program\scalc.exe"; //the path where you're scalc.exe located
                string argument =  @"C:\yourCSVFile.csv"; //you may change the path
 
                process.StartInfo.UseShellExecute = false;
                process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
                process.StartInfo.FileName = fileName;
                process.StartInfo.Arguments = argument;
            

Open in new window

Commented:

            using (System.Diagnostics.Process process = new System.Diagnostics.Process())
            {
                string fileName = @"C:\Program Files\OpenOffice.org 3\program\scalc.exe";
                string argument =  @"C:\testCSV.csv";
 
                process.StartInfo.UseShellExecute = false;
                process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
                process.StartInfo.FileName = fileName;
                process.StartInfo.Arguments = argument;
                process.Start();
            }

Open in new window

Commented:
sori for double posting.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial