# Import

With `RadSpreadStreamProcessing` you can read spreadsheet documents from the following file formats:

* XLSX

* CSV

This functionality is available starting with R3 2022.

## Specifics

The library dynamically reads the document content. To achieve this, the `IWorksheetImporter` and `IWorkbookImporter` classes responsible for importing the elements of the document implement `IDisposable` and keep the corresponding content and settings in memory until disposed.

## Read File Data

To read the data from a file, parse the desired elements in sequence keeping the following order:

1. Read the Workbook

2. Read a Worksheet

3. Read Columns (optional)

4. Read Rows

5. Read Cells

**Example 1: Open an XLSX file and iterate through every worksheet, row, and cell importer**

```C#
using (System.IO.FileStream fs = new System.IO.FileStream(fileName, FileMode.Open))
			{
				using (IWorkbookImporter workBookImporter = SpreadImporter.CreateWorkbookImporter(SpreadDocumentFormat.Xlsx, fs))
				{
					foreach (IWorksheetImporter worksheetImporter in workBookImporter.WorksheetImporters)
					{
						foreach (IRowImporter rowImporter in worksheetImporter.Rows)
						{
							foreach (ICellImporter cell in rowImporter.Cells)
							{
								string value = cell.Value;
							}
						}
					}
				}
			}
```

Through the importer objects, you can access the properties of the different elements.

> Starting with R1 2023 SP1, there are separate properties for the formula and the value in the `ICellImporter`.

## See Also

* [Getting Started](https://www.telerik.com/document-processing-libraries/documentation/libraries/radspreadstreamprocessing/getting-started)
* [Workbook](https://www.telerik.com/document-processing-libraries/documentation/libraries/radspreadstreamprocessing/model/workbook)
* [Handling Empty Cells with RadSpreadStreamProcessing](https://www.telerik.com/document-processing-libraries/documentation/knowledge-base/handle-empty-cells-radspreadstreamprocessing)
* [SpreadStreamProcessing Import Document Demo](https://demos.telerik.com/document-processing/spreadstreamprocessing/import_document)
