Aspose. Cells Export Excel

Source: Internet
Author: User

Aspose

Aspse. Cells can manipulate Excel and are not dependent on the system environment.

Using templates to output data sources by binding

This is suitable for non-specific format requirements, directly binding the data source. Is the same as a data-bound control.

New= Tablename;designer. Setdatasource (DT);d Esigner. Setdatasource ("title", title);d Esigner. Process ();
Designer. Workbook.save (filename);

As above, use a DataTable as the fill data source.

Progressive output through code

There are special requirements for the number, flexibility is strong. You can complete the merging of cells, and so on.

The first step, Workbook

New Aspose.Cells.Workbook ();

If you use a template, you can further open the template.

Wb. Open (Templetepath);

Step two, Worksheet.

Aspose.Cells.Worksheet sheet = wb. worksheets[0];

Step three, write the data

column]. Putvalue (value);
Output picture
var pictures = sheet. Pictures;
New System.IO.MemoryStream (byte[]));/* Set picture format, with cell width and height */
1]. Placement =1]. Height); sheet. Cells.setcolumnwidthpixel (column, width);

Aspose. Cells Export Excel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.