API Reference
Cmdlet
Add-OfficeExcelDataSet
Writes every table in a DataSet to separate Excel worksheets.
Remarks
Uses OfficeIMO.Excel DataSet ingestion so callers can provide data from any .NET provider without PSWriteOffice owning database connections.
Examples
Insert each DataSet table as a worksheet.
PS>
New-OfficeExcel -Path .\report.xlsx { Add-OfficeExcelDataSet -DataSet $dataSet -AutoFit }
Creates one worksheet per DataTable and formats each range as an Excel table.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Add-OfficeExcelDataSet [-AutoFit] -DataSet <DataSet> [-NoAutoFilter] [-NoHeader] [-NoRowStripes] [-NoTable] [-PassThru] [-ShowColumnStripes] [-ShowFirstColumn] [-ShowLastColumn] [-TableStyle <String>] [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- AutoFit SwitchParameter
- Auto-fit imported table columns.
- DataSet DataSet
- Source DataSet whose tables will become worksheets.
- NoAutoFilter SwitchParameter
- Disable AutoFilter dropdowns.
- NoHeader SwitchParameter
- Skip writing headers.
- NoRowStripes SwitchParameter
- Disable alternating row stripes for created tables.
- NoTable SwitchParameter
- Write plain ranges instead of Excel tables.
- PassThru SwitchParameter
- Return import metadata for each worksheet.
- ShowColumnStripes SwitchParameter
- Enable alternating column stripes for created tables.
- ShowFirstColumn SwitchParameter
- Emphasize the first table column when the selected style supports it.
- ShowLastColumn SwitchParameter
- Emphasize the last table column when the selected style supports it.
- TableStyle String
- Built-in table style to apply.
Outputs
OfficeIMO.Excel.ExcelDataSetImportResult