Free Support Forum - aspose.com

Properties are missing when document is saved in Excel2007 format

Hello!

We are planning to use Aspose Cells for the workbooks’ properties population. Aspose does the processing (evaluation notification exits), but properties are missing when using 2007 format. 2003 format works fine. We have faced similar problems also with the Aspose.Slides (<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

<![endif]–><span style=“font-size: 12pt; font-family: “Times New Roman”,“serif”;”>Presentation properties are not working)
.

public class CellDemo {
public static void main (String [] arg){
Workbook workbook = new Workbook();
try {
workbook.open(“C:/temp/test_xls.xls”);
} catch (IOException e) {
e.printStackTrace();
}
try {
workbook.getWorksheets().getBuiltInDocumentProperties().setCompany(“Company Test!”);
} catch (Exception e1) {
}
CustomDocumentProperties customProperties = workbook.getWorksheets().getCustomDocumentProperties();
customProperties.add(“Test”, “Test”);
try {
workbook.save(“C:/temp/test_xls_out.xls”,FileFormatType.EXCEL2003);
} catch (IOException e) {
e.printStackTrace();
}
try {
workbook.save(“C:/temp/test_xlsx_out.xlsx”,FileFormatType.EXCEL2007);
} catch (IOException e) {
e.printStackTrace();
}
}
}

Jaakko

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells for Java. I checked your issue with the attached version and it works fine (Please check the attached output file).

Thank You & Best Regards,

Yeah! This version seems to be working perfectly fine!

Jaakko