| | |
getting data from a text file and putting it in an excel file using visual basic 6.0
![]() |
•
•
Join Date: Apr 2007
Posts: 6
Reputation:
Solved Threads: 0
getting data from a text file and putting it in an excel file using visual basic 6.0
0
#1 Apr 20th, 2007
guys, can you help me to get data from a text file and putting it in an excel file? my programming language is visual basic 6.0
here is a sample data from the text file:
ANO,BNO,TRANSDATE,TRANSTIME,ORIGINS,DESTINATION,CA LL_TYPE,OUTROUTE,INROUTE,CALLS,ACTUAL_MINS,COST
0498373386,006623322001,20070216,16:33:35,SRO,THB,IDD,IBEF7O,,1,0.766666666666667,-0.014413
0498373386,006623322001,20070223,12:59:40,SRO,THB, IDD,0241,,1,0.8,-0.01264
0498373521,0096265522113,20070207,11:22:59,SRO,JO, IDD,0241,,1,0.433333333333333,-0.019717
i wll get the underlined data, then i will put in an excel file..
pls help me guys..its only a project but i really need your help.i am only an amatuer vb programmer and my knowledge in it is limited.pls help..tnx!
here is a sample data from the text file:
ANO,BNO,TRANSDATE,TRANSTIME,ORIGINS,DESTINATION,CA LL_TYPE,OUTROUTE,INROUTE,CALLS,ACTUAL_MINS,COST
0498373386,006623322001,20070216,16:33:35,SRO,THB,IDD,IBEF7O,,1,0.766666666666667,-0.014413
0498373386,006623322001,20070223,12:59:40,SRO,THB, IDD,0241,,1,0.8,-0.01264
0498373521,0096265522113,20070207,11:22:59,SRO,JO, IDD,0241,,1,0.433333333333333,-0.019717
i wll get the underlined data, then i will put in an excel file..
pls help me guys..its only a project but i really need your help.i am only an amatuer vb programmer and my knowledge in it is limited.pls help..tnx!
Re: getting data from a text file and putting it in an excel file using visual basic 6.0
0
#2 Apr 20th, 2007
Putting data into Excel File is not a big problem. In the VB project Refernces add the "Microsoft Excel X Object Library" where X will depend on whatever version of Excel you have in the computer.
Here's a Code snippet for sending data to Excel
This will put the Numbers 1..10 in the Excel Cells A1...A10.
But I am not sure how you can extract only the underlined data ? What sort of input file are you using ? Surely it's not a .txt file as that does not support font underline .
Here's a Code snippet for sending data to Excel
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Dim objExcel As Excel.Application Set objExcel = New Excel.Application objExcel.Workbooks.Add 'Creates a New Excel File objExcel.ActiveWorkbook.Sheets(1).Activate Dim RowNum As Integer RowNum = 1 Dim ColNum As Integer ColNum = 1 For X = 1 To 10 objExcel.Cells(RowNum, ColNum) = X ColNum = ColNum + 1 Next
But I am not sure how you can extract only the underlined data ? What sort of input file are you using ? Surely it's not a .txt file as that does not support font underline .
•
•
Join Date: Apr 2007
Posts: 6
Reputation:
Solved Threads: 0
Re: getting data from a text file and putting it in an excel file using visual basic 6.0
0
#3 Apr 22nd, 2007
•
•
•
•
Putting data into Excel File is not a big problem. In the VB project Refernces add the "Microsoft Excel X Object Library" where X will depend on whatever version of Excel you have in the computer.
Here's a Code snippet for sending data to Excel
This will put the Numbers 1..10 in the Excel Cells A1...A10.Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Dim objExcel As Excel.Application Set objExcel = New Excel.Application objExcel.Workbooks.Add 'Creates a New Excel File objExcel.ActiveWorkbook.Sheets(1).Activate Dim RowNum As Integer RowNum = 1 Dim ColNum As Integer ColNum = 1 For X = 1 To 10 objExcel.Cells(RowNum, ColNum) = X ColNum = ColNum + 1 Next
But I am not sure how you can extract only the underlined data ? What sort of input file are you using ? Surely it's not a .txt file as that does not support font underline .
tnx for the code.i will try that now.the underlined data are the ones which i will be putting in an existing excel file.but it doesn't mean it is underlined as it is. i only underlined it so that you guys will know the data that i will be getting.and the dat is in a text file.my question is what is the code in getting the data in the text file.
![]() |
Similar Threads
- connect to text file database (Visual Basic 4 / 5 / 6)
- writing students data to a text file (Assembly)
- Read comma separated data from a text file (C)
- Help Please, how do i read from text file into array? (Visual Basic 4 / 5 / 6)
- How to select data frm text file based on a condition (C)
- Need Help in Reading characters from a text file (C++)
- Problems of looping in saving to a text file (C)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Loading external file from within program
- Next Thread: Uninstaller for VB6
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





