When trying to implement Aspose sample code below I'm getting System.UnauthorizedAccessException because it's trying to save to a forbidden directory.
I have a known server path to output this file correctly, but I didn't find how to setup Aspose on this server path. How can I set the output directory?
public JsonResult ConvertPDFtoXLSX(FormCollection formCollection)
{
var inputFile= Request.Files[0];
// load PDF with an instance of Document
var document = new Document(inputFile.InputStream);
// save document in XLS format
document.Save("output.xlsx", new ExcelSaveOptions());
return Json(new
{
success = true,
}, JsonRequestBehavior.AllowGet);
}
Solution was simply replace
"output.xlsx"with the complete server path (filename included).