incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Kabdebo (JIRA)" <>
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
             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:
not able to add chart for sheet 'TableName': For input string: "N4"
java.lang.NumberFormatException: For input string: "N4"
	at java.lang.NumberFormatException.forInputString(
	at java.lang.Integer.parseInt(
	at java.lang.Integer.parseInt(
	at org.odftoolkit.simple.chart.DataSet.setValues(
	at org.odftoolkit.simple.chart.DataSet.<init>(
	at org.odftoolkit.simple.chart.AbstractChartContainer.createChart(
	at org.odftoolkit.simple.SpreadsheetDocument$ChartContainerImpl.createChart(
	at org.odftoolkit.simple.SpreadsheetDocument$ChartContainerImpl.access$0(
	at org.odftoolkit.simple.SpreadsheetDocument.createChart(

_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:

View raw message