LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need help w/ speed up parsing of spreadsheet string

Replace the remove comma and remove space with this (see image below).  See your code (attached).  You can do something similar for the while loop to the right of your code.  Try to avoid loops. 😉
 

Message Edited by JoeLabView on 09-14-2007 07:53 AM

Download All
Message 11 of 35
(1,248 Views)
much obliged, thank you kindly for thelp!
0 Kudos
Message 12 of 35
(1,233 Views)

no problem (thanks for the stars 🙂 )

did you notice a speed difference? 😉

0 Kudos
Message 13 of 35
(1,232 Views)
The speed difference is huge, it is just what I was hoping for!  Thanks again!!
0 Kudos
Message 14 of 35
(1,230 Views)
One more question, I did as you suggested and replaced the while loop with the search and replace string.vi, searched for \s and replaced with the tab constant.  The output is a little different than what I was seeing before.  When I view the '\' Codes Display instead of the normal text the old slow version has this output:

 TRIAL\tLOG\r\n\r\nProject\tNumber:\t063905\r\nProject\tTitle:\tLARC\tAnnex\t\r\nProject\tScale:\t1:240\r\n\r\n

and the new fast version has this output:

TRIAL\sLOG\n\nProject\sNumber:\s063905\nProject\sTitle:\s\sLARC\sAnnex\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\nProject\sScale:\s\s1:240\n\n

You can see the difference.  Do you have any thoughts on how to replace all \s with \t as it looked previously?  Thank you in advance!
0 Kudos
Message 15 of 35
(1,228 Views)
Actually, it looks like the issue is slightly different.  I hadnt se the replace all boolean to T, after doing this the output looks like:

TRIAL\tLOG\n\nProject\tNumber:\t063905\nProject\tTitle:\t\tLARC\tAnnex\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\nProject\tScale:\t\t1:240\n\n

Which is one step closer, but I need to remove the duplicate tabs, so that I only have one tab seperating each column.  That should give me a result equal to the old version:

TRIAL\tLOG\r\n\r\nProject\tNumber:\t063905\r\nProject\tTitle:\tLARC\tAnnex\t\r\nProject\tScale:\t1:240\r\n\r\n

Any thoughts?
0 Kudos
Message 16 of 35
(1,230 Views)
it looks like Search and Replace Pattern.vi may do the trick, I am going to play around with this.
0 Kudos
Message 17 of 35
(1,228 Views)

Yes, it's good to experiment a little..

Basically, if you replace all your \s (space) with \t (tabs), then you end up with a whole bunch of tabs.

There are other tricks..  If you get stuck, post your code or an image or that section and we can offer some suggestions.

Have fun!! 😄

RayR

0 Kudos
Message 18 of 35
(1,223 Views)
I have found that using the Search and Replace Pattern.vi slows the program back down, any suggestions on how to counter that?

Cheers!
0 Kudos
Message 19 of 35
(1,217 Views)
You mean after removing the while loop?
0 Kudos
Message 20 of 35
(1,208 Views)