https://bugs.documentfoundation.org/show_bug.cgi?id=154266

--- Comment #8 from Pierre Fortin <[email protected]> ---
Here is one of a few Python scripts I found and used as the core code to
include in my scripts to extract files via Calc a year ago; but never connected
the issue to that. I don't recall when this issue first occurred before I
reported it...  As seen at the bottom, it's code I got from
stackoverflow.com... IIRC, --headless was defaulted...   HTH

#!/bin/env python
# -*- mode: python; -*-

from os import system
import audit.util

class spreadsheet_extract:
    # Extract sheet(s) from a spreadsheet
    # This invokes LibreOffice 
    def __call__(self, fname, csvdir = None ):
        if csvdir:
            outdir = f'--outdir {csvdir}'
            MSE = f'libreoffice --convert-to \
csv:"Text - txt - csv (StarCalc)":\
44,34,UTF8,1,,0,false,true,false,false,false,-1 \
{outdir} {fname}'
            system( MSE )

audit.util.set_module(spreadsheet_extract, __name__)

# From: https://stackoverflow.com/questions/1060796/callable-modules
# This is how to get around: TypeError: 'module' object is not callable

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to