04-15-2010 06:56 AM
Dear all,
I am trying to write some codes but to no avail. Basically, i have a filename coming in at every time interval (say 2 sec). I have build a small array as an example.
The filenames in the array are repetitive and i do not want to write the data to the spreadsheet if the filename is the same.
Bascially, i need to write the header and array only for 1st c:\1.txt file and subequent c:\1.txt data (3 more) i only want to write the array only (no header) and append it to spreadsheet.
That is to say for c:\1.txt file, it will consist of 1 header and 4 sets of array.
Then the process repeats again till a newfilename (c:\2.txt) is encountered.
c:\2.txt will also consist of 1 header and 4 sets of data.
Can anyone help out on this?
Solved! Go to Solution.
04-15-2010 07:07 AM
04-15-2010 07:27 AM - edited 04-15-2010 07:27 AM
The shift register will only work if the last filename matches. If you want to make sure it was not used before, you need to compare with all previous filenames that were used.
See code snippet below:
04-15-2010 10:18 AM
Dea
Dear all,
I have manage to get the results i want using shift register. I have manage to save the files properly. But i got one problem, during the last iteration loop, it prompts me with a window to save the file to a location.
Hopw can i get away of this prompting. Please help! Thank you!
04-15-2010 10:20 AM
Dear all,
I have manage to get the results i want using shift register. I have manage to save the files properly. But i got one problem, during the last iteration loop, it prompts me with a window to save the file to a location.
Hopw can i get away of this prompting. Please help! Thank you!
Attach are the codes.
04-15-2010 11:28 AM