# FlexSheet Import and Export Excel Files

## Content

You can import existing Excel files into FlexSheet or export FlexSheet to a new Excel file. 

FlexSheet has **load** and **save** methods for each of these functions. 
## Import from Excel
```javascript
import * as wjFlexSheet from '@mescius/wijmo.grid.sheet';

let excelIOSheet = new wjFlexSheet.FlexSheet('#excelIOSheet');

//Import a file from end user
let fileInput = document.querySelector('#importFile');
if (fileInput.files[0]) {
    excelIOSheet.loadAsync(fileInput.files[0]);
}
```
## Export to Excel
```javascript
//allow custom input for filename
let fileName = document.querySelector('#fileName').value;
if (fileName == null || fileName === '') {
    fileName = 'FlexSheet.xlsx';
}
//export FlexSheet to Excel
excelIOSheet.saveAsync(fileName);
```
