Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert pdf to xls exception,how to fix it??? #3

Open
barluc opened this issue Dec 26, 2019 · 2 comments
Open

convert pdf to xls exception,how to fix it??? #3

barluc opened this issue Dec 26, 2019 · 2 comments

Comments

@barluc
Copy link

barluc commented Dec 26, 2019

111

@barluc
Copy link
Author

barluc commented Dec 26, 2019

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;

}

@kashifiqb
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants