You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Ash B <ba...@gmail.com> on 2021/02/10 09:49:34 UTC
Invalid CellReference:1A
Hi All ,
We are receiving an excel file (.xlsx) from Client , for reading and processing .
We are using below apache.poi dependency , latest version.
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.0.0</version>
</dependency>
While reading the file in java , getting below issue .
java.lang.IllegalArgumentException: Invalid CellReference:1A
at org.apache.poi.ss.util.CellReference.seperateRefParts
On further analysis , we found that if we open the file and just do simple save (Ctrl+S ) without modifying anything ,it works and able to read and process the rows in a code.
Else we face above issue .
Could you please suggest , what needs to be done ?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Invalid CellReference:1A
Posted by Ash B <ba...@gmail.com>.
On 2021/02/10 11:46:37, Nick Burch <ap...@gagravarr.org> wrote:
> On Wed, 10 Feb 2021, Ash B wrote:
> > While reading the file in java , getting below issue .
> >
> > java.lang.IllegalArgumentException: Invalid CellReference:1A
> > at org.apache.poi.ss.util.CellReference.seperateRefParts
>
> A cell reference of 1A is invalid - it should be A1.
>
> Where is this problematic file coming from?
>
> If you rename the .xlsx file to .zip, unzip and check the sheet xml files,
> can you see the 1A reference there? If so, can you please share the
> xml snippet?
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>
Hi Thanks for you mail .
I tried as suggested . Below is the code snippet . Could not share more ,as the code is on client's machine and manually typed it .
<?xml version="1.0" encoding="utf-8"?>
<x:worksheet xmlns:x="https://schemas.openxmlformats.org/spreadsheetml/2006/main">
<x:sheetData>
<x:row r="1">
<x:c r="1A" t="inlineStr" s="2">
<x:is>
<x:t>ID</x:t>
</x:is>
</x:c>
<x:c r="1B" t="inlineStr" s="2">
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Invalid CellReference:1A
Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 10 Feb 2021, Ash B wrote:
> While reading the file in java , getting below issue .
>
> java.lang.IllegalArgumentException: Invalid CellReference:1A
> at org.apache.poi.ss.util.CellReference.seperateRefParts
A cell reference of 1A is invalid - it should be A1.
Where is this problematic file coming from?
If you rename the .xlsx file to .zip, unzip and check the sheet xml files,
can you see the 1A reference there? If so, can you please share the
xml snippet?
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org