Home > Net >  VB.NET how to merge cells show will Excel in DataGridView?
VB.NET how to merge cells show will Excel in DataGridView?

Time:10-10

Such as title, I am going to put in an Excel spreadsheet data displayed in the DataGridView, this table has a combined unit, but I use a DataGridView finish shows a grid is a grid, without merge cells, a great god please help instruct me, thank you!

CodePudding user response:

refer to the original poster qq_21681433 response:
, such as title, I am going to put an Excel spreadsheet in DataGridView, according to data in this table are merging unit, but I use a DataGridView finish shows a grid is a grid, without merge cells, a great god please help instruct me, thank you!

DataGridView to processing, excel merger does not represent the import is the gridview is ah

CodePudding user response:

See I write the
10 - vb.net tutorial 2 Excel operation 1 Excel file open
10 - vb.net tutorial 2 Excel operation 2 Excel file save
10 - vb.net tutorial 2 Excel operation 3 view multiple worksheet
10 - vb.net tutorial 2 Excel 4 relatively complete work table operation

CodePudding user response:

refer to the second floor UruseiBest response:
you can see I write the
10 - vb.net tutorial 2 Excel operation 1 Excel file open
10 - vb.net tutorial 2 Excel operation 2 Excel file save
10 - vb.net tutorial 2 Excel operation 3 view multiple worksheet
10 - vb.net tutorial 2 Excel 4 relatively complete worksheet operation

Tutorial is very good and very practical, praise a! But I still have even have a small problem, please have a look at an empty cell judge this statement, my empty cell is zero, so the If IsNothing (Wsheet. Cells (1, I) Value) this sentence should be changed to determine whether to 0, but I always write wrong, please have a look at; And I want to change the font of specific cell, wrote the following statement, but doesn't work TextBox1. Text=lvExcel. Items (0). SubItems (1). The Text
Dim As the Font=f lvExcel. Items (0). SubItems (1). The Font
F=New Font (motor ame, FontStyle. Bold)
LvExcel. Items (0). SubItems (1). The Font=f
LvExcel. Items (0). SubItems (1) ForeColor=Color. Red
Look at the trouble

CodePudding user response:

Change the Excel cell type https://blog.csdn.net/UruseiBest/article/details/97308997
  • Related