lWriteinDb.T. enables the feature.
AdvPL GuideoExcel:SetWriteinDB(lWriteinDb,[nLimit]) -> lEnabledConfigures auxiliary storage for XLSX generation.
SetWriteinDB is an FWMsExcelXlsx method, not a global business-table writer. Requires LIB 20230227+, DBAccess 22.1.1.0+ and a prepared environment. Call it before AddRow. The default 200000 limit concerns auxiliary bulk records/cells, not spreadsheet rows. Lower memory use adds database/performance cost; SQLite inserts individually. Check its Boolean return: .F. can leave processing in memory. (Sources: refs. 1–1.)
oExcel:SetWriteinDB(lWriteinDb,[nLimit]) -> lEnabledlWriteinDb.T. enables the feature.
nLimitAuxiliary-cell bulk limit; default 200000.
Logical: whether the feature was enabled.
#Include "Protheus.ch"
User Function Ed663(oExcel)
// Fragment: oExcel is FWMsExcelXlsx; environment already prepared.
Local lEnabled
// Configure before any AddRow; check fallback.
lEnabled := oExcel:SetWriteinDB(.T.,200000)
If !lEnabled
ConOut("Auxiliary data will remain in memory")
EndIf
Return NilRequests auxiliary database mode and reports failure; this subset neither generates XLSX nor changes master data. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.