xlsxio icon indicating copy to clipboard operation
xlsxio copied to clipboard

Add GObject Introspection support

Open taozuhong opened this issue 3 years ago • 2 comments

Add GObject Introspection support to generate .gir file to support multi-program language

https://gi.readthedocs.io/en/latest/index.html

taozuhong avatar Mar 11 '21 12:03 taozuhong

I would need some help with that. Can you write a test scenario for this (e.g. in Python something that writes to a file and the reads it again)?

brechtsanders avatar Mar 11 '21 13:03 brechtsanders

Here are two python examples for testing:

import xlsxio
xlsxio_reader = xlsxio.XlsxioReader('file.xlsx')
sheet = xlsxio_reader.get_sheet()
data = sheet.read_data()
sheet.close()
xlsxio_reader.close()

print(data)
import xlsxio
import datetime

types = [str, str, float, int, bool, datetime.datetime]
with xlsxio.XlsxioReader('file.xlsx') as reader:
    with reader.get_sheet('hello', types=types) as sheet:
        header = sheet.read_header()
        only_active = []
        for row in sheet.iter_rows():
            if row[4]:
                only_active.append(row)
print(only_active)

Example project with GObject introspection support: https://github.com/libical/libical/blob/master/CMakeLists.txt

taozuhong avatar Jul 06 '21 09:07 taozuhong