开发者

during opening an excel file with java i have this error: Warning: Usage of a local non-builtin name

when i try to open an excel file i have this error message. Warning: Usage of a local non-builtin name

My excel file file contains more than 1600 rows if i try the same code and open a small excel file, it's working.

Why please?

I开发者_运维问答 use JXL thank you


WorkbookSettings wbSettings = new WorkbookSettings(); wbSettings.setSuppressWarnings(true);


It appears to be just a warning, and not an error related to the excel file, not the parsing of the file, i'd just ignore it. Here is the code that generates that warning:

// Add all the local names to the specific sheets
913       for (Iterator it = localNames.iterator() ; it.hasNext() ;)
914       {
915         NameRecord nr  = (NameRecord) it.next();
916   
917         if (nr.getBuiltInName() == null)
918         {
919           logger.warn("Usage of a local non-builtin name");
920         } 
921         else if (nr.getBuiltInName() == BuiltInName.PRINT_AREA || 
922                  nr.getBuiltInName() == BuiltInName.PRINT_TITLES)
923         {
924           // appears to use the internal tab number rather than the
925           // external sheet index
926           SheetImpl s = (SheetImpl) sheets.get(nr.getSheetRef() - 1);
927           s.addLocalName(nr);
928         }
929       }
930     }


user618111,

It is likely a problem in your large Excel file. Go to Menu Formulas and click on Name Manager. You very likely see a Name that has a bad value (#REF!).

If the excel file generation is in your control, you can fix it. Else, i suggest you just ignore it.


There can be one more scenario, where you have copied few cells from a different workbook. If you keep source formatting, and if it has a defined name, it will also be copied to name manager. Check if any such are there in and delete them.

Also, I had same issue when used MySQL Addin, which created some names in Name Manager. You may disable that COM addin and try again if that is the case.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜