c# - Convert a list of excel sheets (sheet name list provided) into a single PDF file -
i need add selected set of sheets pdf using microsoft.office.interop.excel library in c#. have been searching throught net figure out how this. haven't been able find helpful. can me this. found following statement convert given sheet pdf. looks like, cannot append list of excel sheets 1 pdf when provide sheet names.
xlws.exportasfixedformat(excel.xlfixedformattype.xltypepdf, endpath);
help please.
you can use worksheet.exportasfixedformat method.
example:
string exportfilepath = @"c:\desktop\test.pdf"; activeworksheet.exportasfixedformat(xlfixedformattype.xltypepdf, exportfilepath);
or can use workbook.exportasfixedformat method
string exportfilepath = @"c:\desktop\test.pdf"; activeworksheet.exportasfixedformat(xlfixedformattype.xltypepdf, exportfilepath);
references:
Comments
Post a Comment