Top Method Summary
Options Name Purpose
DocumentFormat.OpenXml.Packaging.WorkbookPart AddWorkbookPart (SpreadsheetDocument) Adds the WorkbookPart with an empty Workbook to a spreadsheet document
DocumentFormat.OpenXml.Spreadsheet.Stylesheet AddWorkbookStylesPart (WorkbookPart) Adds a WorkbookStylesPart with a minimal schema-valid stylesheet to a WorkbookPart
DocumentFormat.OpenXml.Packaging.WorksheetPart AddWorksheetPart (WorkbookPart) Adds a WorksheetPart to a WorkbookPart
AppendCells (Row, Object[], integer, integer, Cell) Appends the values from the given index on as new cells to a row
DocumentFormat.OpenXml.Spreadsheet.Columns AutoSizeColumns (WorkbookPart, SheetData) Sizes every column of a worksheet to its widest cell
DocumentFormat.OpenXml.Spreadsheet.Columns AutoSizeColumns (WorkbookPart, SheetData, decimal, decimal) Sizes every column of a worksheet to its widest cell
CloseSpreadsheetDocument (SpreadsheetDocument) Closes the SpreadsheetDocument by calling the Dispose method.
DocumentFormat.OpenXml.Spreadsheet.Sheet CreateSheet (WorkbookPart, WorksheetPart, character) Registers a WorksheetPart as a named sheet in the Workbook
DocumentFormat.OpenXml.Packaging.SpreadsheetDocument CreateSpreadsheetDocument (character, character) Creates a new, fully wired spreadsheet document with a single worksheet
DocumentFormat.OpenXml.Packaging.SpreadsheetDocument CreateSpreadsheetDocument (character, character, logical) Creates a new, fully wired spreadsheet document with a single worksheet
DocumentFormat.OpenXml.Packaging.SpreadsheetDocument CreateSpreadsheetDocument (character, logical) Creates a new, empty spreadsheet document file
DocumentFormat.OpenXml.Spreadsheet.SheetData CreateWorksheet (WorksheetPart) Creates the Worksheet with an empty SheetData in a WorksheetPart
GenerateRowData (WorkbookPart, SheetData, integer, Object[], Object[], logical, integer) Generates a new Row with Cell Values based on the provided values Object[]
CHARACTER GetCellValue (WorkbookPart, Cell) Gets and returns the Value of a Cell
INTEGER GetColumnIndex (character) Returns the 1-based column number of a cell reference
CHARACTER GetColumnName (integer) Returns the Excel column name for a 1-based column number
DocumentFormat.OpenXml.Spreadsheet.Row GetHeaderRow (SheetData, integer) Gets the row with the given row index from the Excel Worksheet
DocumentFormat.OpenXml.Spreadsheet.Cell GetRowCell (Row, character) Gets the Cell Object from a Row
CHARACTER GetRowPart (character) Returns the row part of a cell reference
DocumentFormat.OpenXml.Spreadsheet.Sheet GetSheet (WorkbookPart, character) Gets and returns the Sheet of the specified WorkbookPart
DocumentFormat.OpenXml.Spreadsheet.Sheet GetSheet (WorkbookPart, integer) Gets and returns the Sheet of the specified WorkbookPart
DocumentFormat.OpenXml.Packaging.WorkbookPart GetWorkbookPart (SpreadsheetDocument) Gets and returns the WorkbookPart of the specified SpreadsheetDocument
DocumentFormat.OpenXml.Packaging.WorksheetPart GetWorksheetPart (WorkbookPart) Gets and returns the WorksheetPart of the specified WorkbookPart
DocumentFormat.OpenXml.Spreadsheet.SheetData GetWorksheetSheetData (WorkbookPart) Gets and returns the WorksheetSheetData of the specified WorkbookPart
DocumentFormat.OpenXml.Spreadsheet.SheetData GetWorksheetSheetData (WorkbookPart, integer, character) Gets and returns the WorksheetSheetData of the specified WorkbookPart
InsertCellValue (WorksheetPart, character, integer, character, integer) Inserts a Cell Value into the indexed Row and Column of an Excel Worksheet
InsertHeaderRow (WorkbookPart, SheetData, integer, Object[], integer) Inserts a header row into the Excel Worksheet
DocumentFormat.OpenXml.Packaging.SpreadsheetDocument OpenSpreadsheetDocument (character, logical) Opens the SpreadsheetDocument
PostProcessDateStyles (character) Post-processes an xlsx file to fix OpenXML SDK re-serialization issues
ProcessStyleSheet (SpreadsheetDocument, ExportWorksheetArguments) Processes the Stylesheet for the Excel Stylesheet
ReadCellFormatCount (character) Reads the cellXfs count from an xlsx file using raw Package API
SaveSpreadsheetDocument (SpreadsheetDocument) Saves and closes the SpreadsheetDocument
SaveWorkbook (WorkbookPart) Saves the Workbook element of the specified WorkbookPart
SetExcelCellValues (WorksheetPart, integer, Object[], integer) Sets the Excel Cell Values based on the provided values Object[]
SetStylesheetProperties (ExportWorksheetArguments) Sets the StylesheetProperties
ThrowException (character) Throws an exception with the specified error text
UpdateRowData (Row, Object[], integer) Updates a Row Cell Values based on the provided values Object[]
ValidateSheetName (character) Validates a worksheet name against the rules of Excel
DocumentFormat.OpenXml.OpenXmlElement[] WrapElement (OpenXmlElement) Wraps a single OpenXmlElement into an OpenXmlElement array


Method Detail
Top

DocumentFormat.OpenXml.Packaging.WorkbookPart AddWorkbookPart (SpreadsheetDocument)

Purpose: Adds the WorkbookPart with an empty Workbook to a spreadsheet document
Notes: Second step of the fine-grained creation API

Parameters:
poDocument DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
The SpreadsheetDocument to add the WorkbookPart to
Returns DocumentFormat.OpenXml.Packaging.WorkbookPart
The new WorkbookPart
Top

DocumentFormat.OpenXml.Spreadsheet.Stylesheet AddWorkbookStylesPart (WorkbookPart)

Purpose: Adds a WorkbookStylesPart with a minimal schema-valid stylesheet to a WorkbookPart
Notes: Third step of the fine-grained creation API. The stylesheet
holds one default font, fill, border, cellStyleXf and cellXf in
the element order the schema prescribes - the shape of an empty
Excel-authored workbook, and the baseline ProcessStyleSheet
extends (CloneCellFormats adds the date and datetime cell
formats, UpdateStyleSheet replaces the elements with the styled
variants when ExportWorksheetArguments:UseStylesheet is set).
A cell with the style index 0 references these entries; without
them the OpenXML validator rejects the workbook

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
The WorkbookPart to add the WorkbookStylesPart to
Returns DocumentFormat.OpenXml.Spreadsheet.Stylesheet
The new Stylesheet
Top

DocumentFormat.OpenXml.Packaging.WorksheetPart AddWorksheetPart (WorkbookPart)

Purpose: Adds a WorksheetPart to a WorkbookPart
Notes: Fourth step of the fine-grained creation API. The part has no
Worksheet yet (see CreateWorksheet) and is not registered in the
Workbook's Sheets yet (see CreateSheet). Delegates to the .NET
ExcelHelper, as the generic AddNewPart method of the OpenXML SDK
cannot be invoked from the ABL

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
The WorkbookPart to add the WorksheetPart to
Returns DocumentFormat.OpenXml.Packaging.WorksheetPart
The new WorksheetPart
Top

AppendCells (Row, Object[], integer, integer, Cell)

Purpose: Appends the values from the given index on as new cells to a row
Notes: The new cells continue the cell references of the last existing
cell (when it carries one) and, unless a style index is passed,
its style. Without a last cell - an empty row - the cells are
appended without a reference, like the cells GenerateRowData
writes. Cells are appended at the end of the row, so the
ascending column order of the row is kept

Parameters:
poRow DocumentFormat.OpenXml.Spreadsheet.Row
The Row to append the cells to
poValues System.Object[]
Object[] The values; the entries from piFromIndex on are appended
piFromIndex INTEGER
The 0-based index of the first value to append
piStyleIndex INTEGER
The style index to apply, 0 or ? to continue the style of the last cell
poLastCell DocumentFormat.OpenXml.Spreadsheet.Cell
The last existing Cell of the row, ? when the row has no cells
Top

DocumentFormat.OpenXml.Spreadsheet.Columns AutoSizeColumns (WorkbookPart, SheetData)

Purpose: Sizes every column of a worksheet to its widest cell
Notes: Uses the maximum digit width of Calibri 11 (7 pixels) and the
ECMA-376 pixel padding of 5 pixels. See the overload with the
explicit values for details

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
The WorkbookPart that owns the worksheet (shared strings, stylesheet)
poSheetData DocumentFormat.OpenXml.Spreadsheet.SheetData
The SheetData whose cells are measured (the child of the Worksheet)
Returns DocumentFormat.OpenXml.Spreadsheet.Columns
The Columns element that was attached to the Worksheet
Top

DocumentFormat.OpenXml.Spreadsheet.Columns AutoSizeColumns (WorkbookPart, SheetData, decimal, decimal)

Purpose: Sizes every column of a worksheet to its widest cell
Notes: Computes the column widths from the character count of the widest
cell per column using the ECMA-376 column width formula and attaches
the resulting Columns element to the Worksheet of the SheetData -
directly before the SheetData, as required by the worksheet schema.
An existing Columns element (e.g. of a template workbook) is replaced.
Call the method after the rows have been generated and before the
workbook is saved, once per worksheet. Delegates to the .NET
ExcelHelper, as the OpenXML SDK's generic InsertBefore method cannot
be called from the ABL

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
The WorkbookPart that owns the worksheet (shared strings, stylesheet)
poSheetData DocumentFormat.OpenXml.Spreadsheet.SheetData
The SheetData whose cells are measured (the child of the Worksheet)
pdeMaximumDigitWidth DECIMAL
The maximum digit width (in pixels) of the workbook's default font, e.g. 7 for Calibri 11
pdePixelPadding DECIMAL
The pixel padding added to every column, 5 per ECMA-376; a larger value compensates for wide glyphs
Returns DocumentFormat.OpenXml.Spreadsheet.Columns
The Columns element that was attached to the Worksheet
Top

CloseSpreadsheetDocument (SpreadsheetDocument)

/*
Purpose: Closes the SpreadsheetDocument by calling the Dispose method.
Notes: The Dispose is important to release the memory and close the file.
(otherwise the file will be locked and cannot be opened)

Parameters:
poSpreadsheetDocument DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
Top

DocumentFormat.OpenXml.Spreadsheet.Sheet CreateSheet (WorkbookPart, WorksheetPart, character)

Purpose: Registers a WorksheetPart as a named sheet in the Workbook
Notes: Sixth step of the fine-grained creation API. The sheet is
appended to the Workbook's Sheets with the next free sheetId, so
the method may be called once per worksheet to build a multi
sheet workbook. Delegates to the .NET ExcelHelper

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
The WorkbookPart that owns the WorksheetPart
poWorksheetPart DocumentFormat.OpenXml.Packaging.WorksheetPart
The WorksheetPart to register
pcSheetName CHARACTER
The name of the sheet
Returns DocumentFormat.OpenXml.Spreadsheet.Sheet
The new Sheet element
Top

DocumentFormat.OpenXml.Packaging.SpreadsheetDocument CreateSpreadsheetDocument (character, character)

Purpose: Creates a new, fully wired spreadsheet document with a single worksheet
Notes: Creates the file, the WorkbookPart with its Workbook, a minimal
schema-valid stylesheet, a WorksheetPart with a Worksheet and an
empty SheetData, and registers the worksheet in the Workbook's
Sheets. The returned document has the shape of an empty
Excel-authored template and is ready for GetWorkbookPart,
GetWorksheetSheetData, ProcessStyleSheet, GenerateRowData,
SaveWorkbook and SaveSpreadsheetDocument.
Throws when the file already exists

Parameters:
pcFileName CHARACTER
The name of the .xlsx file to create
pcSheetName CHARACTER
The name of the worksheet
Returns DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
The created SpreadsheetDocument
Top

DocumentFormat.OpenXml.Packaging.SpreadsheetDocument CreateSpreadsheetDocument (character, character, logical)

Purpose: Creates a new, fully wired spreadsheet document with a single worksheet
Notes: Creates the file, the WorkbookPart with its Workbook, a minimal
schema-valid stylesheet, a WorksheetPart with a Worksheet and an
empty SheetData, and registers the worksheet in the Workbook's
Sheets. The returned document has the shape of an empty
Excel-authored template and is ready for GetWorkbookPart,
GetWorksheetSheetData, ProcessStyleSheet, GenerateRowData,
SaveWorkbook and SaveSpreadsheetDocument

Parameters:
pcFileName CHARACTER
The name of the .xlsx file to create
pcSheetName CHARACTER
The name of the worksheet
plOverwriteExisting LOGICAL
Logical value indicating whether an existing file is replaced - when false the method throws when the file exists
Returns DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
The created SpreadsheetDocument
Top

DocumentFormat.OpenXml.Packaging.SpreadsheetDocument CreateSpreadsheetDocument (character, logical)

Purpose: Creates a new, empty spreadsheet document file
Notes: First step of the fine-grained creation API. The document has
no WorkbookPart yet - see AddWorkbookPart, AddWorkbookStylesPart,
AddWorksheetPart, CreateWorksheet and CreateSheet, or use the
CreateSpreadsheetDocument (pcFileName, pcSheetName) overload
which performs all of the steps.
A relative file name is resolved against the working directory
and the folder is created when it does not exist

Parameters:
pcFileName CHARACTER
The name of the .xlsx file to create
plOverwriteExisting LOGICAL
Logical value indicating whether an existing file is replaced - when false the method throws when the file exists
Returns DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
The created SpreadsheetDocument
Top

DocumentFormat.OpenXml.Spreadsheet.SheetData CreateWorksheet (WorksheetPart)

Purpose: Creates the Worksheet with an empty SheetData in a WorksheetPart
Notes: Fifth step of the fine-grained creation API. Returns the
SheetData the rows are generated into (see GenerateRowData)

Parameters:
poWorksheetPart DocumentFormat.OpenXml.Packaging.WorksheetPart
The WorksheetPart to create the Worksheet in
Returns DocumentFormat.OpenXml.Spreadsheet.SheetData
The empty SheetData of the new Worksheet
Top

GenerateRowData (WorkbookPart, SheetData, integer, Object[], Object[], logical, integer)

/*
Purpose: Generates a new Row with Cell Values based on the provided values Object[]
Notes: The oCellElement variable is initialized with a fixed size of 40. This is because
the extent cannot be set dynamically

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
poSheetData DocumentFormat.OpenXml.Spreadsheet.SheetData
piRowIndex INTEGER
poValues System.Object[]
poDataTypes System.Object[]
plHeader LOGICAL
piStyleIndex INTEGER
Top

CHARACTER GetCellValue (WorkbookPart, Cell)

/*
Purpose: Gets and returns the Value of a Cell
Notes: The DataType of the Cell is used to determine the type of the value.
DataType values can be found at https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.cellvalues?view=openxml-3.0.1

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
poCell DocumentFormat.OpenXml.Spreadsheet.Cell
Returns CHARACTER
Cell Value
Top

INTEGER GetColumnIndex (character)

Purpose: Returns the 1-based column number of a cell reference
Notes: "A1" returns 1, "Z12" returns 26, "AA3" returns 27. The column
letters are the leading letters of the reference

Parameters:
pcCellReference CHARACTER
The cell reference, e.g. "C12"
Returns INTEGER
The 1-based column number, 0 when the reference has no column letters
Top

CHARACTER GetColumnName (integer)

Purpose: Returns the Excel column name for a 1-based column number
Notes: 1 returns "A", 26 returns "Z", 27 returns "AA"

Parameters:
piColumn INTEGER
The 1-based column number
Returns CHARACTER
The Excel column name
Top

DocumentFormat.OpenXml.Spreadsheet.Row GetHeaderRow (SheetData, integer)

Purpose: Gets the row with the given row index from the Excel Worksheet
Notes: The Row object is fully class defined otherwise the Type is not correctly
defined (Can conflict with WordDocument.Row or Drawing.Row).
A row without an r attribute is skipped: the attribute is optional
and such a row is positional, so it cannot be addressed by index -
and reading its RowIndex raises an InvalidOperationException.

Parameters:
poSheetData DocumentFormat.OpenXml.Spreadsheet.SheetData
piRowIndex INTEGER
Returns DocumentFormat.OpenXml.Spreadsheet.Row
Row Object, or the unknown value when the sheet has no row with that row index
Top

DocumentFormat.OpenXml.Spreadsheet.Cell GetRowCell (Row, character)

/*
Purpose: Gets the Cell Object from a Row
Notes:

Parameters:
poRow DocumentFormat.OpenXml.Spreadsheet.Row
pcCellReference CHARACTER
Returns DocumentFormat.OpenXml.Spreadsheet.Cell
Cell Object
Top

CHARACTER GetRowPart (character)

Purpose: Returns the row part of a cell reference
Notes: "C12" returns "12" - the reference without its leading column letters

Parameters:
pcCellReference CHARACTER
The cell reference, e.g. "C12"
Returns CHARACTER
The row part of the reference, an empty string when it has none
Top

DocumentFormat.OpenXml.Spreadsheet.Sheet GetSheet (WorkbookPart, character)

/*
Purpose: Gets and returns the Sheet of the specified WorkbookPart
Notes:

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
pcSheetName CHARACTER
Returns DocumentFormat.OpenXml.Spreadsheet.Sheet
Sheet Object
Top

DocumentFormat.OpenXml.Spreadsheet.Sheet GetSheet (WorkbookPart, integer)

/*
Purpose: Gets and returns the Sheet of the specified WorkbookPart
Notes:

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
piSheetIndex INTEGER
Returns DocumentFormat.OpenXml.Spreadsheet.Sheet
Sheet Object
Top

DocumentFormat.OpenXml.Packaging.WorkbookPart GetWorkbookPart (SpreadsheetDocument)

/*
Purpose: Gets and returns the WorkbookPart of the specified SpreadsheetDocument
Notes:

Parameters:
oSpreadsheetDocument DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
Returns DocumentFormat.OpenXml.Packaging.WorkbookPart
WorkbookPart Object
Top

DocumentFormat.OpenXml.Packaging.WorksheetPart GetWorksheetPart (WorkbookPart)

/*
Purpose: Gets and returns the WorksheetPart of the specified WorkbookPart
Notes:

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
Returns DocumentFormat.OpenXml.Packaging.WorksheetPart
WorksheetPart Object
Top

DocumentFormat.OpenXml.Spreadsheet.SheetData GetWorksheetSheetData (WorkbookPart)

/*
Purpose: Gets and returns the WorksheetSheetData of the specified WorkbookPart
Notes:

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
Returns DocumentFormat.OpenXml.Spreadsheet.SheetData
SheetData Object
Top

DocumentFormat.OpenXml.Spreadsheet.SheetData GetWorksheetSheetData (WorkbookPart, integer, character)

/*
Purpose: Gets and returns the WorksheetSheetData of the specified WorkbookPart
Notes:

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
piSheetIndex INTEGER
pcSheetName CHARACTER
Returns DocumentFormat.OpenXml.Spreadsheet.SheetData
SheetData Object
Top

InsertCellValue (WorksheetPart, character, integer, character, integer)

Purpose: Inserts a Cell Value into the indexed Row and Column of an Excel Worksheet
Notes:

Parameters:
poWorksheetPart DocumentFormat.OpenXml.Packaging.WorksheetPart
WorksheetPart
pcContent CHARACTER
Character The content to insert
piRowIndex INTEGER
Integer The row to insert into
pcCol CHARACTER
Character The column to insert into
piStyleIndex INTEGER
Integer The style index to apply
Top

InsertHeaderRow (WorkbookPart, SheetData, integer, Object[], integer)

Purpose: Inserts a header row into the Excel Worksheet
Notes: Reuses the template row at the target row index when the sheet has
one - so that its formatting is kept - and generates a new row
otherwise. See UpdateRowData for the handling of a template row
with fewer or more cells than values

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
WorkbookPart
poSheetData DocumentFormat.OpenXml.Spreadsheet.SheetData
SheetData
piRowIndex INTEGER
Integer The row to insert into
poValues System.Object[]
Object[] The values to insert
piStyleIndex INTEGER
Integer The style index to apply
Top

DocumentFormat.OpenXml.Packaging.SpreadsheetDocument OpenSpreadsheetDocument (character, logical)

/*
Purpose: Opens the SpreadsheetDocument
Notes: The second attribute is optional and defaults to false. If set to true the document will be opened in update mode.

Parameters:
pcFileName CHARACTER
plEditable LOGICAL
Returns DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
SpreadsheetDocument Object
Top

PostProcessDateStyles (character)

Purpose: Post-processes an xlsx file to fix OpenXML SDK re-serialization issues
Notes: The OpenXML SDK re-serializes loaded parts with x: namespace prefix and
t="str" for string cells, which causes Excel to report corruption.
This method uses the raw System.IO.Packaging API to:
1. Inject date/datetime CellFormats into styles.xml
2. Strip x: namespace prefix from workbook.xml and worksheet XML
3. Convert t="str" cells to t="inlineStr" with proper structure
Must be called AFTER the OpenXML SDK has saved and closed the file.

Parameters:
pcFileName CHARACTER
The file name of the Excel file
Top

ProcessStyleSheet (SpreadsheetDocument, ExportWorksheetArguments)

Purpose: Processes the Stylesheet for the Excel Stylesheet
Notes:

Parameters:
poSpreadsheetDocument DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
poExportWorksheetArguments Consultingwerk.Utilities.Excel.ExportWorksheetArguments
Top

ReadCellFormatCount (character)

Purpose: Reads the cellXfs count from an xlsx file using raw Package API
Notes: Must be called BEFORE the OpenXML SDK opens the file. Sets
DateStyleIndex and DateTimeStyleIndex based on current count.

Parameters:
pcFileName CHARACTER
The file name of the Excel file
Top

SaveSpreadsheetDocument (SpreadsheetDocument)

/*
Purpose: Saves and closes the SpreadsheetDocument
Notes:

Parameters:
poSpreadsheetDocument DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
Top

SaveWorkbook (WorkbookPart)

/*
Purpose: Saves the Workbook element of the specified WorkbookPart
Notes:

Parameters:
poWorkbookPart DocumentFormat.OpenXml.Packaging.WorkbookPart
Top

SetExcelCellValues (WorksheetPart, integer, Object[], integer)

Purpose: Sets the Excel Cell Values based on the provided values Object[]
Notes:

Parameters:
poWorksheetPart DocumentFormat.OpenXml.Packaging.WorksheetPart
WorksheetPart
piCount INTEGER
Integer The row to insert into
poValues System.Object[]
Object[] The values to insert
piStyleIndex INTEGER
Integer The style index to apply
Top

SetStylesheetProperties (ExportWorksheetArguments)

Purpose: Sets the StylesheetProperties
Notes:

Parameters:
poExportWorksheetArguments Consultingwerk.Utilities.Excel.ExportWorksheetArguments
ExportWorksheetArguments
Top

ThrowException (character)

/*
Purpose: Throws an exception with the specified error text
Notes:

Parameters:
pcErrorText CHARACTER
The error text to throw
Top

UpdateRowData (Row, Object[], integer)

Purpose: Updates a Row Cell Values based on the provided values Object[]
Notes: The values are written into the existing cells of the row in
order. When the row has more cells than there are values (a
template row with surplus formatted cells), the surplus cells
are left untouched. When the row has fewer cells than values,
the missing cells are appended to the row; they continue the
cell references and - unless a style index is passed - the
style of the last existing cell, so a template header row keeps
its formatting for the added columns (SCL-5693)

Parameters:
poRow DocumentFormat.OpenXml.Spreadsheet.Row
poValues System.Object[]
piStyleIndex INTEGER
Top

ValidateSheetName (character)

Purpose: Validates a worksheet name against the rules of Excel
Notes: A sheet name must not be empty, must not be longer than 31
characters and must not contain any of the characters
: ~\ / ? * [ ] - Excel reports a workbook violating these rules
as damaged

Parameters:
pcSheetName CHARACTER
The sheet name to validate
Top

DocumentFormat.OpenXml.OpenXmlElement[] WrapElement (OpenXmlElement)

Purpose: Wraps a single OpenXmlElement into an OpenXmlElement array
Notes: The OpenXML SDK constructors and the Append method that are
callable from the ABL take an OpenXmlElement[] argument

Parameters:
poElement DocumentFormat.OpenXml.OpenXmlElement
The element to wrap
Returns DocumentFormat.OpenXml.OpenXmlElement[]
An OpenXmlElement array holding the element


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       19.09.2026 10:20:10