Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
The following sample code uses the WorkbookMetadata class to edit custom document properties of a workbook. Once you open the workbook using the Workbook class, you will be able to read the document properties. Here is a sample code using the WorkbookMetadata class.
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
using namespace Aspose::Cells::Metadata;
using namespace Aspose::Cells::Properties;
int main()
{
Aspose::Cells::Startup();
U16String srcDir(u"..\\Data\\01_SourceDirectory\\");
MetadataOptions options(MetadataType::Document_Properties);
WorkbookMetadata meta(srcDir + u"Sample1.xlsx", options);
meta.GetCustomDocumentProperties().Add(u"test", u"test");
meta.Save(srcDir + u"Sample2.out.xlsx");
Workbook w(srcDir + u"Sample2.out.xlsx");
std::cout << w.GetCustomDocumentProperties().Get(u"test").ToString().ToUtf8() << std::endl;
std::cout << "Press any key to continue..." << std::endl;
std::cin.get();
Aspose::Cells::Cleanup();
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.