Results 1 to 7 of 7

Thread: Reading a text file into excel 2000

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2007
    Posts
    54

    Reading a text file into excel 2000

    I am trying to automate reading a text file into an excel spreadsheet...

    The text file doesn't have a structure to it so I am reading each line at a time then processign it.

    I have opened the text file as a stream and can read the line, but how can I detect when I am at the end of the file???

    The other problem I am having is adding a new worksheet to an excel spreadsheet ready to receive the data, as it always appears before the current worksheet, to the left, and I need it to appear after the current worksheet. I have looked at worksheet.add and I can see you can specify after but I can't get my head around how to do it.

    One final problem I am encountering is the amount of time it is taking to process a 2mb text file, around 9 mins. This is obviously due to the fact that after reading the line I am having to check for a variety of conditions to determine how it should be processed. How can I reduce the amount of time it takes to process the file?

    Am using VB.NET.

    Hope you guys can help.

    regards,

    Matt
    Last edited by matt_h; Dec 16th, 2007 at 03:13 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width