incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Kabdebo (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ODFTOOLKIT-359) setting data using a cell range address with two letters fails
Date Wed, 13 Mar 2013 07:34:13 GMT
Michael Kabdebo created ODFTOOLKIT-359:
------------------------------------------

             Summary: 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
            Priority: Blocker


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:
{quote}
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)
{quote}

_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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message