CFBStream

Overview

CFBStream is a mutable STREAM_OBJECT node that stores raw binary data within a CFBDocument or CFBStorage. It exposes the metadata fields defined by the CFB specification and allows the data payload to be set freely before the document is serialized via CFBWriter.

Key fields: name: str, data: bytes, clsid: bytes, state_bits: int, creation_time: int, modified_time: int.

from aspose.email_foss.cfb import CFBDocument, CFBStream, CFBWriter

doc = CFBDocument.from_file("archive.cfb")
s = CFBStream()
s.name = "NewData"
s.data = b"\x01\x02\x03"
doc.root.children.append(s)
CFBWriter.write_file(doc, "updated.cfb")

See Also