soffice

Converting xls to semicolon delimited csv with soffice commandline

半城伤御伤魂 提交于 2021-02-07 08:39:47
问题 I'm trying to convert xls files in a directory to csv format using soffice. soffice --headless --convert-to csv * It is giving comma separated version(obviously). Now I want to get semi-colon delimited csv. I thought of replacing commas with semi-colons using vim command. :%s/,/;/g But it's not correct, as it replaces commas which are kept intentionally in original content. It has to delimit while converting from xls to csv. How to get semi-colon delimited csv with soffice command line? 回答1:

Converting xls to semicolon delimited csv with soffice commandline

和自甴很熟 提交于 2021-02-07 08:39:06
问题 I'm trying to convert xls files in a directory to csv format using soffice. soffice --headless --convert-to csv * It is giving comma separated version(obviously). Now I want to get semi-colon delimited csv. I thought of replacing commas with semi-colons using vim command. :%s/,/;/g But it's not correct, as it replaces commas which are kept intentionally in original content. It has to delimit while converting from xls to csv. How to get semi-colon delimited csv with soffice command line? 回答1:

Problem with starting OpenOffice service (soffice) from Java (command working in commandline, but not from Java)

泪湿孤枕 提交于 2019-12-06 11:04:49
问题 I want to exceute a simple command which works from the shell but doesn't work from Java. This is the command I want to execute, which works fine: soffice -headless "-accept=socket,host=localhost,port=8100;urp;" This is the code I am excecuting from Java trying to run this command: String[] commands = new String[] {"soffice","-headless","\"-accept=socket,host=localhost,port=8100;urp;\""}; Process process = Runtime.getRuntime().exec(commands) int code = process.waitFor(); if(code == 0) System

Problem with starting OpenOffice service (soffice) from Java (command working in commandline, but not from Java)

南笙酒味 提交于 2019-12-04 15:46:40
I want to exceute a simple command which works from the shell but doesn't work from Java. This is the command I want to execute, which works fine: soffice -headless "-accept=socket,host=localhost,port=8100;urp;" This is the code I am excecuting from Java trying to run this command: String[] commands = new String[] {"soffice","-headless","\"-accept=socket,host=localhost,port=8100;urp;\""}; Process process = Runtime.getRuntime().exec(commands) int code = process.waitFor(); if(code == 0) System.out.println("Commands executed successfully"); When I run this program I get "Commands executed