export data from sheet1 to multiple sheets using vb.net -
i trying export specific data 1 sheet multiple sheets.
i not asking give me whole code need example start
for example: sheet1 has data
value1 4 value2 7 goes sheet named value type of car honda goes sheet named car model civic category exp category2 wo goes sheet named category
xlworkbook = xlapp.workbooks.open("..\desktop\test.xlsx")
'~~> opens destination workbook. change path , filename applicable ' xlworkbook2 = xlapp.workbooks.open("c:\tutorial\book1.xlsx") '~~> display excel xlapp.visible = true '~~> set source worksheet xlworksheet = xlworkbook.sheets("sheet1") '~~> set destination worksheet xlwsheet2 = xlworkbook.sheets("sheet5") '~~> set source range xlsourcerange = xlworksheet.range("a1:l8") '~~> set destination range xldestrange = xlwsheet2.range("a1:e8") '~~> copy , paste range xlsourcerange.copy(xldestrange)
Comments
Post a Comment