Closed
Labels
FeatureSomething we can add later on without introducing a breaking changeODFF ConformanceODDF 1.3 Evaluator requirementODFF SGEODDF 1.3 Small Group Evaluator requirementVerifiedVerified by Handsoncode
Milestone
Description
Description
Extracted from #12
@swistak35 mentioned that sheetName does not support escaping apostrophe
ODFF says that it should be escaped by doubling it:
SheetNames include single-quote“'” (APOSTROPHE, U+0027) characters by doubling them and having the entire name surrounded by single-quotes.
This is an enhancement, can be added in a minor version.
Test
Is already added
hyperformula/test/parser/parser.spec.ts
Lines 389 to 398 in b3752ae
| xit('escaping support', () => { | |
| const sheetMapping = new SheetMapping(enGB) | |
| sheetMapping.addSheet('Sheet1') | |
| sheetMapping.addSheet("Some'sheet") | |
| const parser = new ParserWithCaching(new Config(), sheetMapping.get) | |
| const ast = parser.parse("='Some''sheet'!A1", CellAddress.absolute(0, 0, 0)).ast as CellReferenceAst | |
| expect(ast.type).toBe(AstNodeType.CELL_REFERENCE) | |
| expect(ast.reference.sheet).toBe(1) | |
| }) |
JavaScript escaping should work as well:
const ast = parser.parse('=\'Somesheet\'!A1')
const ast = parser.parse('=\'Some\'\'sheet\'!A1')Metadata
Metadata
Assignees
Labels
FeatureSomething we can add later on without introducing a breaking changeODFF ConformanceODDF 1.3 Evaluator requirementODFF SGEODDF 1.3 Small Group Evaluator requirementVerifiedVerified by Handsoncode
Activity
wojciechczerniak commentedon Sep 11, 2020
Done in #514
Add SEQUENCE built-in function (#1645)