File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 119119 $ xlsxFastEditor ->writeInt ($ sheet2 , 'C3 ' , -7 );
120120 $ xlsxFastEditor ->writeFloat ($ sheet2 , 'D3 ' , 273.15 );
121121
122- // Test writing special character '&'
123- $ xlsxFastEditor ->writeString ($ sheet2 , 'A5 ' , '& ' );
122+ // Writing special XML characters
123+ $ xlsxFastEditor ->writeString ($ sheet2 , 'B5 ' , '< " & \' > ' );
124+ $ xlsxFastEditor ->writeFormula ($ sheet2 , 'C5 ' , '=LEN("< & \' >") ' );
124125
125126 // Writing non-existing cells but existing lines
126127 $ xlsxFastEditor ->writeFormula ($ sheet2 , 'I2 ' , '=7*3 ' );
169170
170171 assert ($ xlsxFastEditor ->readString ($ sheet1 , 'B2 ' ) === 'World ' );
171172
172- // Test writing special character '&'
173- assert ($ xlsxFastEditor ->readString ($ sheet2 , 'A5 ' ) === '& ' );
173+ // Test special XML characters
174+ assert ($ xlsxFastEditor ->readString ($ sheet2 , 'B5 ' ) === '< " & \' > ' );
175+ assert ($ xlsxFastEditor ->readFormula ($ sheet2 , 'C5 ' ) === '=LEN("< & \' >") ' );
174176
175177 $ xlsxFastEditor ->close ();
176178
You can’t perform that action at this time.
0 commit comments