java设置excel单元格文本右对齐_java操作Excel的poi 设置单元格的对其方式

package com.java.poi;

import org.apache.poi.hssf.usermodel.HSSFCell;

import org.apache.poi.hssf.usermodel.HSSFCellStyle;

import org.apache.poi.hssf.usermodel.HSSFRichTextString;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import org.apache.poi.ss.usermodel.*;

import java.io.FileOutputStream;

/**

* 设置单元格的对其方式

* @author nidegui

* @create 2019-06-17 9:46

*/

public class Test6 {

public static void main(String[] args) throws Exception {

Workbook wb=new HSSFWorkbook();

Sheet sheet = wb.createSheet("创建sheet页");

Row row = sheet.createRow(2);//创建行

row.setHeightInPoints(30);

createCell(wb,row,(short) 0, (short)600,(short) 600);

FileOutputStream fileOutputStream=new FileOutputStream("E:\\3.xls");

wb.write(fileOutputStream);

你可能感兴趣的:(java设置excel单元格文本右对齐_java操作Excel的poi 设置单元格的对其方式)