02-17-2006 01:59 PM
02-17-2006 02:25 PM
02-17-2006 02:28 PM
02-17-2006 02:38 PM
As I understand it, you need a crystal ball to tell you what value to use for the Read From Spreadsheet File.vi offset characters location.
You don't want to have to read the preceding 99,999 disk file blocks, watching the bytes stream by, when your crystal ball tells you that the line you need is in the 100,000th block.If you don't know where you are in the file without looking at all the data in the file up to that point,
then, by definition, you have to look at all the data read it from the file up to that point.I think you are stuck.
If you cannot alter the routine that writes these files to either use constant-width fields or line numbers or provide an auxiliary file of pointers then you have to resign yourself to reading these files at least once the slow way. Whether or not you have to read these files a second or third or fourth .... time in an equally slow manner depends on whether or not you rewrote them after the first reading in a more reader-friendly fashion.
02-17-2006 03:03 PM
02-17-2006 03:05 PM
02-17-2006 03:16 PM
FWIW, If you have to do this the slow way (& I understand you will be trying to get the file writer to change to avoid that) then if I were you I'd read the entire file into memory once (it's amazing how much you can stuff into modern computer memory) to avoid opening the file multiple times. Perform all your line searching and synchronization on the memory image and then (if necessary) write the image back to disk.
@StudentSmith wrote:
All of this requires me to open the file and investigate the information, .... In doing either, I'll end up opening the file multiple times.
02-17-2006 05:04 PM
02-19-2006 10:24 AM