本文整理了Java中org.apache.poi.hssf.usermodel.HSSFFont.setCharSet()
方法的一些代码示例,展示了HSSFFont.setCharSet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFFont.setCharSet()
方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFFont
类名称:HSSFFont
方法名:setCharSet
[英]set character-set to use.
[中]
代码示例来源:origin: org.apache.poi/poi
/**
* set character-set to use.
* @see #ANSI_CHARSET
* @see #DEFAULT_CHARSET
* @see #SYMBOL_CHARSET
*/
public void setCharSet(int charset)
{
byte cs = (byte)charset;
if(charset > 127) {
cs = (byte)(charset-256);
}
setCharSet(cs);
}
代码示例来源:origin: com.haulmont.thirdparty/poi
/**
* set character-set to use.
* @see #ANSI_CHARSET
* @see #DEFAULT_CHARSET
* @see #SYMBOL_CHARSET
*/
public void setCharSet(int charset)
{
byte cs = (byte)charset;
if(charset > 127) {
cs = (byte)(charset-256);
}
setCharSet(cs);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* set character-set to use.
* @see #ANSI_CHARSET
* @see #DEFAULT_CHARSET
* @see #SYMBOL_CHARSET
*/
public void setCharSet(int charset)
{
byte cs = (byte)charset;
if(charset > 127) {
cs = (byte)(charset-256);
}
setCharSet(cs);
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* set character-set to use.
* @see #ANSI_CHARSET
* @see #DEFAULT_CHARSET
* @see #SYMBOL_CHARSET
*/
public void setCharSet(int charset)
{
byte cs = (byte)charset;
if(charset > 127) {
cs = (byte)(charset-256);
}
setCharSet(cs);
}
代码示例来源:origin: stackoverflow.com
HSSFFont hSSFFont = (HSSFFont) workbook.createFont();
hSSFFont.setFontName(HSSFFont.FONT_ARIAL);
hSSFFont.setCharSet(HSSFFont.ANSI_CHARSET);
代码示例来源:origin: stackoverflow.com
//Create the workbook, and the font
HSSFWorkbook wb;
HSSFFont wbFont;
wbFont=wb.createFont();
wbFont.setCharSet(HSSFFont.ANSI_CHARSET); //Your Character encoding goes in the parameter
//Establish cell styles
HSSFCellStyle cellStyle =wb.createCellStyle();
cellStyle.setFont(wbFont);
//We create our cells with our data and with our specified format
HSSFCell cell =null;
cell = row.createCell(1);
cell.setCellStyle(cellStyle);
cell.setCellValue("MY DATA");
//Do the rest for whatever you might need for your workbook and then you create it
代码示例来源:origin: stackoverflow.com
HSSFFont fontNew = workbookNew.createFont();
fontNew.setBoldweight(fontOld.getBoldweight());
fontNew.setCharSet(fontOld.getCharSet());
fontNew.setColor(fontOld.getColor());
fontNew.setFontName(fontOld.getFontName());
代码示例来源:origin: com.haulmont.yarg/yarg
newFont.setTypeOffset(cellFont.getTypeOffset());
newFont.setBoldweight(cellFont.getBoldweight());
newFont.setCharSet(cellFont.getCharSet());
newFont.setColor(cellFont.getColor());
newFont.setUnderline(cellFont.getUnderline());
代码示例来源:origin: cuba-platform/yarg
newFont.setTypeOffset(cellFont.getTypeOffset());
newFont.setBold(cellFont.getBold());
newFont.setCharSet(cellFont.getCharSet());
newFont.setColor(cellFont.getColor());
newFont.setUnderline(cellFont.getUnderline());
内容来源于网络,如有侵权,请联系作者删除!