Open barluc opened 4 years ago
bool CPdfManager::ConvertToXls(const TCHAR szPdfPath, const TCHAR szSavePath) { log_info_t(_T("ConvertToDocx:%s..."), szPdfPath);
System::String srcPath = ToSystemString(szPdfPath);
System::String dstPath = ToSystemString(szSavePath);
try
{
auto doc = MakeObject<Document>(srcPath);
SharedPtr<ExcelSaveOptions> options = MakeObject<ExcelSaveOptions>();
options->set_Format(ExcelSaveOptions::ExcelFormat::XLSX);
doc->Save(dstPath, options);
doc->FreeMemory();
}
catch (std::exception& e)
{
//There are always exceptions: System::ArgumentOutOfRangeException,why???
//doc,docx is OK!
log_info("%s FAIL! %s\n",__FUNCTION__,e.what());
return false;
}
log_info_t(_T("ConvertToXls SUCCESS!\n"));
return true;
}
@barluc ,
We are sorry for the delayed response. Were you able to get a resolution for this? If not, please post your query in Aspose.PDF forum along with your sample input files to get technical assistance from our team.