C # winform Development Series-Excel

Source: Internet
Author: User

01. Only use dataset to import data to excel

[Translation]

Senthil S: export data to excel using dataset only

[Introduction]

At present, there are already a lot of ways to import data to excel files on the Internet, but most of them are complicated, and most of them use DataGrid or able. This article describes the simplest method: export data to excel only using dataset.

[Background]

Dataset is very convenient from the perspective of simplicity of code usage. However, from the perspective of code optimization, it is no longer suitable :)

02. Quickly save a large amount of data in the listview memory to excel

Quickly save a large amount of data in listview memory to excel
Fast save data from listview to Excel worksheet
Remex1980 was originally created on 19:59:27
Original Author: remex1980


Introduction

This article describes how to quickly save a large amount of data in the listview memory to the Excel worksheet. The key is to use range to store multiple rows and multiple columns of data at a time.

03. Excel reader with pure C # code (the Office excel com component is not required)

[Translation]
Liu Junfeng, Excel Reader

[Introduction]

This Linked Library is based on the following articles. Thanks very much to their authors:

Composite document format
Excel File Format
Microsoft Office 97 drawing file format

This document describes the record structures in biff8/biff8x format.

Function

1. Read all the worksheets in the workbook.
2. Read all the units in the worksheet.
3. Read the unit content (text, number, date or error)
4. Read unit format (font, alignment, line type, background, etc)
5. Read the image in the file to obtain the image size, position, data, and format.

04. Merge batch Excel Data (C # Operate Excel files)

Purpose:

Help the counselor fill out a Data Survey, 1 xls file, 10 worksheet, each containing 10-40 data items, 37 persons in each class, and 24 classes in the school. It takes a lot of time to enter individual data.

You can send the form to everyone at the same time, and then fill it out and send it back together, put it in the same directory or other locations, use this program to introduce it, set it, and click batch processing, you can get a merged file later.

# Indicates automatically identifying the number of rows and columns.

Programming:

Encapsulate the Excel operation code in the class. You can call the class method to perform various operations. The class can open several Excel files at the same time and assign values to each other internally.

The default 1-10 worksheet is because 12 tables are created for our counselor. The first 10 tables need to be summarized. The last two tables are encoded tables and cannot be modified, the program also supports the automatic judgment of 1-#, but this time is 1-12, will change the content of the encoding table 1 and encoding table 2, but the counselor clamored for trouble, set 1-10 to the default attribute so that she can click Import once ...... To meet special requirements

When advanced is enabled
Reference row value -- determines the column width based on non-null content of a row
Reference column value -- determines the number of records based on non-null conditions of a column

The row range is 2-#, which indicates that the row is from the second row to the last row.

Content to be improved:

1. Cancel the maximize button and disable the form from changing the size. Or you can redesign the interface to adapt to the changes in the form.
2. Save as follows: it is best to add a save file dialog box in the input box.
3. No exception is handled during programming.
4. UI beautification
5. Add about and help
6. other user-friendly functions
(1) determine the table structure and provide suggested configuration Solutions
(2) check whether the data structure in the import list is consistent. If the data structure is inconsistent, check whether the data is forcibly merged.
(3) Use the last setting when you open it again.

05. Generate the xls file directly through the file structure

The xls file is generated directly using the file structure that can be recognized in Excel, so that you do not need to reference the troublesome Ole.

06. Generate XLS files directly using an identifiable XML structure in Excel

The previous article demonstrated how to generate XLS files based on the simple Excel file structure. If complicated operations such as merging and formulas are involved, you can use the XML structure to directly construct XLS files, for example, generate the following file:

 

07. asp: four ways to export Excel Data

08. Some Experience in calling EXCEL with Asp.net and outputting it

09. asp Excel operation Technical Summary

10. Excel integration as needed

Recently, some projects are integrated with Excel. The problem is as follows:

How to operate in win

How to handle the Excel Process

How to Create addin

How to apply in the Web

Other ..

11. C # implement mailmerge function for word to join Excel

12. Use xmlreader to read Excel 2007 files

13. openxml: insert barchart chart in Excel

14. vsto --- Excel programming [To be continued] [updated on April 9, December 5, see the following documentation]

15. How to read EXCEL from ADO. Net (on)

16. How to read EXCEL from ADO. Net (below)

17. Another method for exporting Excel

18. Lullaby's blog use oledb to import EXCEL to Dataset

In this method
All sheet data in the Excel file is filled in the dataset. This is a simple and quick method. The disadvantage is that it is not suitable for formats.
Excel.Read the full text

19. How can I import data into Excel by dataset?

This topic describes how to import a dataset
Data in Quick import to excel.Read the full text

20. Operations on Excel in kissknife C #

21. How to automate Microsoft Excel in Microsoft Visual C #. net

22. Excel Object Model Overview

23. Cure C # edit Excel Development Report Series

Abstract: C # has written eight articles in the report development series using Excel, and there have been no new things for a long time. Now, you can sort them out for future reference. If there is a new one, will be updated at the same time. Read the full text

Currently, commercial tools such as Crystal Reports and activereport provide flexible and powerful functions. However, for more specialized tables, especially some domestic applications, they are all made up of grids, in this way, it is troublesome to use a line to draw a root image. However, such tools do not provide a table-based report layout definition method. A good choice is the vs2005 client report (rdlc), but it is not flexible enough in some aspects. For example, there are restrictions on flexibility. It is still difficult to implement complicated logic by coding by yourself; for vs2005, only eye-catching copies are available for some projects that are still using vs2003. Excel is used to achieve flexible page layout design and more flexible and accurate data operations using code.

 

C # I have written eight articles in the report development series using Excel, and there have been no new things for a long time. Now I want to sort them out for future reference. If there is a new one, it will be updated at the same time.
Note that the actual code may be different because the office version is different, but there are several more, with a few fewer parameters. Add the system. reflection. Missing. Value parameter.

Applying EXCEL to report development (1) -- start

Use C # and Excel for report development (2)-operation Statistical Chart (chart)

Use C # and Excel for report development (3)-generate a chart)

Use C # and Excel for report development (4)-copy Cells

Use C # and Excel for report development (5)-operate cell borders and colors

Use C # and Excel for report development (6)-operation rows and columns

Use C # and Excel for report development (7)-set the display format of cells

Use C # and Excel for report development (8)-use a program to bind a data source

24. Several Methods for exporting (original) DataGrid data to an Excel file and downloading it to the client

25. Special Recommendation: generate an Excel file directly using pure VB. NET Code (No Excel is required)

26. Help class for exporting DataGrid to excel

27. How to close the Excel process after the Excel component is used up

28. SQL Server table and Excel and access data export

29. Several Questions about Excel operations using DCOM in ASP. NET

30. Data Conversion Between SQL Server and access and Excel

31. Summary of Excel export Methods

32. How to import Excel Data to SQL Server

33. Open an Excel template file and save the filled data as a file

34. I wrote Asp.net to operate an Excel class library excelhelper (source code download)

35. Use ado.net to convert data to Excel format and provide download

36. Asp.net Excel Operation Summary

37. about exporting EXCEL from Asp.net

38. C # Excel operations

39. Download Excel and VBA program design

40. learn Excel skills

41. Use VBA in Excel to filter data

42. DOI: obtain the data of the cell selected in Excel.

43. Excel Programming

44. How to EMBED Excel in Form

45. Efficiency of using COM to automatically call Excel

46. Excel-based Web report output component

47. I have been working on C # office recently! To sum up! (1) Excel

48. Asp.net

49. Merge Excel Cells

50. Merge multiple consecutive columns of the same data items in 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.