09-18-2007 06:19 PM
 altenbach
		
			altenbach
		
		
		 
		
		
		
		
		
	
			09-18-2007 08:41 PM
@mechanical13 wrote:
Is this the only way?
OK, a file is just a long collection of characters. Easiest would be to just format it as a string in memory (using e.g. "array to spreadheed string", concatenate string, etc), then write it to a file using "write text" in one operation. There is no reason to form clusters and other acrobatics. 😉
You should really be careful with your extensions, because your files are plain ASCII tables and not excel files as you seem to imply from the .xls extension. If you would ever open these files in excel and save them in excel, you will no longer be able to read them with your simple LabVIEW program. Sometimes, giving an .xls extension is done for convenience so it open in excel when double-clicked. You just need to be aware that it is actually not an excel file under the hood. 😉
I still think your code is way too complicated for this simple task.
 altenbach
		
			altenbach
		
		
		 
		
		
		
		
		
	
			09-18-2007 09:22 PM
 altenbach
		
			altenbach
		
		
		 
		
		
		
		
		
	
			09-18-2007 11:06 PM - edited 09-18-2007 11:06 PM
OK, here's a quick draft how you could do it. Seems to work in a blink, even with your 2MB data file. 🙂
(I also attached a small testfile with multiple datasets for testing).
Be aware that your datafile is too big to be loaded into excel. My version of excel truncates it at 64k lines. 😞
Right now it only processes files with a "*.txt" extension (see pattern input to "list folder"). You should adjust that to the real extension of your files. It also probably needs better error handling. You should maybe also strip the .txt extension from the output file, right now it generates files abc.txt.xls. is that what you really want?
I also don't go through the expense of scanning the number to DBL and formatting them again later. I just operate on the numeric strings.
See if this makes sense to you. Modify as needed. Good luck! 🙂

Message Edited by altenbach on 09-18-2007 09:10 PM
09-19-2007 06:00 AM
09-19-2007 06:11 AM
09-19-2007 08:53 AM
09-19-2007 08:55 AM
 sture
		
			sture
		
		
		
		
		
		
		
		
	
			09-19-2007 10:01 AM - edited 09-19-2007 10:01 AM
Message Edited by sture on 09-19-2007 10:01 AM
 altenbach
		
			altenbach
		
		
		 
		
		
		
		
		
	
			09-19-2007 11:04 AM - edited 09-19-2007 11:04 AM



Message Edited by altenbach on 09-19-2007 09:06 AM