The Solution to RE: Unexceling (was I need a smart quote...)

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23152
interpreted = N
texte = Here's a solution:1. Create the following include files (I put in an includes subdirectory but you can change the mapping if needed):=== includes/replaceString.inc == [math show=f]ilen=[countchars][sOriginal][/countchars][/math][text]sTmp=[/text][ma th show=f]iBInd=1[/math][math show=f]iEndx=1[/math][math show=f]iFlen=[countchars][sFind][/countchars][/math][loop start=1&end=[ilen]][math show=f]iEndx=[include file=includes/indexOf.inc&sOriginal=[sOriginal]&sFind=[sFind]&iStart=[iBInd] ][/math][showif [iEndx]=0][text]sTmp1=[sTmp][/text][math show=f]iIndx=[iBInd][/math][break][/showif][math show=f]iEndx2=[iEndx]-1[/math][text]sTmp=[sTmp][getchars start=[iBInd]&end=[iEndx2]][sOriginal][/getchars][sReplace][/text][math show=f]iBInd=iEndx+iFlen[/math][/loop][math show=f]iBInd=[ilen]+1[/math][showif [iIndx]<[iBInd]][text]sTmp1=[sTmp1][getchars start=[iIndx]&end=[ilen]][sOriginal][/getchars][/text][/showif][math show=f]iEndx=[include file=includes/indexOf.inc&sOriginal=[sOriginal]&sFind=[sFind]&iStart=1][/mat h][showif [iEndx]=1][text]sTmp1=[getchars start=2][sTmp1][/getchars][/text][/showif][sTmp1] ====== includes/indexOf.inc == [math show=f]sFindlen=[countchars][sFind][/countchars][/math][math show=f]slen=[countchars][sOriginal][/countchars][/math][math show=f]idx=0[/math][loop start=[iStart]&end=[slen]-[sFindlen]+1][showif [getchars start=[index]&end=[slen]][sOriginal][/getchars]~[sFind]][math show=f]idx=[index][/math][break][/showif][/loop][idx] ===2. Now to find all of your strings and replace with ``, use the following:[include file=includes/replaceString.inc&sOriginal=[your spreadsheet here]&sFind=&sReplace=``]This will replace all ocurrances of with ``. I haven't tested this with large files so if it crashes you may need to break down into smaller chunks. The most best way would be to import the new database and go through each field checking if a field contains and if yes run through the above and replace the new contents in the database.3. Now use a convertChars custom database to find all to replace with null.4. Last, run through #2 as follows:[include file=includes/replaceString.inc&sOriginal=[your spreadsheet here]&sFind=``&sReplace=]This shoud do it and also work for any other string for string replacements you need. The two includes here are quite cpu intensive so you should try to reduce the amount of times you need to hit them and put them into spawn contexts.Aloha, Olin> -----Original Message----- > From: Tim Taylor [mailto:tim@mail.versa.com] > Sent: Monday, February 01, 1999 9:29 AM > To: WebDNA-Talk@smithmicro.com > Subject: Unexceling (was I need a smart quote...) > > > The more I look at this problem the more it seems that I am not going to > be able to find a solution within web-catalog (unless the convert a whole > string [converchars] funtion appears overnight. I just wanted to try to > pick the lists collective brain one more time before I tried to find some > app on the server side to do it instead ( I really think the programing > level for that is going to be beyond me. ) > For those of you that missed it the first time around here is the problem. > I have about 100 growers that upload there current plant stock to our > system. Almost all of them use Ms Excel. I can't get them to > change that. > Plant sizes are in inches so... > 42B&B becomes 42B&B and2+ cal. becomes 2+Cal. > They need to update their inventory on an almost daily basis and > I won't be > able to physically come in and clean everything up before It becomes part > of their catalogs. If their db's were just simple text files I would > normally perform this sequence. > find and replace with `` then find and delete it then find`` > and replace with > I know I've put this question to list before, but I just wanted to > circulate a last call Does anyone know of a way to perform > that function > within web cat? Or as an alternative, does anyone know of a way to get > Excel to stop stepping on the Data in this particular way? > > Tim Taylor > Webmaster > http://www.growzone.com > Tim@versa.com > t h e s i t e f o r t h e > g r e e n i n d u s t r y > 1.888.800.5904 > > > Associated Messages, from the most recent to the oldest:

    
  1. The Solution to RE: Unexceling (was I need a smart quote...) (Olin Lagon 1999)
Here's a solution:1. Create the following include files (I put in an includes subdirectory but you can change the mapping if needed):=== includes/replaceString.inc == [math show=f]ilen=[countchars][sOriginal][/countchars][/math][text]sTmp=[/text][ma th show=f]iBInd=1[/math][math show=f]iEndx=1[/math][math show=f]iFlen=[countchars][sFind][/countchars][/math][loop start=1&end=[ilen]][math show=f]iEndx=[include file=includes/indexOf.inc&sOriginal=[sOriginal]&sFind=[sFind]&iStart=[iBInd] ][/math][showif [iEndx]=0][text]sTmp1=[sTmp][/text][math show=f]iIndx=[iBInd][/math][break][/showif][math show=f]iEndx2=[iEndx]-1[/math][text]sTmp=[sTmp][getchars start=[iBInd]&end=[iEndx2]][sOriginal][/getchars][sReplace][/text][math show=f]iBInd=iEndx+iFlen[/math][/loop][math show=f]iBInd=[ilen]+1[/math][showif [iIndx]<[iBInd]][text]sTmp1=[sTmp1][getchars start=[iIndx]&end=[ilen]][sOriginal][/getchars][/text][/showif][math show=f]iEndx=[include file=includes/indexOf.inc&sOriginal=[sOriginal]&sFind=[sFind]&iStart=1][/mat h][showif [iEndx]=1][text]sTmp1=[getchars start=2][sTmp1][/getchars][/text][/showif][sTmp1] ====== includes/indexOf.inc == [math show=f]sFindlen=[countchars][sFind][/countchars][/math][math show=f]slen=[countchars][sOriginal][/countchars][/math][math show=f]idx=0[/math][loop start=[iStart]&end=[slen]-[sFindlen]+1][showif [getchars start=[index]&end=[slen]][sOriginal][/getchars]~[sFind]][math show=f]idx=[index][/math][break][/showif][/loop][idx] ===2. Now to find all of your strings and replace with ``, use the following:[include file=includes/replaceString.inc&sOriginal=[your spreadsheet here]&sFind=&sReplace=``]This will replace all ocurrances of with ``. I haven't tested this with large files so if it crashes you may need to break down into smaller chunks. The most best way would be to import the new database and go through each field checking if a field contains and if yes run through the above and replace the new contents in the database.3. Now use a convertChars custom database to find all to replace with null.4. Last, run through #2 as follows:[include file=includes/replaceString.inc&sOriginal=[your spreadsheet here]&sFind=``&sReplace=]This shoud do it and also work for any other string for string replacements you need. The two includes here are quite cpu intensive so you should try to reduce the amount of times you need to hit them and put them into spawn contexts.Aloha, Olin> -----Original Message----- > From: Tim Taylor [mailto:tim@mail.versa.com] > Sent: Monday, February 01, 1999 9:29 AM > To: WebDNA-Talk@smithmicro.com > Subject: Unexceling (was I need a smart quote...) > > > The more I look at this problem the more it seems that I am not going to > be able to find a solution within web-catalog (unless the convert a whole > string [converchars] funtion appears overnight. I just wanted to try to > pick the lists collective brain one more time before I tried to find some > app on the server side to do it instead ( I really think the programing > level for that is going to be beyond me. ) > For those of you that missed it the first time around here is the problem. > I have about 100 growers that upload there current plant stock to our > system. Almost all of them use Ms Excel. I can't get them to > change that. > Plant sizes are in inches so... > 42B&B becomes 42B&B and2+ cal. becomes 2+Cal. > They need to update their inventory on an almost daily basis and > I won't be > able to physically come in and clean everything up before It becomes part > of their catalogs. If their db's were just simple text files I would > normally perform this sequence. > find and replace with `` then find and delete it then find`` > and replace with > I know I've put this question to list before, but I just wanted to > circulate a last call Does anyone know of a way to perform > that function > within web cat? Or as an alternative, does anyone know of a way to get > Excel to stop stepping on the Data in this particular way? > > Tim Taylor > Webmaster > http://www.growzone.com > Tim@versa.com > t h e s i t e f o r t h e > g r e e n i n d u s t r y > 1.888.800.5904 > > > Olin Lagon

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Two prices in shoppingcart? (1997) ampersand in a sendmail body (2007) emailer (1997) Another question (1997) Frustration with formulas.db (1999) [shownext max (1997) Time Display from Database (1997) New Webcatalog for Mac (1997) Emailer setup (1997) Thanks ! (1997) Hiding HTML and page breaks (1997) [OT] (waaaay OT) (2004) Lookup within a Search (2005) European Dates (1998) Search in 2 or more catalogs (1997) Looking for easy way to back up dbs... (2003) [WebDNA] OT? - how to get webdna to tell browser to open SWF directly in the browser? (2009) Separate SSL Server (1997) How to delete all files in a folder? (2001) [WebDNA] EMailFolder/ (2016)