public static void ExportAllPagesToSingle()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_AsposePdf_DocumentConversion();
// Load PDF document
Document pdfDocument = new Document(dataDir + "input.pdf");
// ExStart:ExportAllPagesToSingle
// Instantiate ExcelSave Option object
Aspose.Pdf.ExcelSaveOptions excelsave = new ExcelSaveOptions();
// Set this property to true
excelsave.MinimizeTheNumberOfWorksheets = true;
// ExEnd:ExportAllPagesToSingle
// Save the output in XLS format
pdfDocument.Save("PDFToXLSExportAllPagesToSingle_out.xls", excelsave);
}
}