Home > Software engineering >  Turn to the great god, the.net operation excel
Turn to the great god, the.net operation excel

Time:09-24

Now need in vb print data in a table in the datagridview and header, the header is multidimensional header (multidimensional header for not doing so header in the datagridview are f1, f2, f3 this could not be used),

First online looking for print datagridview approach seems to be the datagrid, datagridview cannot directly use; Then I also don't understand how to implement multidimensional header in a datagridview, so I want to bring the data in a datagridview underneath the original header to use excel to print,

And then have a problem, I work in the vb created two book printxls and titlexls, then copy one sheet from titlexls header into the sheet of printxls, copy is no problem, the key is copied after the cell format is missing, what is the default column spacing distance, so want to excuse me can keep the original copy of the format?


 
Case 2
Title_book=myexc. Application. Workbooks. Open (fileadd_Label. Text)
Title_sheets=title_book. Worksheets (" station (salesman) payroll ")
Print_book=myexc. Application. Workbooks. Add
Print_sheets=print_book. Worksheets (1)

Title_sheets. Range (" a1: cc5 "), Copy ()
Print_sheets. Paste ()



Or you have any Suggestions, you can use other way? As a civil dog, find code program is so hard on yourself,,,,

CodePudding user response:

Have a great god to help you,,,,
  • Related