Link to home
Start Free TrialLog in
Avatar of MSFanboy
MSFanboyFlag for Germany

asked on

Open a .CSV file with OpenOffice` scalc.exe

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...
Avatar of drypz
drypz
Flag of Philippines image

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

ASKER CERTIFIED SOLUTION
Avatar of drypz
drypz
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sori for double posting.