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: [hidden email] For additional commands, e-mail: [hidden email] |
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: [hidden email] For additional commands, e-mail: [hidden email] |
On 2021/02/10 11:46:37, Nick Burch <[hidden email]> 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: [hidden email] > For additional commands, e-mail: [hidden email] > > 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: [hidden email] For additional commands, e-mail: [hidden email] |
Free forum by Nabble | Edit this page |