Reading data from a spreadsheet can be done in multiple ways:
- Read a file using automatic file type detection
- Read a file by specifying the file type
- Read a file and opening specific worksheets
- Read a file in read-only mode
- Read a file and open only specific cells
How to read a file, by automatically detecting the file type
You should use this when you don’t know what file format the user will load.
How to read a file by specifying the file type:
This is faster than using the automatically detecting file type.
How to load only specific worksheets
How to open a file in read-only mode
How to read specific cells:
The following code will only read row 1 and rows 20 – 30 of any sheet in the Excel file: