Hi, support:
What is the method to save each sheet as pdf?
Thanks for your help.
Hi, support:
What is the method to save each sheet as pdf?
Thanks for your help.
There is no method to directly save each sheet to pdf.
You can hide all the worksheets except the worksheet that you want to save to pdf, then save workbook to pdf.
Code:
Workbook wb = new Workbook(srcFile);
for(int i = 0; i < wb.Worksheets.Count; i++)
{
wb.Worksheets[i].IsVisible = true;
for(int j = 0; j < wb.Worksheets.Count; j++)
{
// save worksheet i to pdf
//hide all the worksheets except worksheet i
if(j != i)
{
wb.Worksheets[j].IsVisible = false;
}
}
wb.Save(wb.Worksheets[i].Name + ".pdf");
}