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: 40
Default Version difference when opening text files?

Background: Users create a comma-delimited text file using specialised
software, that is imported later into a validated Excel spreadsheet for
processing. The structure of the text file is always identical, but the
field content changes. The import macro opens the file using

vaFile = Application.GetOpenFilename(FileFilter:="Text Files (*.txt; *.csv),
*.txt; *.csv", MultiSelect:=False)

Workbooks.OpenText Filename:=vaFile, Comma:=True

then copies the contents into the processing workbook. Up to now, the users
could either save the source text file as .TXT or .CSV with identical results.

Now however, some users have moved from Excel 2000 to Excel 2003. If they
save the source as .CSV, no change, but if they save as .TXT, some blank rows
are not copied through, and it throws all the processing formulae out of
sync. The problem seems to stem from places in the text file where there are
two "line-feed" characters next to each other (the kind that present as
little boxes in notepad).

To make it worse, the source text files are saved to a write-once area, and
can't be amended. I'm not even supposed to allow the copied in data to be
amended. Since I can't do anything to change the source text files, is there
anything I can do to the macro code to compensate? (p.s. yes, I know I can
tell the users to save as .CSV, but if they forget the data will become
almost inaccessible)

Thanks, Geoff.
 
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
Opening text files Sandy5590 Excel Discussion (Misc queries) 0 October 15th 09 04:35 PM
opening files in excel 2007 from older version Mike G[_2_] Excel Discussion (Misc queries) 0 April 7th 09 02:42 PM
links between 2007 version files and 97-2003 version files biff Links and Linking in Excel 1 October 20th 07 12:18 AM
Excel recalculates formulas when opening files last saved by an earlier version of Excel Jim Rech Excel Programming 0 April 7th 04 06:47 PM
Opening text files Jason Excel Programming 1 March 1st 04 02:23 AM


All times are GMT +1. The time now is 12:32 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"