@@ -21,20 +21,71 @@ This codebase is developed using AI agents.
2121
2222-  [ Features] ( #features ) 
2323-  [ Security Features] ( #security-features ) 
24+   -  [ SecurityManager] ( #securitymanager ) 
25+   -  [ Rate Limiting] ( #rate-limiting ) 
26+   -  [ Security Logging] ( #security-logging ) 
27+   -  [ File Quarantine] ( #file-quarantine ) 
28+   -  [ File Checksums] ( #file-checksums ) 
29+   -  [ Input Validation] ( #input-validation ) 
30+   -  [ Security Integration] ( #security-integration ) 
2431-  [ Performance Considerations] ( #performance-considerations ) 
2532-  [ Requirements] ( #requirements ) 
2633-  [ iOS Support] ( #ios-support ) 
34+   -  [ iOS File System Considerations] ( #ios-file-system-considerations ) 
35+   -  [ iOS Configuration Requirements] ( #ios-configuration-requirements ) 
36+   -  [ iOS-Specific Features] ( #ios-specific-features ) 
37+   -  [ iOS Testing] ( #ios-testing ) 
2738-  [ Installing] ( #installing ) 
39+   -  [ Swift Package Manager] ( #swift-package-manager ) 
40+   -  [ Import] ( #import ) 
41+   -  [ Verify Installation] ( #verify-installation ) 
2842-  [ File Format] ( #file-format ) 
2943-  [ Quick Start] ( #quick-start ) 
3044-  [ Core Concepts] ( #core-concepts ) 
45+   -  [ Workbook] ( #workbook ) 
46+   -  [ Sheet] ( #sheet ) 
47+   -  [ Cell Values] ( #cell-values ) 
48+   -  [ Cell Coordinates] ( #cell-coordinates ) 
3149-  [ Basic Usage] ( #basic-usage ) 
50+   -  [ API Highlights] ( #api-highlights ) 
51+   -  [ Example: Bulk Data and Images] ( #example-bulk-data-and-images ) 
52+   -  [ Cell Sizing] ( #cell-sizing ) 
53+   -  [ Utility Properties and Methods] ( #utility-properties-and-methods ) 
3254-  [ CSV/TSV Import & Export] ( #csvtsv-import--export ) 
3355-  [ Image Support] ( #image-support ) 
56+   -  [ Perfect Aspect Ratio Preservation] ( #perfect-aspect-ratio-preservation ) 
57+   -  [ Supported Image Formats] ( #supported-image-formats ) 
58+   -  [ Adding Images with Perfect Sizing] ( #adding-images-with-perfect-sizing ) 
59+   -  [ Image Scaling API] ( #image-scaling-api ) 
60+   -  [ Automatic Cell Sizing] ( #automatic-cell-sizing ) 
61+ -  [ Number Format Support] ( #number-format-support ) 
62+   -  [ Supported Number Formats] ( #supported-number-formats ) 
63+   -  [ Number Format Examples] ( #number-format-examples ) 
64+   -  [ Font Colour with Number Formats] ( #font-colour-with-number-formats ) 
65+   -  [ Excel Compliance] ( #excel-compliance ) 
66+   -  [ Testing Number Formats] ( #testing-number-formats ) 
3467-  [ Text Alignment Support] ( #text-alignment-support ) 
68+   -  [ Horizontal Alignment (5 options)] ( #horizontal-alignment-5-options ) 
69+   -  [ Vertical Alignment (5 options)] ( #vertical-alignment-5-options ) 
70+   -  [ Combined Alignment] ( #combined-alignment ) 
71+   -  [ Practical Examples] ( #practical-examples ) 
72+   -  [ Predefined Formats with Alignment] ( #predefined-formats-with-alignment ) 
73+   -  [ Alignment with Other Formatting] ( #alignment-with-other-formatting ) 
3574-  [ Advanced Usage] ( #advanced-usage ) 
75+   -  [ Multiple Sheets with Formulas] ( #multiple-sheets-with-formulas ) 
76+   -  [ Working with Ranges] ( #working-with-ranges ) 
77+   -  [ Cell Formatting] ( #cell-formatting ) 
78+   -  [ Font Colour Support] ( #font-colour-support ) 
3679-  [ Error Handling] ( #error-handling ) 
3780-  [ Testing & Validation] ( #testing--validation ) 
81+   -  [ Unit Tests] ( #unit-tests ) 
82+   -  [ XLKitTestRunner] ( #xlkittestrunner ) 
83+   -  [ iOS Compatibility Testing] ( #ios-compatibility-testing ) 
84+   -  [ Security Features in Tests] ( #security-features-in-tests ) 
85+   -  [ Automated Validation] ( #automated-validation ) 
86+   -  [ Test Output Structure] ( #test-output-structure ) 
87+   -  [ CI/CD Integration] ( #cicd-integration ) 
88+   -  [ Test Coverage] ( #test-coverage ) 
3889-  [ Code Style & Formatting] ( #code-style--formatting ) 
3990-  [ Credits] ( #credits ) 
4091-  [ License] ( #License ) 
@@ -799,7 +850,112 @@ Supported colour formats:
799850-  Theme colours: Excel's built-in theme colour system
800851-  All colours are properly converted to Excel's internal format
801852
802- ### Text Alignment Support  
853+ ### Number Format Support  
854+ 
855+ XLKit provides comprehensive number formatting support with proper Excel compliance. All number formats are correctly applied in Excel with thousands grouping, currency symbols, and proper display in the "Format Cells" dialog.
856+ 
857+ ### Supported Number Formats  
858+ 
859+ ``` swift 
860+ //  Currency formatting
861+ let  currencyFormat =  CellFormat.currency ()                    //  $1,234.56
862+ let  customCurrency =  CellFormat.currency (format : .custom (" $#,##0.00" //  Custom currency
863+ 
864+ //  Percentage formatting  
865+ let  percentageFormat =  CellFormat.percentage ()                //  12.34%
866+ let  customPercentage =  CellFormat.percentage (format : .custom (" 0.00%" //  Custom percentage
867+ 
868+ //  Date formatting
869+ let  dateFormat =  CellFormat.date ()                            //  Standard date format
870+ let  customDate =  CellFormat.date (format : .custom (" mmmm dd, yyyy" //  Custom date
871+ 
872+ //  Custom number formats
873+ let  thousandsFormat =  CellFormat ()
874+ thousandsFormat.numberFormat  =  .custom 
875+ thousandsFormat.customNumberFormat  =  " #,##0" //  1,234,567
876+ 
877+ let  decimalFormat =  CellFormat ()
878+ decimalFormat.numberFormat  =  .custom 
879+ decimalFormat.customNumberFormat  =  " 0.000" //  3.142
880+ 
881+ let  mixedFormat =  CellFormat ()
882+ mixedFormat.numberFormat  =  .custom 
883+ mixedFormat.customNumberFormat  =  " $#,##0.00;($#,##0.00)" //  ($1,234.56) for negatives
884+ ``` 
885+ 
886+ ### Number Format Examples  
887+ 
888+ ``` swift 
889+ let  sheet =  workbook.addSheet (name : " Number Formats" 
890+ 
891+ //  Currency examples
892+ sheet.setCell (" A1" number : 1234.56 , format : CellFormat.currency ())
893+ sheet.setCell (" A2" number : 5678.90 , format : CellFormat.currency (format : .custom (" $#,##0.00" 
894+ 
895+ //  Percentage examples
896+ sheet.setCell (" B1" number : 0.1234 , format : CellFormat.percentage ())
897+ sheet.setCell (" B2" number : 0.5678 , format : CellFormat.percentage (format : .custom (" 0.00%" 
898+ 
899+ //  Custom number formats
900+ var  thousandsFormat =  CellFormat ()
901+ thousandsFormat.numberFormat  =  .custom 
902+ thousandsFormat.customNumberFormat  =  " #,##0" 
903+ sheet.setCell (" C1" number : 1234567 , format : thousandsFormat)
904+ 
905+ var  decimalFormat =  CellFormat ()
906+ decimalFormat.numberFormat  =  .custom 
907+ decimalFormat.customNumberFormat  =  " 0.000" 
908+ sheet.setCell (" C2" number : 3.14159 , format : decimalFormat)
909+ 
910+ //  Date formatting
911+ sheet.setCell (" D1" date : Date (), format : CellFormat.date ())
912+ var  customDateFormat =  CellFormat ()
913+ customDateFormat.numberFormat  =  .custom 
914+ customDateFormat.customNumberFormat  =  " mmmm dd, yyyy" 
915+ sheet.setCell (" D2" date : Date (), format : customDateFormat)
916+ ``` 
917+ 
918+ ### Font Colour with Number Formats  
919+ 
920+ ``` swift 
921+ //  Red currency values
922+ let  redCurrencyFormat =  CellFormat.currency (
923+     format : .currencyWithDecimals ,
924+     color : " #FF0000" 
925+ )
926+ 
927+ //  Blue percentage values
928+ let  bluePercentageFormat =  CellFormat.percentage (
929+     format : .percentageWithDecimals ,
930+     color : " #0000FF" 
931+ )
932+ 
933+ //  Apply coloured number formats
934+ sheet.setCell (" A1" number : 1234.56 , format : redCurrencyFormat)
935+ sheet.setCell (" B1" number : 0.85 , format : bluePercentageFormat)
936+ ``` 
937+ 
938+ ### Excel Compliance  
939+ 
940+ All number formats are properly implemented with:
941+ -  Thousands grouping: Numbers display with proper separators (1,234.56)
942+ -  Currency symbols: Dollar signs and other currency symbols display correctly
943+ -  Format Cells dialog: Excel shows the correct format instead of "General"
944+ -  Custom formats: User-defined number formats work as expected
945+ -  Negative numbers: Proper handling of negative values with parentheses or minus signs
946+ -  Locale support: Respects system locale settings for decimal separators
947+ 
948+ ### Testing Number Formats  
949+ 
950+ Use the XLKitTestRunner to validate number formatting:
951+ 
952+ ``` bash 
953+ swift run XLKitTestRunner number-formats
954+ ``` 
955+ 
956+ This generates ` Number-Format-Test.xlsx `  with comprehensive examples of all number format types.
957+ 
958+ ## Text Alignment Support  
803959
804960XLKit provides comprehensive text alignment support with all 6 alignment options available in Excel:
805961
0 commit comments