以无头模式在 LibreOffice 中将 csv 转换为 dbase

convert csv to dbase in LibreOffice in headless mode

我可以在 LibreOffice 中以常规模式将带有日期的 csv 文件转换为 dbase。 H_beg 日期和 H_end_date 工作完美。

dbview thexport.dbf
H event id : 210721001
H name     : CCCR WEEK NIGHT 072121
H tot sect : 1
H beg date : 20210721
H end date : 20210721
H rcv date : 
H ent date : 
H aff id   : A6000220
H city     : ROCHESTER
H state    : NY
H zipcode  : 14621
H country  : USA
H sendcros : N
H scholast : N
H secrec01 : 0

但如果尝试在无头(批处理)模式下自动执行操作,日期字段为空白!

bash 脚本: libreoffice --headless --invisible --convert-to dbf thexport.csv

dbview thexport.dbf
H event id : 210721001
H name     : CCCR WEEK NIGHT 072121
H tot sect : 1
H beg date : 
H end date : 
H rcv date : 
H ent date : 
H aff id   : A6000220
H city     : ROCHESTER
H state    : NY
H zipcode  : 14621
H country  : USA
H sendcros : N
H scholast : N
H secrec01 : 0

有什么办法可以解决这个问题?

sudo apt install unoconv

#!/bin/bash 
cd /wherever/your_files_are/
unoconv thexport.csv thexport.dbf
unoconv tsexport.csv tsexport.dbf
unoconv tdexport.csv tdexport.dbf