当前位置:网站首页>C reads excel specific data into specific columns of DataGridView
C reads excel specific data into specific columns of DataGridView
2022-04-23 21:25:00 【Plant a sweet smell】
C# Read Excel Specific data to DataGridView In a specific column of
1. Studying recently DataGridView Read Excel When , I found that I read more data every time , I didn't read what I wanted excel Column data , Baidu has not found what it wants . Then I was checking DataGridView When the column attribute of DataPropertyName This attribute .
2.DataPropertyName The attribute of means : Gets or sets the properties of the data source or the name and address of the database column DataGridView binding .
1. The interface operation binding is as follows :
Let the columns you add DataPropertyName And Excel Your column name is always ok 
2. The code operation is as follows :
DataGridView And get Excel Of DataTable If the column properties of are consistent .
DataGridView.Columns["ColMac"].DataPropertyName = dt.Columns["MAC"].ColumnName;
There are many pits on the way to beginner's school , I hope these will help you . Encourage them together !
版权声明
本文为[Plant a sweet smell]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/110/202204200619557349.html
边栏推荐
- [leetcode refers to the maximum profit of offer 63. Stock (medium)]
- Normalized transforms in pytorch The real calculation process of normalize
- Question brushing plan - depth first search (II)
- Fastdfs mind map
- Crisis is opportunity. Why will the efficiency of telecommuting improve?
- [※ leetcode refers to offer 48. The longest substring without repeated characters (medium)]
- [leetcode refers to offer 21. Adjust the array order so that odd numbers precede even numbers (simple)]
- Solve importerror: cannot import name 'imread' from 'SciPy misc‘
- 在线Excel转CSV工具
- UKFslam
猜你喜欢
![[leetcode refers to offer 18. Delete the node of the linked list (simple)]](/img/ee/1a546e2383948ad9a4ce69b4508e90.png)
[leetcode refers to offer 18. Delete the node of the linked list (simple)]

Display, move, rotate

Question brushing plan - depth first search (II)
![[leetcode refers to the maximum profit of offer 63. Stock (medium)]](/img/37/478b53696f9327b7d435cdd887dd57.png)
[leetcode refers to the maximum profit of offer 63. Stock (medium)]

ROS学习笔记-----ROS的使用教程

IIS cannot load * woff,*. woff2,*. Solution of SVG file

The more you use the computer, the slower it will be? Recovery method of file accidental deletion
![[※ leetcode refers to offer 48. The longest substring without repeated characters (medium)]](/img/fa/99b64267fd890c6c40847548f077b3.png)
[※ leetcode refers to offer 48. The longest substring without repeated characters (medium)]

Recommended usage scenarios and production tools for common 60 types of charts

Google tries to use rust in Chrome
随机推荐
Yolov5 NMS source code understanding
Assertionerror: invalid device ID and runtimeerror: CUDA error: invalid device ordinal
[※ leetcode refers to offer 32 - II. Print binary tree II from top to bottom (simple)]
How Axure installs a catalog
C#,打印漂亮的贝尔三角形(Bell Triangle)的源程序
Addition, deletion, modification and query of advanced MySQL data (DML)
[leetcode refers to offer 22. The penultimate node in the linked list (simple)]
Pyuninstaller package exe cannot find the source code when running, function error oserror: could not get source code
Two Stage Detection
DW basic tutorial (I)
Common problems in deploying projects with laravel and composer for PHP
Tencent cloud has two sides in an hour, which is almost as terrible as one side..
Google tries to use rust in Chrome
Detectron2 using custom datasets
MySQL basic collection
Deno 1.13.2 发布
Factory mode
[leetcode refers to offer 21. Adjust the array order so that odd numbers precede even numbers (simple)]
Subcontracting of wechat applet based on uni app
The more you use the computer, the slower it will be? Recovery method of file accidental deletion