Hi,
Thank you for your inquiry.
Please set the first parameter in the red box of the following figure to false, which means that conversion to multiple worksheets is not allowed.
98A72880-E929-48cb-B154-6CC28DEB9B1E.png
I put the complete code below for your referenece:
- Code: Select all
// Create a new PdfDocument object
PdfDocument pdf = new PdfDocument();
// Specify the path of the PDF file to be converted
string PDFFile = @"E:\test\1.pdf";
// Load the PDF file into the PdfDocument object
pdf.LoadFromFile(PDFFile);
// Create a new XlsxLineLayoutOptions object with specified options
XlsxLineLayoutOptions xlsxLineLayoutOptions = new XlsxLineLayoutOptions(false, true, true);
// Set the conversion options for the PdfDocument object
pdf.ConvertOptions.SetPdfToXlsxOptions(xlsxLineLayoutOptions);
// Specify the path and format of the resulting Excel file
string ExcelFile = @"E:\test\PdfToXlsxOptions_results1.xlsx";
// Save the converted PDF file as an Excel file
pdf.SaveToFile(ExcelFile, Spire.Pdf.FileFormat.XLSX);
If you have any issue just feel free to contact us.
Sincerely,
Ula
E-iceblue support team
Login to view the files attached to this post.