Skip to content

[BUG] xlsx-renderer: When iterates on empty collection it leaves garbages #149

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

Open
jacekkoziol opened this issue Jan 29, 2021 · 5 comments
Labels
accepted It is accepted to do BUG Something isn't working important Do it first

Comments

@jacekkoziol
Copy link
Contributor

jacekkoziol commented Jan 29, 2021

Using template with nested loops, the expected file is generated correctly however few renderer variables (in this case !# END_LOOP item and !# FINISH) are not removed from the generated file.

(@Siemienik EDIT): Reproduce:

sxr --model vm.json template.xlsx > result.xlsx
@jacekkoziol jacekkoziol changed the title xlsx-renderer: The renderer variable is not removed in the generated file [BUG] xlsx-renderer: The renderer variable is not removed in the generated file Jan 29, 2021
@Siemienik Siemienik added accepted It is accepted to do BUG Something isn't working important Do it first labels Jan 29, 2021
@jacekkoziol
Copy link
Contributor Author

jacekkoziol commented Feb 1, 2021

@Siemienik I have notice another issue, if the array in the view model data is empty, the variables of the loop section are not removed and they are just placed in the generated file.
I'm attaching the source and result files:

@Siemienik
Copy link
Owner

Yesterday I added a utility which will helps me debug this issue (#134 #151). For now nothing blocks me and I start to fixing this bug ;)

@jacekkoziol
Copy link
Contributor Author

@Siemienik It seems like the issue is caused by empty arrays on which we try perform the loop.

@Siemienik Siemienik changed the title [BUG] xlsx-renderer: The renderer variable is not removed in the generated file [BUG] xlsx-renderer: When iterates on empty collection it leaves garbages Feb 11, 2021
@KouzanaFedi
Copy link

Any update on this issue?

@Siemienik
Copy link
Owner

Thanks for refresh this topic, will investigate soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted It is accepted to do BUG Something isn't working important Do it first
Projects
Status: Important
Development

No branches or pull requests

3 participants