org.apache.poi.hssf.usermodel.HSSFFont.setCharSet()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(153)

本文整理了Java中org.apache.poi.hssf.usermodel.HSSFFont.setCharSet()方法的一些代码示例,展示了HSSFFont.setCharSet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFFont.setCharSet()方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFFont
类名称:HSSFFont
方法名:setCharSet

HSSFFont.setCharSet介绍

[英]set character-set to use.
[中]

代码示例

代码示例来源:origin: org.apache.poi/poi

  1. /**
  2. * set character-set to use.
  3. * @see #ANSI_CHARSET
  4. * @see #DEFAULT_CHARSET
  5. * @see #SYMBOL_CHARSET
  6. */
  7. public void setCharSet(int charset)
  8. {
  9. byte cs = (byte)charset;
  10. if(charset > 127) {
  11. cs = (byte)(charset-256);
  12. }
  13. setCharSet(cs);
  14. }

代码示例来源:origin: com.haulmont.thirdparty/poi

  1. /**
  2. * set character-set to use.
  3. * @see #ANSI_CHARSET
  4. * @see #DEFAULT_CHARSET
  5. * @see #SYMBOL_CHARSET
  6. */
  7. public void setCharSet(int charset)
  8. {
  9. byte cs = (byte)charset;
  10. if(charset > 127) {
  11. cs = (byte)(charset-256);
  12. }
  13. setCharSet(cs);
  14. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

  1. /**
  2. * set character-set to use.
  3. * @see #ANSI_CHARSET
  4. * @see #DEFAULT_CHARSET
  5. * @see #SYMBOL_CHARSET
  6. */
  7. public void setCharSet(int charset)
  8. {
  9. byte cs = (byte)charset;
  10. if(charset > 127) {
  11. cs = (byte)(charset-256);
  12. }
  13. setCharSet(cs);
  14. }

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

  1. /**
  2. * set character-set to use.
  3. * @see #ANSI_CHARSET
  4. * @see #DEFAULT_CHARSET
  5. * @see #SYMBOL_CHARSET
  6. */
  7. public void setCharSet(int charset)
  8. {
  9. byte cs = (byte)charset;
  10. if(charset > 127) {
  11. cs = (byte)(charset-256);
  12. }
  13. setCharSet(cs);
  14. }

代码示例来源:origin: stackoverflow.com

  1. HSSFFont hSSFFont = (HSSFFont) workbook.createFont();
  2. hSSFFont.setFontName(HSSFFont.FONT_ARIAL);
  3. hSSFFont.setCharSet(HSSFFont.ANSI_CHARSET);

代码示例来源:origin: stackoverflow.com

  1. //Create the workbook, and the font
  2. HSSFWorkbook wb;
  3. HSSFFont wbFont;
  4. wbFont=wb.createFont();
  5. wbFont.setCharSet(HSSFFont.ANSI_CHARSET); //Your Character encoding goes in the parameter
  6. //Establish cell styles
  7. HSSFCellStyle cellStyle =wb.createCellStyle();
  8. cellStyle.setFont(wbFont);
  9. //We create our cells with our data and with our specified format
  10. HSSFCell cell =null;
  11. cell = row.createCell(1);
  12. cell.setCellStyle(cellStyle);
  13. cell.setCellValue("MY DATA");
  14. //Do the rest for whatever you might need for your workbook and then you create it

代码示例来源:origin: stackoverflow.com

  1. HSSFFont fontNew = workbookNew.createFont();
  2. fontNew.setBoldweight(fontOld.getBoldweight());
  3. fontNew.setCharSet(fontOld.getCharSet());
  4. fontNew.setColor(fontOld.getColor());
  5. fontNew.setFontName(fontOld.getFontName());

代码示例来源:origin: com.haulmont.yarg/yarg

  1. newFont.setTypeOffset(cellFont.getTypeOffset());
  2. newFont.setBoldweight(cellFont.getBoldweight());
  3. newFont.setCharSet(cellFont.getCharSet());
  4. newFont.setColor(cellFont.getColor());
  5. newFont.setUnderline(cellFont.getUnderline());

代码示例来源:origin: cuba-platform/yarg

  1. newFont.setTypeOffset(cellFont.getTypeOffset());
  2. newFont.setBold(cellFont.getBold());
  3. newFont.setCharSet(cellFont.getCharSet());
  4. newFont.setColor(cellFont.getColor());
  5. newFont.setUnderline(cellFont.getUnderline());

相关文章