Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to parse duplicated shared strings #230

Closed
mingpepe opened this issue Apr 27, 2023 · 2 comments
Closed

Fail to parse duplicated shared strings #230

mingpepe opened this issue Apr 27, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@mingpepe
Copy link

mingpepe commented Apr 27, 2023

duplicated_shared_strings.xlsx

In #182, @AlexanderJohr explained about shared strings. Then #183, seems assume that no duplicated data in shared string table, I agree with it but found that is wrong.

Here is the data extract from excel

Sheet data

<sheetData>
    <row r="1" spans="1:1" x14ac:dyDescent="0.25">
        <c r="A1" s="1" t="s">
            <v>0</v>
        </c>
    </row>
    <row r="2" spans="1:1" x14ac:dyDescent="0.25">
        <c r="A2" s="1" t="s">
            <v>1</v>
        </c>
    </row>
    <row r="3" spans="1:1" x14ac:dyDescent="0.25">
        <c r="A3" s="1" t="s">
            <v>1</v>
        </c>
    </row>
</sheetData

SST

<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="3" uniqueCount="2">
    <si>
        <t>[5]</t>
        <phoneticPr fontId="3" type="noConversion"/>
    </si>
    <si>
        <t>[5]</t>
        <phoneticPr fontId="3" type="noConversion"/>
    </si>
</sst>

Hence shared strings will not be parsed correctly. I'm not sure why duplicated shared string exist.

@FauconSpartiate FauconSpartiate added the bug Something isn't working label Apr 30, 2023
@justkawal
Copy link
Owner

I think this issue is not happening in the latest version.
If you encounter the same issue please feel free to re-open the issue again.

Thanks.

@tim1mmr
Copy link

tim1mmr commented Jan 25, 2024

This issue is still present in the latest version since the "Optimizations (#290)" change to shared_strings.dart.
The putIfAbsent code only runs for new keys, so duplicates are ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants