の複数のシートへのDataTableから日付に応じて、行のセットにエクスポートする方法vb.netは、私はエクセルの複数のシートに特定の行をエクスポートするExcel
私のコード
Iにデータテーブルからの日付に依存します1つのシートで17/08/2016をnextseheetで18/08/2016にしたいこのような 私のテーブルの行:
s.no date
1 17/08/2016
2 17/08/2016
3 17/08/2016
4 18/08/2016
5 18/08/2016
For i = 0 To dt.Rows.Count - 2
If dt.Rows(i).Item("AttDate") = dt.Rows(i + 1).Item("AttDate") Then
oSheet = oBook.Worksheets(1)
oSheet.Cells(Irow, IcolFranchisee) = dt.Rows(i).Item("Intime")
If dt.Rows(i).Item("latein") > 0 Then
oSheet.Cells(Irow, IcolFranchisee + 1) = dt.Rows(i).Item("latein")
Else
oSheet.Cells(Irow, IcolFranchisee + 2) = dt.Rows(i).Item("latein")
End If
Irow = Irow + 1
Else
osheet1 = oBook.Worksheets(2)
osheet1.Cells(Irow, IcolFranchisee) = dt.Rows(i).Item("Intime")
If dt.Rows(i).Item("latein") > 0 Then
osheet1.Cells(Irow, IcolFranchisee + 1) = dt.Rows(i).Item("latein")
Else
osheet1.Cells(Irow, IcolFranchisee + 2) = dt.Rows(i).Item("latein")
End If
Irow = Irow + 1
End If
Next
問題がありますか? – Leprechaun
はい........... – iswarya
問題についてもう少し説明できますか? – Leprechaun