# StreamType Enumeration

> StreamType enumeration in the TX Sheet Control .NET API: Document file formats shared with JavaScript. SpreadsheetML is .xlsx; native files use .txwb.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Enumeration
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > StreamType Enumeration
- **1164 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/streamtype/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/streamtype/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/streamtype/llms-full.txt

---

Document file formats shared with JavaScript. SpreadsheetML is .xlsx; native files use .txwb.

### Syntax

```csharp
public enum StreamType
```

Interfaces: `IComparable`, `ISpanFormattable`, `IFormattable`, `IConvertible`.

### Members

| Member | Value | Description |
|---|---|---|
| `CSV` | `3` |  |
| `InternalWorkbookFormat` | `1` |  |
| `JSON` | `5` |  |
| `PDF` | `2` |  |
| `SpreadsheetML` | `0` |  |
| `XML` | `4` |  |
| `OpenDocumentSpreadsheet` | `6` | OpenDocument Spreadsheet (.ods), read and write. |

### Examples

Create one invoice and export both its editable XLSX workbook and its PDF rendition.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<(byte[] Xlsx, byte[] Pdf)> ExportInvoiceFormatsAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    await sheet.Range("A7:D9").SetValuesAsync(new object?[][]
    {
        ["Description", "Quantity", "UnitPrice", "Amount"],
        ["Consulting", 3, 120, 360],
        ["Training", 2, 90, 180]
    });

    var table = await sheet.Tables.AddAsync("InvoiceLines", "A7:D9", new TableOptions { Style = "TableStyleMedium2", ShowRowStripes = true });
    await sheet.Cell("A1").SetTextAsync("October invoice");
    await sheet.Cell("A1").FormatAsync(new { fontFamily = "Liberation Sans", fontSize = 16, bold = true, textColor = "#ffffff", fillColor = "#163b63" });
    await sheet.Range("C8:D9").FormatAsync(new { numberFormatCode = "#,##0.00", fontFamily = "Liberation Sans", fontSize = 11 });

    var xlsx = await control.SaveAsync(StreamType.SpreadsheetML);
    var pdf = await control.SaveAsync(StreamType.PDF);
    return (xlsx, pdf);
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/llms-full.txt)
- [Loading and Saving Workbooks](https://docs.textcontrol.com/tx-sheet-control/document-processing/load-save/llms-full.txt)

### OpenDocument Spreadsheet

Select this value for binary `.ods` input and output.

```csharp
var ods = await control.SaveAsync(StreamType.OpenDocumentSpreadsheet);
```

---

## Nearby

- **Previous:** [SpreadsheetMLLoadOptions.MinRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/spreadsheetmlloadoptions/minrows-property/llms-full.txt)
- **Next:** [Table Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/table/llms-full.txt)
