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.
Tue Nov 25, 2014 11:37 am
When I save a workbook as a PDF, the gridlines and row/column headers are still showing in the pdf even though I set the visibility to false:
- Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"C:\temp\Test1.xlsx", ExcelVersion.Version2010);
Worksheet worksheet1 = workbook.Worksheets[0];
worksheet1.GridLinesVisible = false;
worksheet1.RowColumnHeadersVisible = false;
workbook.SaveToFile(@"C:\temp\Test1.pdf", Spire.Xls.FileFormat.PDF);
How do I make the gridlines and row/column headers not show in the pdf?
-
Jon
-
- Posts: 6
- Joined: Tue Nov 25, 2014 9:33 am
Tue Nov 25, 2014 2:05 pm
I figured it out. You need to turn off Gridlines and Headings for Print in the Workbook page setup.
- Code: Select all
worksheet1.PageSetup.IsPrintGridlines = false;
worksheet1.PageSetup.IsPrintHeadings = false;
-
Jon
-
- Posts: 6
- Joined: Tue Nov 25, 2014 9:33 am
Wed Feb 25, 2015 6:43 am
Hello Jon,
Please feel free to contact us if you have any questions.
Best Regards,
Burning
E-iceblue Support Team
-
burning.liu
-
- Posts: 406
- Joined: Mon Aug 04, 2014 6:47 am