https://bz.apache.org/bugzilla/show_bug.cgi?id=65619

--- Comment #9 from hethal <hethal.j...@gmail.com> ---
Below here is the code that we tried on POI 5.0.0 and POI 4.1.2 as well and
were able to reproduce that the POI 5.0.0 added the extra slashes as attache d
in the jpg image.

Code:
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;

import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.CreationHelper;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.junit.Test;

public class TestPoi {

    @Test
    public void test () throws IOException {
        SXSSFWorkbook workbook = new SXSSFWorkbook();
        SXSSFSheet sheet = workbook.createSheet("Test Sheet 1");
        Font font = workbook.createFont();
        CellStyle cs = workbook.createCellStyle();
        cs.setFont(font);
        Row row = sheet.createRow(0);
        Cell cell = row.createCell(1);
        cell.setCellValue(new Date());
        cell.setCellStyle(cs);
        CreationHelper ch = workbook.getCreationHelper();
        cs.setDataFormat(ch.createDataFormat().getFormat("dd MMM yyyy
HH:mm:ss"));
        cs.setAlignment(HorizontalAlignment.RIGHT);
        FileOutputStream fos = new FileOutputStream("c:/temp/test.xlsx");
        workbook.write(fos);
        fos.close();
        workbook.close();
        workbook.dispose();
    }
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to