Hi, I followed your example here:
http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net/setting-headers-and-footers.html
and was hoping you could answer a couple questions.
First, I want to insert 2 lines with different fonts on the left side of the footer. How do I do this? Line feed? Can you post an example?
Also, I have multiple pages in my workbook, but the footer is only printing to the first one (i'm saving as a pdf, btw.)
Any help would be appreciated.
Hi,
Thanks for sharing the code
1) Please change your lines of code:
pageSetup.SetFooter(0, txt1 + " &“Trebuchet,Bold”&12"); //find out how to insert line feed
pageSetup.SetFooter(0, txt2 + " &“Trebuchet”&10");
to:
pageSetup.SetFooter(0, “&“Trebuchet,Bold”&12”+ txt1 + “\n&“Trebuchet”&10”+
txt2);
2)
I found no problem at all. Could you try the attached version and let us know if it works fine.
Thank you.
1) Thank you so much.
2) The offensive xls contains multiple sheets. The sheets are being converted propertly to pdfs, however the footer is only writing on the first sheet. Do you have an example that iterates over multiple sheets?
Thanks!
Hi,
Well, you don’t need to iterate the sheets as the sheets are automatically rendered to pdf in pages. Also, make sure that you have set footers to other sheets too. For your info, the headers/footers can be merged as the generated pdf would contain pages based on the sheets in the workbook. Could you post your template xls file here, we will check the conversion(Excel-to-Pdf) conversion and let you know soon.
Thank you.
Hi, thanks. I will do as you say. Please see attached file.
Thanks for your impressive responsiveness!
Hi,
Thanks for providing us the template file.
We found an issue doing the conversion(excel-to-pdf) using your template file, we will figure it out and get back to you soon.
Thank you.
Hi,
Please try the attached version. We have fixed your mentioned issue(s).
Thank you.
I tried it quickly with no luck – I will try again to verify.
I was using .net 2.0 – will this still be okay for my purposes?
I replaced the dll and the tlb files, removed the reference, added the reference back to the new dll (ver 4.8.0.8), and . . . nothing changed.
Any ideas?
Hi,
Thank you for considering Aspose.
Well, I tried the latest version of Aspose.Cells for .NET and converted your template file to PDF and it works fine. I have attached the generated PDF file and Aspose.Cells (.NET 2.0). Please try it and check if it works fine for you.
Thank You & Best Regards,
The generation of the pdf works for me. The issue has always been that the footer I’m adding only is added to the first sheet in the file. I want it to be added to all the sheets in the file. Again, the pdf generation is fine from my standpoint, but the addition of the footers only happens on the first sheet of the file (see above posts.)
Thanks.
Nevermind, I feel like there was a huge miscommunication. I have the file working. I iterated through the worksheets (something I asked previously, btw, and understood your response to be that I didn’t have to do that.) So, that solved the issue.