[ 
https://issues.apache.org/jira/browse/ODFTOOLKIT-359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Svante Schubert updated ODFTOOLKIT-359:
---------------------------------------
    Priority: Major  (was: Blocker)

> setting data using a cell range address with two letters fails
> --------------------------------------------------------------
>
>                 Key: ODFTOOLKIT-359
>                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-359
>             Project: ODF Toolkit
>          Issue Type: Bug
>          Components: java, simple api
>    Affects Versions: 0.7-incubating
>            Reporter: Michael Kabdebo
>
> I've created a table with a big number of columns (=144). Next next step was 
> to generate a chart using the createChart(...)-method of the 
> SpreadsheetDocument class.
> This is my cell range address: 'TableName'.A1:'TableName.EN4'
> I got this exception:
> not able to add chart for sheet 'TableName': For input string: "N4"
> java.lang.NumberFormatException: For input string: "N4"
>       at 
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
>       at java.lang.Integer.parseInt(Integer.java:449)
>       at java.lang.Integer.parseInt(Integer.java:499)
>       at org.odftoolkit.simple.chart.DataSet.setValues(DataSet.java:596)
>       at org.odftoolkit.simple.chart.DataSet.<init>(DataSet.java:123)
>       at 
> org.odftoolkit.simple.chart.AbstractChartContainer.createChart(AbstractChartContainer.java:133)
>       at 
> org.odftoolkit.simple.SpreadsheetDocument$ChartContainerImpl.createChart(SpreadsheetDocument.java:660)
>       at 
> org.odftoolkit.simple.SpreadsheetDocument$ChartContainerImpl.access$0(SpreadsheetDocument.java:658)
>       at 
> org.odftoolkit.simple.SpreadsheetDocument.createChart(SpreadsheetDocument.java:587)
> Whats happened:
> This is how you try to extract the column and row information: 
> (DataSet.class:594 - 597)
>    char beginColumn = begincell.charAt(0);
>    char endColumn = endcell.charAt(0);
>    int beginRow = Integer.parseInt(begincell.substring(1));
>    int endRow = Integer.parseInt(endcell.substring(1));}}
> This won't work for addresses using column adresses with two letters (or 
> more).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to