gandalf98 Posted May 6, 2010 Share Posted May 6, 2010 I need to create a new input file and add a header row before the data. The data has a variable number of fields and if the first row does not have the total number of possible fields, it simply ignores the rest of the line... Since I can't use ActiveX file objects and the ReadLine() method... what else can I do? Thanks for any help. Link to comment Share on other sites More sharing options...
esmith Posted May 7, 2010 Share Posted May 7, 2010 Your first record should contain all the possible fields, even if the contents of fields are empty. When we use XML data, the first record is usually all null values just to "initiate" the fields. If you're asking how to add the header row itself, wouldn't you just handle that in a spreadsheet or text editor app (or am I misunderstanding what you are trying to do)? Link to comment Share on other sites More sharing options...
gandalf98 Posted May 7, 2010 Author Share Posted May 7, 2010 Yes I would normally... but this is a daily job that we need to keep as automated as possible. I was able to resolve my issue by using ExternalDataFile instead of ExternalDataFileEx. Also, when looping through the fields, instead of ending at the "FieldCount", I manually set the number to the maximum number of possible fields that are in the data. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.