
NOTICE: All information contained herein is, and remains
the property of TechnoCore Automate.
The intellectual and technical concepts contained
herein are proprietary to TechnoCore Automate and
dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from TechnoCore Automate.
Excel .xlsx exporter using openpyxl. Replaces the legacy
ObjDataExportXls (xlwt / .xls format).
The old .xls format (xlwt) has hard limits:
openpyxl produces .xlsx files with:
from ObjDataExportXlsx import ObjExportApi
exporter = ObjExportApi()
exporter.set_redact_columns(["Idnumber", "ID_NO"])
exporter.OpenFile("output.xlsx")
exporter.WriteHeader(["Name", "Idnumber", "Score"])
exporter.WriteData([
["Alice", "8501015009087", 580],
["Bob", "9012125009082", 610],
])
exporter.CloseFile()
Redacted output preserves the first 2 characters and replaces
remaining digits with x (e.g. 85xxxxxxxxx87).
Inherits from ObjDataExportBase.ObjExportBase.
| Method | Description |
|---|---|
OpenFile(filename) |
Create workbook and active sheet |
WriteHeader(fields) |
Write styled header row, init redaction |
WriteData(data) |
Write data rows with redaction applied |
CloseFile() |
Save workbook to disk |
set_redact_columns(cols) |
Set column names to redact (inherited) |
DefaultExtension() |
Returns "xlsx" |
openpyxl (in resource.config/requirements.txt)