Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.
Thu Dec 03, 2020 10:37 am
Hello,
Thanks for your inquiry.
Please use this new way to convert Excel to PDF. If there are any questions, just feel free to contact us.
- Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile("test.xlsx");
foreach (Worksheet worksheet in workbook.Worksheets)
{
worksheet.PageSetup.Orientation = PageOrientationType.Landscape;
worksheet.PageSetup.PaperSize = PaperSizeType.PaperA4;
}
workbook.SaveToFile("123.pdf",Spire.Xls.FileFormat.PDF);
Sincerely,
Brian
E-iceblue support team
-
Brian.Li
-
- Posts: 1271
- Joined: Mon Oct 19, 2020 3:04 am
Thu Dec 03, 2020 12:41 pm
Works fine, thanks!
-
profiler007
-
- Posts: 72
- Joined: Wed Nov 13, 2019 11:32 am
Fri Dec 04, 2020 3:19 am
You are welcome.
If you encounter any issues related to our products in the future, please feel free to contact us.
Wish you all the best!
Sincerely,
Brian
E-iceblue support team
-
Brian.Li
-
- Posts: 1271
- Joined: Mon Oct 19, 2020 3:04 am