开发者社区> 问答> 正文

poi读取office公式问题:报错

先贴代码:

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

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

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

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

 

 

展开
收起
kun坤 2020-06-07 13:13:29 605 0
1 条回答
写回答
取消 提交回答
  •  在单元格里面

        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文件读取公式,图片信息的,读出来的公式对象有所在单元格坐标信息,而且读取出来没有问题,问题是读出来的公式包含的特殊字符成乱码了
    2020-06-07 13:13:34
    赞同 展开评论 打赏
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
《Apache Flink-重新定义计算》PDF下载 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载