Hi,
I’m trying to evaluate the Aspose.PDF.
Please find below the flow I’m testing:
- Create simple Excel with a simple table in it
- Save the Excel to Pdf (using MS Excel).
- Try to convert the Pdf back to Excel using Aspose APIs
The problem is that the created Excel (in #3) is corrupted, some cells are joined and the table format is not kept.
Please find attached the tested example:
AsposePdfToExcel.zip (89.4 KB)
The (c#) code I created for the conversion is:
static void Main(string[] args)
{
Document pdfDocument = OpenPdfDocument(@“PdfFromExcel.pdf”);
ConvertPdfToExcel(pdfDocument, @“ExcelFromPdfByAspose.xlsx”);
}
public static Document OpenPdfDocument(string pdfFileName)
{
var pdfDocument = new Aspose.Pdf.Document(pdfFileName);
return pdfDocument;
}
public static void ConvertPdfToExcel(Document pdfDocument, string excelFileName)
{
var excelSaveOptions = new ExcelSaveOptions();
pdfDocument.Save(excelFileName, excelSaveOptions);
}
So the question is whether I’m doing something wrong?
Is this simple example can be save from PDF to Excel using Aspose?
Thanks in advance,
Ori