Aspose

How to insert programmatically a new line in an Excel cell in C#?

自古美人都是妖i 提交于 2019-12-18 12:12:36
问题 I'm using the Aspose library to create an Excel document. Somewhere in some cell I need to insert a new line between two parts of the text. I tried "\r\n" but it doesn't work, just displays two square symbols in cell. I can however press Alt+Enter to create a new line in that same cell. How do I insert a new line programmatically? 回答1: From the Aspose Cells forums: How to use new line char with in a cell? After you supply text you should set the cell's IsTextWrapped style to true worksheet

Aspose.words一 DOM结构

牧云@^-^@ 提交于 2019-12-18 09:52:20
2.文档对象模型概述 2.1 DOM介绍 Aspose.Words的文档对象模型(以下简称DOM)是一个Word文档在内存中的映射,Aspose.Words的DOM可以编程读取、操作和修改Word文档的内容和格式。理解DOM的结构和相应的类型,是使用Aspose.Words灵活编程的基础,这一点非常重要。下面的一个Word文档例子和其结构如下图所示: 当上述文档被Aspose.Words的DOM读取时,会创建如下结构的树形对象: 从上图的结构和对应的Word文档,我们可以看到大概的DOM中相关对象的结构,有了这些基本概念,就可以很流程的操作Word文档了。Document, Section, Paragraph, Table, Shape, Run 以及图中的其他椭圆形的都是Aspose.Words对象,这些对象具有树形的层级结构,图中的注释同样说明这些文档对象树中的对象具有多个属性。 Aspose.Words中的DOM有以下特点: 1.所有的节点(node)类最终都继承于Node类,它是Aspose.Words DOM的基本类型。 2.节点可以包含(嵌套)其他节点,例如Section和Paragraph都继承自CompositeNode类,而CompositeNode类来源与Node类。 2.2 Node类型 当Aspose.Words读取Word文档到内存中时

基于Aspose的doc、xls、pdf格式转换

丶灬走出姿态 提交于 2019-12-16 02:14:31
using Aspose . Slides ; namespace AsposeDLL { /// <summary> /// doc、xls、pdf格式转换 /// </summary> class FormatConversionClass { /// <summary> /// Doc转Pdf /// </summary> /// <param name="docPath">doc路径</param> /// <param name="pdfPath">pdf路径</param> public static void ConverDocToPdf ( string docPath , string pdfPath ) { //打开word文档,将doc文档转为pdf文档 Aspose . Words . Document doc = new Aspose . Words . Document ( docPath ) ; if ( doc != null ) { doc . Save ( pdfPath , Aspose . Words . SaveFormat . Pdf ) ; } } /// <summary> /// Xls转Pdf /// </summary> /// <param name="xlsPath">xls路径</param> /// <param

基于Aspose Excel导出和导入

久未见 提交于 2019-12-15 11:50:38
using Aspose . Cells ; using System ; using System . Collections . Generic ; using System . Data ; using System . Linq ; using System . Text ; using System . Windows . Forms ; namespace AsposeDLL { public class Aspose_Excel { /// <summary> /// 数据表导出Excel /// </summary> /// <param name="data">数据表</param> /// <param name="filepath">导出路径</param> /// <returns></returns> public static bool ExportExcelWithAspose ( System . Data . DataTable data , string filepath ) { try { if ( data == null ) { MessageBox . Show ( "数据为空" ) ; return false ; } //Aspose.Cells.License li = new Aspose.Cells.License(); /

你知道将DOC格式序列化为字节数组最简单方法吗?来看看Aspose.Words API如何处理

陌路散爱 提交于 2019-12-15 07:38:19
Aspose.Words for .Net 是一种高级Word文档处理API,用于执行各种文档管理和操作任务。API支持生成,修改,转换,呈现和打印文档,而无需在跨平台应用程序中直接使用Microsoft Word。 Aspose.Words API提供了将Microsoft Word文档从DOC或DOCX格式序列化为字节数组的最简单方法。将文档存储到数据库中和/或从数据库中检索时,将Word文档转换为字节数组很有帮助。 .NET的Aspose.Words可用于转换Document对象,以获取表示任何.NET应用程序中Document的字节数组。以下代码段演示了DOC文件到字节数组的转换。 // Load the document from disk. Document doc = new Document("Sample.doc"); // Create a new memory stream. MemoryStream outStream = new MemoryStream(); // Save the document to stream. doc.Save(outStream, SaveFormat.Docx); // Convert the document to byte form. byte[] docBytes = outStream.ToArray(); //

Server side library for conversion of office files to pdf with added stamp/watermark

蓝咒 提交于 2019-12-13 17:14:00
问题 I need to take Word, Excel, PowerPoint and Visio files and convert them to PDF on the server side using C#. At some point before or after the PDF conversion, the clients want a stamp/watermark to be added to the corner of the document (assuming, for now, on every page). I cannot use Office products in the process, as there are licensing and stability issues involved with using "interop" server-side. Also, I would rather not depend on any other installed software on the server for similar

Send multiple pdf files from one folder to printer. ASPOSE.PDF. C#

泪湿孤枕 提交于 2019-12-13 04:43:47
问题 I'm trying to send multiple files from one folder to printer. Now, I can send just one file from folder to printer. However I want to print the files from the folder. I'm using ASPOSE.PDF I was trying to modify the following code but without success: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Aspose.Pdf; using System.Drawing; using Aspose.Pdf.Facades; namespace Printer class Program { static void Main(string[] args

Aspose.Cells Smart markers 基于模板导出Excel

旧街凉风 提交于 2019-12-12 22:31:59
Aspose.Cells可以预先定义Excel模板,然后填充数据(官方文档:http://www.aspose.com/docs/display/cellsjava/Smart+Markers)。 设置的模板是一个标准的Excel文件,包含了可视化的格式,公式,以及标记(smart markers),并且可以引用多个数据源。 支持的标记(Smart Marker Options) &=DataSource.FieldName 数据元是ICellsDataTable或者是JavaBean &=[Data Source].[Field Name] 数据源是 ResultSet &=$VariableName 一个变量 &=$VariableArray 数组变量 &==DynamicFormula 暂时不清楚 &=&=RepeatDynamicFormula 动态计算 下面介绍这两种标记的使用方式 1、&=$VariableName 一个变量 2、&=$VariableArray 数组变量 Java代码      String path = "SmartMarkerDesigner.xls"; InputStream inputStream = ClassLoader.getSystemResourceAsStream(path); Workbook wb = new Workbook

支持ECDSA算法!Java版Aspose.Words迎来12月版本升级!

感情迁移 提交于 2019-12-12 16:59:29
Aspose.Words for Java 是功能丰富的Word处理API,允许开发人员在不使用Microsoft Word的情况下嵌入在自己的Java应用程序中生成,修改,转换,呈现和打印文档的功能。 很高兴与大家分享Java平台的Aspose.Words迎来了2019最后一次更新,该版本支持椭圆曲线数字签名算法(ECDSA),支持“截断字体高度” MS-Word兼容性选项,当然与.NET版本一样,实现了转换为PDF 1.7标准。接下来,我们一起来聊聊新版本的新功能。(下载地址请查看评论) 主要特点 现在支持椭圆曲线数字签名算法(ECDSA)。 Aspose.Words.Shaping.Harfbuzz插件,用于基于x86 Unix的环境。 现在支持“截断字体高度” MS-Word兼容性选项。 Document(BufferedInputStream)错误已修复。(为了提高性能,无论如何最好使用Document(String))。 JavaDoc错误修正和更新。 现在支持转换为PDF 1.7标准。 现在,在Windows10上使用SystemFontSource时,支持用户安装的字体。 书签的新公共属性被公开。 OLE对象数据公开给公共API。 LINQ Reporting Engine通过关系名称提供对相关DataTable的访问。 新增与改善 key 概述 类别

终于可用ECDSA算法啦!Java版Aspose.Words v19.12多项新功能来啦

橙三吉。 提交于 2019-12-12 16:27:46
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Aspose.Words for Java ( 点击下载 )是功能丰富的Word处理API,允许开发人员在不使用Microsoft Word的情况下嵌入在自己的Java应用程序中生成,修改,转换,呈现和打印文档的功能。 很高兴与大家分享Java平台的Aspose.Words迎来了2019最后一次更新,该版本支持椭圆曲线数字签名算法(ECDSA),支持“截断字体高度” MS-Word兼容性选项,当然与.NET版本一样,实现了转换为PDF 1.7标准。接下来,我们一起来聊聊新版本的新功能。(下载地址请查看评论) 主要特点 现在支持椭圆曲线数字签名算法(ECDSA)。 Aspose.Words.Shaping.Harfbuzz插件,用于基于x86 Unix的环境。 现在支持“截断字体高度” MS-Word兼容性选项。 Document(BufferedInputStream)错误已修复。(为了提高性能,无论如何最好使用Document(String))。 JavaDoc错误修正和更新。 现在支持转换为PDF 1.7标准。 现在,在Windows10上使用SystemFontSource时,支持用户安装的字体。 书签的新公共属性被公开。 OLE对象数据公开给公共API。 LINQ Reporting