Hi Team,
Iam trying to read data from Excel and convert it into PDF.
The data in excel is getting scattered (as per columns) in the converted PDF
string filePath = “~/Test File 2.xlsx”;
FileStream excelStream = new FileStream(filePath, FileMode.Open, FileAccess.Read);
FileStream pdfStream = new FileStream(filepath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
Workbook workbook = new Workbook(excelStream);
Aspose.Cells.PdfSaveOptions saveOptions = new Aspose.Cells.PdfSaveOptions(Aspose.Cells.SaveFormat.Pdf);
saveOptions.OnePagePerSheet = true;
saveOptions.AllColumnsInOnePagePerSheet = true;
workbook.Save(pdfStream, Aspose.Cells.SaveFormat.Pdf);
excelStream.Close();
pdfStream.Close();
Please let me know how to fix this issue.
Thanks in advance.