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

Yarg tries to parse the UUID of the document from the link inside formula and fails. #161

Open
reloadall opened this issue Feb 18, 2022 · 0 comments

Comments

@reloadall
Copy link

reloadall commented Feb 18, 2022

When passing an url to a hyperlink inside a formula, yarg thinks that cell numbers are being passed to it inside the formula.

How to repeat:

  1. Create single cell xlsx template with value

=ГИПЕРССЫЛКА("${url}";"${caption}")

  1. Add groove script in the report
def result = []
result.add([
    'url' : 'http:https://localhost:8080/app/open?screen=Doc.edit&item=Doc-0cba74d6-678b-7a60-8952-1d8497714784',
    'caption' : 'Random'
    ])    
return result
  1. When you run the report, you will get
java.lang.NumberFormatException: For input string: "8497714784"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:583)
    at java.lang.Integer.valueOf(Integer.java:766)
    at com.haulmont.yarg.formatters.impl.xlsx.CellReference.<init>(CellReference.java:40)
    at com.haulmont.yarg.formatters.impl.xlsx.Range.fromCells(Range.java:51)

Test project with example
test.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant