From 0f851c7f3e10f5859c677780964ef2e082824f30 Mon Sep 17 00:00:00 2001 From: Tomas Pytel Date: Sat, 17 Jul 2021 12:02:23 +0200 Subject: [PATCH] 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. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40f13a3..e220754 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This library has 2 main features: reading a spreadsheet files and converting the ### - XLSX Use `xlsx_to_dict()` method when converting form spreadsheets. Supported file formats for spreadsheets are: .xlsx,.xlsm,.xltx,.xltm -Spreadsheets with multiple worksheets are supported. If no sheet is specified, the first sheet is selected. +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. ```python3 # Import the library @@ -28,6 +28,9 @@ from sheet2dict import Worksheet # Create an object ws = Worksheet() +# Convert active sheet (without specifying sheet name) +ws.xlsx_to_dict(path='inventory.xlsx') + # Convert the 'Main Warehouse' sheet of the 'inventory.xslx' spreadsheet file. ws.xlsx_to_dict(path='inventory.xlsx', select_sheet='Main Warehouse')