flow.record.adapter.xlsx

Module Contents

Classes

Functions

sanitize_fieldvalues

Sanitize field values so openpyxl will accept them.

Attributes

flow.record.adapter.xlsx.__usage__ = Multiline-String
Show Value
"""
Microsoft Excel spreadsheet adapter
---
Write usage: rdump -w xlsx://[PATH]
Read usage: rdump xlsx://[PATH]
[PATH]: path to file. Leave empty or "-" to output to stdout
"""
flow.record.adapter.xlsx.sanitize_fieldvalues(values: collections.abc.Iterator[Any]) collections.abc.Iterator[Any]

Sanitize field values so openpyxl will accept them.

class flow.record.adapter.xlsx.XlsxWriter(path: str | pathlib.Path | BinaryIO, **kwargs)

Bases: flow.record.adapter.AbstractWriter

fp = None
wb = None
ws
descs = []
write(r: flow.record.base.Record) None

Write a record.

flush() None

Flush any buffered writes.

close() None

Close the Writer, no more writes will be possible.

class flow.record.adapter.xlsx.XlsxReader(path: str | pathlib.Path | BinaryIO, selector: str | None = None, **kwargs)

Bases: flow.record.adapter.AbstractReader

fp = None
selector = None
desc = None
wb
ws
close() None

Close the Reader, can be overriden to properly free resources.

__iter__() collections.abc.Iterator[flow.record.base.Record]

Return a record iterator.