Skip to content

Commit 0f851c7

Browse files
authored
Update README.md
Changed "the first sheet" to "active sheet" to avoid confusion if someone saves a spreadsheet and the active worksheet is, fe. second in line. Also, what is considered an active worksheet when there is only one worksheet in the spreadsheet. Add an example with and without "select_sheet" option.
1 parent bb319bc commit 0f851c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This library has 2 main features: reading a spreadsheet files and converting the
1919
### - XLSX
2020
Use `xlsx_to_dict()` method when converting form spreadsheets.
2121
Supported file formats for spreadsheets are: .xlsx,.xlsm,.xltx,.xltm
22-
Spreadsheets with multiple worksheets are supported. If no sheet is specified, the first sheet is selected.
22+
Spreadsheets with multiple worksheets are supported. If no sheet is specified, the active sheet is selected. If there is only one sheet, it is considered active.
2323

2424
```python3
2525
# Import the library
@@ -28,6 +28,9 @@ from sheet2dict import Worksheet
2828
# Create an object
2929
ws = Worksheet()
3030

31+
# Convert active sheet (without specifying sheet name)
32+
ws.xlsx_to_dict(path='inventory.xlsx')
33+
3134
# Convert the 'Main Warehouse' sheet of the 'inventory.xslx' spreadsheet file.
3235
ws.xlsx_to_dict(path='inventory.xlsx', select_sheet='Main Warehouse')
3336

0 commit comments

Comments
 (0)