Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells provides Workbook.getContentTypeProperties() method to add custom ContentTypeProperties to an Excel file. You may also make the property optional by setting the ContentTypeProperty.isNillable() property to true. The following code snippet demonstrates adding optional custom ContentTypeProperties to an Excel file. The following image shows both properties that were added by the sample code.

The output file generated by the sample code is attached for reference.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
//source directory
const outputDir = path.join(__dirname, "output");
const workbook = new AsposeCells.Workbook(AsposeCells.FileFormatType.Xlsx);
let index = workbook.getContentTypeProperties().add("MK31", "Simple Data");
workbook.getContentTypeProperties().get(index).setIsNillable(false);
index = workbook.getContentTypeProperties().add("MK32", new Date().toISOString(), "DateTime");
workbook.getContentTypeProperties().get(index).setIsNillable(true);
workbook.save(path.join(outputDir, "WorkingWithContentTypeProperties_out.xlsx"));
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.