-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Normal
-
None
-
Affects Version/s: 5.12.2, 6.1.0
-
Component/s: None
-
None
User Story
As an app developer, I want to use the Excel "hidden number format" (;; in Keikai so that I can hide cell content for presentation or sensitive data purposes while preserving the underlying data.
Acceptance Criteria
- When a cell's custom number format is set to
{;;;}
, its content is not visible in the sheet view, matching Excel's behavior.
- The underlying cell value remains intact and is accessible via formulas or when the cell is edited.
- When importing Excel files that use the ;;; format, Keikai correctly hides the content as expected.
- Exported files from Keikai retain the ;;; format, ensuring round-trip fidelity with Excel.
Details
- Excel supports a special custom number format using three semicolons (;;
, which hides all cell content visually, but does not delete or alter the underlying data. This feature is often called the "hidden number format" or "cell hiding format."
- obvious root cause
case 4: default: posNumFmt = parts.get(0); negNumFmt = parts.get(1); zeroNumFmt = parts.get(2); textFmt = parts.get(3); textFmt.setSectionFourTextFormat(true);// KEIKAI-243 break; }
- example test file keikai-820.xlsx
Current Result
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.get(ArrayList.java:459)
at org.zkoss.poi.ss.format.CellFormat.<init>(CellFormat.java:229)
at org.zkoss.poi.ss.format.CellFormat.getInstance(CellFormat.java:172)
at io.keikai.model.impl.sys.FormatEngineImpl.getCellFormat(FormatEngineImpl.java:79)
at io.keikaiex.model.sys.FormatEngineEx.getCellFormat(FormatEngineEx.java:46)
at io.keikai.model.impl.sys.FormatEngineImpl.format0(FormatEngineImpl.java:98)
at io.keikai.model.impl.sys.FormatEngineImpl.format(FormatEngineImpl.java:70)
at io.keikai.ui.impl.CellFormatHelper.getFormatResult(CellFormatHelper.java:997)
at io.keikai.ui.SpreadsheetCtrlImpl.getCellAttr(SpreadsheetCtrlImpl.java:543)
at io.keikai.ui.SpreadsheetCtrlImpl.getRangeAttrs(SpreadsheetCtrlImpl.java:390)
at io.keikai.ui.Spreadsheet.createActiveRange(Spreadsheet.java:2040)
at io.keikai.ui.Spreadsheet.renderProperties(Spreadsheet.java:1980)
Use case
This special format might have its special purposes:
- Data Management : you may want to keep certain data hidden from view while still retaining it for calculations or further processing.
- Error Handling : It can also be applied to cells that might produce errors (like ) to prevent those errors from displaying #VALUE!