Click here to Skip to main content
14,334,742 members

.NET Framework

 
AnswerRe: regards : licensing Pin
ZurdoDev4-Dec-18 2:31
professionalZurdoDev4-Dec-18 2:31 
QuestionViewing Scripts And Markups Of Web Page Displayed in Web Browser Control Pin
MadDashCoder19-Nov-18 18:52
memberMadDashCoder19-Nov-18 18:52 
AnswerRe: Viewing Scripts And Markups Of Web Page Displayed in Web Browser Control Pin
Eddy Vluggen20-Nov-18 1:28
mveEddy Vluggen20-Nov-18 1:28 
AnswerRe: Viewing Scripts And Markups Of Web Page Displayed in Web Browser Control Pin
Dave Kreskowiak20-Nov-18 3:00
mveDave Kreskowiak20-Nov-18 3:00 
AnswerRe: Viewing Scripts And Markups Of Web Page Displayed in Web Browser Control Pin
Gerry Schmitz20-Nov-18 7:07
mveGerry Schmitz20-Nov-18 7:07 
QuestionHmacSha256Encode by vb.net Pin
abdel moneim16-Nov-18 4:45
memberabdel moneim16-Nov-18 4:45 
AnswerRe: HmacSha256Encode by vb.net Pin
Richard Deeming16-Nov-18 6:31
mveRichard Deeming16-Nov-18 6:31 
QuestionRead text file and split the string to specific column in datagridview Pin
Member 1363767814-Nov-18 1:02
memberMember 1363767814-Nov-18 1:02 
Hi,

Please help me how to add text from text file and put it on the datagridview here is my code:

Dim FileLine As String
Dim LineLength As Integer


Using sr As New StreamReader("C:\Users\WIN 7\Desktop\rmsbp050_09032018.txt")
    While Not sr.EndOfStream


        FileLine = sr.ReadLine()
        LineLength = FileLine.Length






        If LineLength = 59 Then


            DataGridView1.Rows.Add(FileLine.ToString, sr.ReadLine() & vbNewLine, sr.ReadLine() & vbNewLine & vbNewLine, sr.ReadLine() & vbNewLine & vbNewLine & vbNewLine)


        End If


    End While
End Using




Here is the sample text file :


BANK NAME 15 CUSTOMER INFORMATION SYSTEM *RMR100 * PAGE NO 1
CTL 2 000 PNB SAVINGS BANK MONDAY PROCESS DATE 09/03/18
CTL 3 000 ACTIVITY *RM 100* PROCESS THRU 09/03/18
CTL 4 0000 CURRENT DATE 09/03/18

BRANCH 0000 - PNB SAVNGS BANK

CUSTOMER NAME CUSTOMER NBR CUSTOMER INITIATED?
TRAN DATE TIME FIELD DESCRIPTION ACT TRAN ID AFTER
EMPLOYEE TERMINAL LST MNT DATE LST MNT TIME BEFORE
KEY

CO, CARLOS VERA 00000004676090 N
09/03/18 10:21:42 RESP BR MNT RM1P 0000
15-000-1027993 B112 03/29/2017 02:16:23

09/03/18 10:21:42 SRC OF FUNDS MNT RM1P PENSION
15-000-1027993 B112 03/29/2017 02:16:23 SSS PENSIO

09/03/18 10:21:42 ACT OFFICER ID MNT RM1P 869376
15-000-1027993 B112 03/29/2017 02:16:23 00305294

09/03/18 10:21:42 DT LST RM ACTV MNT RM1P 20180903
15-000-1027993 B112 03/29/2017 02:16:23 20170329

09/03/18 10:21:42 CL RISK CLASS MNT RM1P B
15-000-1027993 B112 03/29/2017 02:16:23 C

09/03/18 10:21:42 CHK USER ID MNT RM1P 1027993
15-000-1027993 B112 03/29/2017 02:16:23 00144193

09/03/18 10:21:42 PH NBR MNT RM1P .
15-000-1027993 B112 03/29/2017 02:16:23 0 0 0
R 01 N
09/03/18 10:21:42 PH ISO CTRY CD MNT RM1P PH
15-000-1027993 B112 03/29/2017 02:16:23
R 01 N
09/03/18 10:21:42 PH NBR MNT RM1P 09091232585
15-000-1027993 B112 03/29/2017 02:16:23 639091239585
M 01 N
09/03/18 10:21:42 CITIZENSHIP MNT RM1P PH
15-000-1027993 B112 03/29/2017 02:16:23

09/03/18 10:21:42 SPOUSE NAME MNT RM1P CRISTINA GARCIA CO
15-000-1027993 B112 03/29/2017 02:16:23 CRISTINA CO

09/03/18 10:21:42 EMPR NAME ADD RM1P NA
15-000-1027993 B112 03/29/2017 02:16:23
00000000 00000000 NA
09/03/18 10:22:15 LENDING UNIT MNT RMLC 6041
15-000-1027993 B112 09/03/2018 10:21:42 1830

09/03/18 10:22:15 LOAN OFF MNT RMLC 869376
15-000-1027993 B112 09/03/2018 10:21:42 305294

CO, CARLOS VERA 00000004676090 N
09/03/18 10:22:15 CALC CRR MNT RMLC 5
15-000-1027993 B112 09/03/2018 10:21:42





It should be output like this :
http://i346.photobucket.com/albums/p421/Christopher_Alexis_Santor/Capture_zpspidlvxsa.png[^]
Thank you,

modified 14-Nov-18 19:05pm.

AnswerRe: Read text file and split the string to specific column in datagridview Pin
Richard MacCutchan14-Nov-18 3:36
protectorRichard MacCutchan14-Nov-18 3:36 
GeneralRe: Read text file and split the string to specific column in datagridview Pin
Member 1363767814-Nov-18 9:34
memberMember 1363767814-Nov-18 9:34 
GeneralRe: Read text file and split the string to specific column in datagridview Pin
Richard MacCutchan14-Nov-18 9:38
protectorRichard MacCutchan14-Nov-18 9:38 
GeneralRe: Read text file and split the string to specific column in datagridview Pin
Member 1363767814-Nov-18 13:15
memberMember 1363767814-Nov-18 13:15 
GeneralRe: Read text file and split the string to specific column in datagridview Pin
Richard MacCutchan14-Nov-18 22:03
protectorRichard MacCutchan14-Nov-18 22:03 
AnswerRe: Read text file and split the string to specific column in datagridview Pin
Eddy Vluggen15-Nov-18 13:00
mveEddy Vluggen15-Nov-18 13:00 
QuestionHow to create a property in class that list the forms of the main application Pin
Hisham Shaaban12-Oct-18 2:02
memberHisham Shaaban12-Oct-18 2:02 
AnswerRe: How to create a property in class that list the forms of the main application Pin
Dave Kreskowiak12-Oct-18 2:23
mveDave Kreskowiak12-Oct-18 2:23 
QuestionCreating single MSI installer. Pin
Koundinya9-Oct-18 11:04
memberKoundinya9-Oct-18 11:04 
AnswerRe: Creating single MSI installer. Pin
Dave Kreskowiak9-Oct-18 16:24
mveDave Kreskowiak9-Oct-18 16:24 
QuestionBeginner question...regarding garbage collection Pin
NolansPapa4-Oct-18 2:55
memberNolansPapa4-Oct-18 2:55 
AnswerRe: Beginner question...regarding garbage collection Pin
Dave Kreskowiak4-Oct-18 4:34
mveDave Kreskowiak4-Oct-18 4:34 
QuestionVSTO questions about the Outlook Notes (Sticky Notes) part Pin
Dan Sutton29-Sep-18 11:29
memberDan Sutton29-Sep-18 11:29 
QuestionHow to undo excluded changes in Visual Studio 2017? Pin
rookiecg28-Sep-18 7:10
memberrookiecg28-Sep-18 7:10 
AnswerRe: How to undo excluded changes in Visual Studio 2017? Pin
Dave Kreskowiak28-Sep-18 10:07
mveDave Kreskowiak28-Sep-18 10:07 
Generalplz Pin
Member 1398528114-Sep-18 21:44
memberMember 1398528114-Sep-18 21:44 
GeneralRe: plz Pin
Eddy Vluggen14-Sep-18 23:20
mveEddy Vluggen14-Sep-18 23:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.