Skip to content

Commit 2580a96

Browse files
author
Fahad Adeel
committed
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 2580a96

File tree

2 files changed

+223
-346
lines changed

2 files changed

+223
-346
lines changed

FileFormat.Cells/SheetData.cs

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)