We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Saving a new Workbook does not populate "app.xml"

Hello,

When creating a new Workbook from Aspose Cells and saving it, the content in the app.xml file (within the internal structure of the XLSX) is not populated with expected metadata. We rely on the app.xml within a given OpenOfficeXML file to discover the document type (eg. Word, Excel, PPT, etc). However, when we create a new Workbook from Aspose Cells, this information is not populated.

Steps to reproduce:

  1. Using the latest version of Cells, create and save a new Workbook - for example:

    Workbook wb = new Workbook();
    wb.save("AsposeDefault.xlsx");
    
  2. Using a ZIP file viewer, open the newly saved WorkbookAsposeDefault.xlsx file and then open the ‘docProps’ folder.

  3. Extract or view the "app.xlm" file and notice that the “Application” node is empty: <Application />

When you save a new Workbook from Excel, the “Application” node reads:
<Application>Microsoft Excel</Application>

Thanks

@oraspose,

Thanks for the details.

We have tested your scenario/case a bit and noticed the behavior (i.e, “Application” node is empty) as you mentioned. If we perform the same thing in MS Excel manually, MS Excel writes the node in “\docProps\app.xml” as following:
<Application>Microsoft Excel</Application>
Do you need us to write the node as following:
<Application>Aspose.Cells</Application>

After your confirmation, we will log a ticket for investigation and look into it soon.

Hi Amjad.

Thanks for your prompt response. Currently we look for <Application>Microsoft Excel</Application> but we can certainly work with <Application>Aspose.Cells</Application>.
Is there a standard Office Open XML convention for this particular item?

@oraspose,

I have logged a ticket with an id “CELLSJAVA-42639” for your requirements. We will investigate and look into it if we support your needs. The ticket is logged as following:
CELLSJAVA-42639 - Saving a new Workbook does not populate details for "<Application>" node in "\docProps\app.xml"

Once we have an update on it, we will let you know here.

@oraspose,

Please set BuiltInDocumentProperties.NameOfApplication by yourself in code. See the following codes for your reference:
e.g
Sample code:

 Workbook wb = new Workbook();
		 wb.getBuiltInDocumentProperties().setNameOfApplication("Aspose.Cells"); 

Let us know if you still find any issue.