Winscripter
  WSH
  Forums
  Downloads
  Books
  Links
  Amazon




Login
Register

© winscripter.com
1998-2004







WSH Forum

Author Thread: jscript problem
prjacksonau
jscript problem
Posted: Tuesday, April 10, 2007 11:32 PM (PST)
ok heres the problem   i need 2 load a text file in2 a array (done)  sort it by first name last name  and from a to z   (not done)  then open it in excel (done)  can anybody help me sort the file please.   many thanks in advance.


Comments:

Author Thread:
?
jscript problem
Posted: Friday, August 10, 2007 12:07 AM (PST)
There is not much of a way of knowing the document structure you want to obtain the data from. What you should do is build a data structure by xml tagging to make sorting and data grouping easier. Then you can use either startMarker = mydata.indexOf(""); endMarker = mydata.indexOf(""); loop through the text with a while loop or even use XSLT tot ransform it to text or html by a sort order. The other system that usually is better if you do not use XSLT is to use RegExp object that in effect you say something like setExp=new RegExp("//"); rtnarray = setExp.exec(mydatafile); then loop through the array. You need the Jscript documentation or VBscript docs for most here. I cannot find a proper forum thread start, and i have a script also that can be found at: http://www.nicephotog-jvm.net/nicephotogs-site-blaster.js.html I wanted to upload it to here?????



WSH and ADSI Administrative Scripting


Winscripter   |  WSH   |  Forums   |  Downloads   |  Books   |  Links   |  Amazon