Format previous commit
This commit is contained in:
parent
f2246b832d
commit
f8887eb7ac
33
format.py
33
format.py
|
@ -238,21 +238,24 @@ if args.address_file.suffix == ".csv":
|
||||||
csv_filename = args.address_file
|
csv_filename = args.address_file
|
||||||
elif args.address_file.suffix == ".ods":
|
elif args.address_file.suffix == ".ods":
|
||||||
# https://help.libreoffice.org/latest/en-US/text/shared/guide/csv_params.html
|
# https://help.libreoffice.org/latest/en-US/text/shared/guide/csv_params.html
|
||||||
export_options = "csv:Text - txt - csv (StarCalc):" + ",".join( # Magic CSV export string
|
export_options = (
|
||||||
[
|
"csv:Text - txt - csv (StarCalc):"
|
||||||
str(ord(",")), # Field Separator
|
+ ",".join( # Magic CSV export string
|
||||||
str(ord('"')), # Text Delimiter
|
[
|
||||||
"76", # Character Set - UTF-8 => 76
|
str(ord(",")), # Field Separator
|
||||||
"", # starting line; ignored in export
|
str(ord('"')), # Text Delimiter
|
||||||
"", # cell format codes; ignored in export
|
"76", # Character Set - UTF-8 => 76
|
||||||
"1033", # Language Identifier - en-US => 1033
|
"", # starting line; ignored in export
|
||||||
"", # Quoted field as text; default False
|
"", # cell format codes; ignored in export
|
||||||
"", # Detect special numbers; default True
|
"1033", # Language Identifier - en-US => 1033
|
||||||
"", # Save cell contents as shown; default True
|
"", # Quoted field as text; default False
|
||||||
"", # Export cell formulas; default false
|
"", # Detect special numbers; default True
|
||||||
"", # Remove spaces; ignored in export
|
"", # Save cell contents as shown; default True
|
||||||
"-1", # Export sheets - all sheets => -1
|
"", # Export cell formulas; default false
|
||||||
]
|
"", # Remove spaces; ignored in export
|
||||||
|
"-1", # Export sheets - all sheets => -1
|
||||||
|
]
|
||||||
|
)
|
||||||
)
|
)
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in a new issue