gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
use aspose-cells-21.11 convert excel to pdf output
- User
use aspose-cells-21.11 convert excel to pdf output
- Assistant
As an AI language model, I can guide you on how to use Aspose.Cells to convert an Excel file to a PDF and provide a sample code. You can use the following code example in C# to convert an Excel file to a PDF using Aspose.Cells version 21.11:
string sourceFile = "input.xlsx"; string outputFile = "output.pdf"; // Load the Excel file Workbook workbook = new Workbook(sourceFile); // Save the PDF file workbook.Save(outputFile, SaveFormat.Pdf);In the above code example, you need to replace the
sourceFileandoutputFilestrings with your actual file paths.Please also note that you need to have the Aspose.Cells library added to your project as a reference to be able to use the above code.