poi读取office公式问题:报错-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

poi读取office公式问题:报错

kun坤 2020-06-07 13:13:29 154

先贴代码:

Drawing drawing = sheet.getDrawingPatriarch();
XSSFDrawing xssfDrawing = (XSSFDrawing) drawing;
CTDrawing ctDrawing = xssfDrawing.getCTDrawing();
CTOneCellAnchor[] ctDrawingOneCellAnchorArray = ctDrawing.getOneCellAnchorArray();

功能是读取office文件里边得公式

问题:如果office公式里边带有特殊字符(α,β等),读取出来得是两个问号(??)

有没有了解得大神帮忙看看

 

 

ice问题 office问题 cent问题报错 poi报错 问题off
分享到
取消 提交回答
全部回答(1)
  • kun坤
    2020-06-07 13:13:34

     在单元格里面

        sheet = workbook.getSheet("...");
        String strr=sheet.getRow(0).getCell(0).getCellFormula();

    的啊,你不先获取单元格,在获取里面的公式,你目前这种方式对吗?

     
     
    G
    M
    T
     
     
    Detect languageAfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu
     
    AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu
     
     
     
     
     
     
     
     
     
    Text-to-speech function is limited to 200 characters
     
     
    Options : History : Feedback : DonateClose
    ######poi是以解析office的xml文件读取公式,图片信息的,读出来的公式对象有所在单元格坐标信息,而且读取出来没有问题,问题是读出来的公式包含的特殊字符成乱码了
    0 0
云计算
使用钉钉扫一扫加入圈子
+ 订阅

时时分享云计算技术内容,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。

最新问题