|Summary:||RefersToFormula for defined name changes after sheet re-order|
|Product:||POI||Reporter:||Chiranjeevi Avvaru <chiranjeeviavvaru>|
|Component:||HSSF||Assignee:||POI Developers List <dev>|
Description Chiranjeevi Avvaru 2015-01-21 12:55:34 UTC
I have defined a name called DB_NAMES(table_array) refers to a sheet3 in MS-EXCEL. Now DB_NAMES refres to formule is =sheet3!$A$2:$B$245 my excel has 4 sheets. by using POI, I am deleting the sheet2 and re-creating with same name sheet2. Now the new sheet created at end. I am doing a re-order my using workbook.setSheetOrder("sheet1", 0); workbook.setSheetOrder("sheet2", 1); workbook.setSheetOrder("sheet3", 2); workbook.setSheetOrder("sheet4", 3); after that my DB_NAMES refers to formule changed to =REF!$A$2:$B$245 This is working fine in POI - 3.7 version. After upgraded to 3.11 version I got this issue. formules in the excel got corrupted. Could you please let me know, do i need to take any other version of POI and do i need to change the code or can this be fixed in any POI version.
Comment 1 Dominik Stadler 2015-02-11 18:34:36 UTC
Can you please attach the Excel file and your source code, preferably as unit test so we can reproduce your problem?