Alternative methods for C # to manipulate Excel

Source: Internet
Author: User

Objective

C # using a self-contained library (Excel 11.0/5.0 Object Library) to manipulate Excel has always been a problem, the most serious number of times the Excel process can not end this problem, operation is not very convenient. In fact, Excel used a little bit of friends know that Excel can be exported to HTML format files, I would like to say that here we should have a general understanding of the intent of this article, I do for you to do an example.

Environment

1. Microsoft Office Excel 2003

Body

I. Purpose

Export data from the database to Excel and lock some of the data to make no changes. Here, for example, student grade, student number, student name, student score three fields extracted from the database, and locked, the teacher evaluation column can be entered after export.

Second, realize

1. Make Excel "template"

Note that the template here does not refer to the template in Excel, which is primarily prepared for later export as HTML.

1.1 New Excel, name is Student score sheet. xls.

1.2 Set column name columns, format fonts and other information, the final form of the format, as shown:

How to freeze a window: for example, to freeze the first row, select the first cell in the second row, the toolbar-> the window-> the window.

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.