var byteKey = Convert.FromBase64String("xxxxxx"); //注册,实现去水印 new Aspose.Pdf.License().SetLicense(new MemoryStream(byteKey)); new Aspose.Cells.License().SetLicense(new MemoryStream(byteKey)); new Aspose.Words.License().SetLicense(new MemoryStream(byteKey)); new Aspose.Slides.License().SetLicense(new MemoryStream(byteKey)); string wordFile = "wordFile.docx"; string excelFile = "excelFile.xlsx"; string pptFile = "pptFile.pptx"; string pdfFile = "pdfFile.pdf"; Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(); workbook.Worksheets.Add(); workbook.Worksheets[0].Cells[1, 1].Value = "excelTest"; workbook.Save(excelFile); workbook.Save(wordFile, Aspose.Cells.SaveFormat.Docx); workbook.Save(pptFile, Aspose.Cells.SaveFormat.Pptx); workbook.Save(pdfFile, Aspose.Cells.SaveFormat.Pdf); Console.WriteLine("保存成功!");
示例代码不包含key,下面有获取key方法
office所有版本2003-2022,Pdf所有版本均支持。
加微信25489181,获取key