Hi team,
we are using aspose cells 2.5.4.17.jar for excel generator.
i am trying to apply the date format on column using style and styleflag.
but the values are not converted to the required date.
please find the attached code and csv file.
code:
-----
import com.aspose.cells.;
import java.util.;
public class pivottest1
{
public pivottest1()
{
}
public static void main(String[] args)
{
try{
Workbook workbook = new Workbook();
workbook.open(“D:\Aspose Files\1008253_693_1.csv”,FileFormatType.CSV);
Style style = workbook.createStyle();
style.setCustom(“dd-mmm-yy”);
StyleFlag styleFlag = new StyleFlag();
styleFlag.setAll(true);
workbook.getWorksheets().getSheet(0).getCells().getColumns().getColumn(4).applyStyle(style,styleFlag);
workbook.save(“D:\Aspose Files\693.xlsx”,FileFormatType.XLSX);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
Thanks & regards.
Ranjith.
Hi,