[ad_1]
Issued Detail Page No.1 Item Issued For Customer :101 ----------------------------------------- Id Item Qty Date ----------------------------------------- 101 Pen 10 10/05/2021 101 Copy 10 10/05/2021 101 Glue 1 10/05/2021 101 Cover 10 10/05/2021 ---------------------------------------- Total 4 31 ---------------------------------------- Page No.2 Item Issued For Customer :102 ---------------------------------------- Id Item Qty Date ---------------------------------------- 102 Bag 1 09/06/2021 102 Pencil Box 2 09/06/2021 102 Cover 5 09/06/2021 --------------------------------------------------------- Total 3 8 --------------------------------------------------------- SubTotal 7 39 ---------------------------------------------------------
私が試したこと:
VB
Using sw As New StreamWriter(OutPutFile) <pre> For I As Integer = 0 To dt.Rows.Count - 1 sw.WriteLine("------------------------------------------------------------") sw.WriteLine(dt.Rows(I).Item(0).ToString.PadRight(15) & vbTab & dt.Rows(I).Item(1).ToString().PadRight(25) & vbTab & dt.Rows(I).Item(2).ToString().PadRight(10) & vbTab & dt.Rows(I).Item(3).ToString()) Next Process.Start(OutPutFile)
使用終了
解決策 1
出力ファイルを使用する前にストリームを閉じてください。そうしないと、どの p でも開くことができません。[rocess – including ones in your own application.
In other words, the End Using
needs to be before the Process.Start
[ad_2]
コメント