Usina BRAdvPL Guide
Sign in
← All topics
CLASSUnder review

FWMsExcel

FWMsExcel():New()

Prepares tabular export data.

FWMsExcelAdvPL
01 · OVERVIEW

Overview

FWMsExcel generates Excel-compatible XML rather than native XLSX. It is deprecated with no maintenance or innovation. Construction holds values in memory and can be unsuitable for large spreadsheets. This example prepares one sheet, one column and one fictional row without activation or writing. New development should assess FWMsExcelXlsx and its prerequisites rather than merely changing extensions. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

FWMsExcel():New()

Methods

AddWorkSheet / AddTableCreates sheet and table; one table per sheet.o:AddWorkSheet(cSheet) / o:AddTable(cSheet,cTable)
AddColumn / AddRowDefines columns and appends values in matching order.o:AddColumn(cSheet,cTable,cColumn,nAlign,nFormat,lTotal) / o:AddRow(cSheet,cTable,aRow)
Activate / GetXMLFile / DeActivateGeneration lifecycle; not executed in this example.o:Activate() / o:GetXMLFile(cFile) / o:DeActivate()
03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed438()
    Local oSheet := FWMsExcel():New()
    // Prepare data only; no Activate or GetXMLFile.
    oSheet:AddWorkSheet("Review")
    oSheet:AddTable("Review","Example")
    oSheet:AddColumn("Review","Example","Quantity",3,2,.F.)
    oSheet:AddRow("Review","Example",{2})
    FreeObj(oSheet)
Return Nil
Expected result

Fictional data prepared in memory and object freed; no file generated. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check LIB version, lifecycle and context before integration. These methods are a documented subset rather than the complete API.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. FWMsExcel. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha