Conversion of Excel VBScript to Calc Script Language

Good morning,
I ASK :stuck_out_tongue: your help for a script did in VBScript for Excel. The script convert by itself a DBF file to CSV file but the problem is… Excel is not able to handle the whole DBF and it trunks the file. LibreOffice works fine but… somebody can sort it out with the conversion in LibreOffice Scripting Language?

The script is that one:

Const xlCSV = 6
'Open Excel and load dbf within it
Set objExcel = CreateObject("Excel.Application")

objExcel.DisplayAlerts = FALSE

objExcel.Visible = FALSE

Set objWorkbook = objExcel.Workbooks.Open("C:\temp\test.dbf")

'Just save it without any modification, chosing CSV as format

objWorkbook.SaveAs "C:\temp\test.csv", xlCSV

objWorkbook.Close

'Close Excel and quit

objExcel.Quit

WScript.Quit

Thanks for your support and have a nice day,

  • I’ve edited this post for you but in future please start any line of code with 4 spaces to mark it as code !!

Thank you

Any news??

Dear karolus,
thanks, it looks better now.

Regards.