-
Notifications
You must be signed in to change notification settings - Fork 2
Commit 2580a96

Fahad Adeel
Revamp of Worksheet Class
- Refactored the Worksheet class to provide a more intuitive interface for accessing worksheet functionalities.
* This includes the introduction of the `CellIndexer` class to make cell access more streamlined.
- Added exception handling across various methods to ensure safer operations when interacting with the worksheet.
- Introduced the `Cells` property to provide an intuitive way to access cells using their reference.
* This encapsulates the cell accessing logic inside the `CellIndexer`, making the main `Worksheet` class less cluttered.
- Enhanced the `Name` property for worksheets to include better error handling.
* This should prevent unexpected null references and provides clearer error messages.
- Extended image handling capabilities:
* Added `AddImage` method, allowing users to easily insert images into the worksheet.
* Enhanced `ExtractImages` to return a collection of Image objects rather than raw streams, improving usability.
- Implemented row and column dimension adjustments:
* `SetRowHeight` and `SetColumnWidth` methods provide a way to customize row heights and column widths respectively.
- Added sheet protection functionality:
* New methods `ProtectSheet`, `IsProtected`, and `UnprotectSheet` allow for setting, checking, and removing worksheet protection.
- Added utility methods and refactored some existing methods:
* This includes methods for handling column letter indexing, image type determination, and cell/row creations.
* Ensures that the main functionalities of the class remain clean and each method has a single responsibility.
- Enhanced merging cells capability with the `MergeCells` method.
- Added a method `GetSheetIndex` to retrieve the index of the current worksheet in the workbook.
Overall, these changes are aimed at making the `Worksheet` class more robust, user-friendly, and maintainable.1 parent 40b1fb7 commit 2580a96Copy full SHA for 2580a96
File tree
Expand file treeCollapse file tree
2 files changed
+223
-346
lines changedFilter options
- FileFormat.Cells
Expand file treeCollapse file tree
2 files changed
+223
-346
lines changedFileFormat.Cells/SheetData.cs
Copy file name to clipboardExpand all lines: FileFormat.Cells/SheetData.cs-39Lines changed: 0 additions & 39 deletions
This file was deleted.
0 commit comments