LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Read data from ascii file

I'd like to read a ascii file using VBA and the file has
(for example):
------------------------------------------------
Name Group Measured Modelled
d311 obsgroup 0.3270859 0.2853140
d312 obsgroup 0.3436139 0.3403970
--------------------------------------------------------
I have written:
dim dataname, groupname as string
Dim meas, modell as double

Line Input #1, textline ' Read text line
Do While Not EOF(1) ' Loop until end of file.
Input #1, dataname, groupname, meas, modell
Count = Count + 1
Loop
*******
But the variables does not read correctly. Could you help
me?

Nazrul
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge data from an ascii file into a Word doc Bernie Excel Discussion (Misc queries) 1 September 6th 09 06:54 AM
How do I convert an Excel file to an ASCII file? Pugh Excel Discussion (Misc queries) 1 November 8th 06 08:57 PM
using data from ascii file? NTaylor Excel Discussion (Misc queries) 2 December 21st 05 04:46 PM
How do I convert excel file into ASCII text file with alignment? Rosaiah Excel Discussion (Misc queries) 2 June 27th 05 12:17 PM
Selective read data from ascii file Steve Kim Excel Programming 0 August 20th 03 05:19 AM


All times are GMT +1. The time now is 03:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"