vb.net - Create Excel Columns Dynamically -
i creating excel using namespace "microsoft.office.interop.excel"
i have list of users getting database. users list alter frequently.
dim officers list(of string) = list.[select](function(p) p.officerassigned).distinct().tolist()
how can create column each user ? after b, c , after c, d. how can dynamically increment column alphabet ?
dim arange range = ws.range("b2", "b2") arange.merge(1) arange.value2 = officers(i).tostring()
assuming have referenced object current worksheet of "worksheet" , want start @ column "a" , first row...
for int32 = 1 officers.count worksheet.cells(1,i) = officers(i-1) next
vb.net excel excel-interop
No comments:
Post a Comment