Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells can be used to add custom properties to the workbook object that are visible inside the Document Information Panel. You can open the Document Information Panel in Microsoft Excel using File > Info > Properties > Show Document Panel menu commands.
Please use the Workbook.ContentTypeProperties.Add() method to add a custom property that will be visible in the Document Information Panel.
The following sample code adds two custom properties. The first property has no type, and the second property has the type DateTime. When you open the output Excel file generated by this code, you will see these two properties inside the Document Information Panel.
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-C
// Source directory path
U16String srcDir(u"..\\Data\\01_SourceDirectory\\");
// Create workbook object with specified format
Workbook workbook(FileFormatType::Xlsx);
// Add simple property without any type
workbook.GetContentTypeProperties().Add(u"MK31", u"Simple Data");
// Add DateTime property with type
workbook.GetContentTypeProperties().Add(u"MK32", u"04-Mar-2015", u"DateTime");
// Save the workbook
workbook.Save(srcDir + u"AddingCustomPropertiesVisible_out.xlsx");
std::cout << "Custom properties added successfully!" << std::endl;
Aspose::Cells::Cleanup();
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.