--- In [email protected], "kottami" <[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], "entropyreduction" 
> <alancampbelllists@> wrote:
> 
> Hi.. 
> 
> So.. sorry..
> 
> I make a script.. 

> But, it work Only one time..
> 
> and then, Powerpro don't work.. 
> and, Two Powerpro.exe in Taskmgr..

Can't explain that, but will test later.

Meantime, look at

http://tech.groups.yahoo.com/group/power-pro/files/Scripts/kattamiExcelDot.powerpro


Pops out two files, one xls, one txt
 
> ---------------------------------------------------
> LOCAL objApp objSheet list_file n_file i k ss ss_word objCell sStatus
> local com_status, com_type
> LOCAL s_file
> 
> if (pproversion lt 3815) do
>  local msg = "This script requires a version of Powerpro 3.08.15 or 
> later.  You can edit it to eliminate use of ?c...c string delimiters"
>  messageBox("exclamation ok", msg, "Script Requires Later Version of 
> PowerPro")
>  quit
> endif
> 
> clip.clear
> 
> 
> com.error_dialog_on()
> com.returns_values()
> 
> objApp = com.create_object("Excel.Application")
> 
> objApp.visible = 1
> 
> objApp.Workbooks.Add
> 
> local objSheet = objApp.ActiveWorkbook.Worksheets(1)
> 
> list_file = file.listfiles(?"c:\WINDOWS\java\", 1)
> 
> 
> n_file = line(list_file, 0)
> 
> for ( i=1 ; i <=n_file ;i=i+1)
> 
>     ss = line(list_file, i)
> 
>     ss_word = word(ss, 0, ?"\")
> 
>      for( k =1; k <= ss_word;k=k+1)
> 
> 
>     IF ((SS_WORD-1) ==K) DO
> 
>         CONTINUE
> 
>     ELSEIF (SS_WORD==K) DO
> 
>         objCell = com.method(objSheet, "Cells", i ,   k-1)
> 
>         com.set_property(objCell, "Value", word(ss, k, ?"\"))
> 
>         objCell = com.release(objCell)
> 
> 
> 
>     ELSE
> 
>         objCell = com.method(objSheet, "Cells", i, k)
> 
>         com.set_property(objCell, "Value", word(ss, k, ?"\")++?"\")
> 
>         objCell = com.release(objCell)
> 
>     ENDIF
> 
>   endfor
> 
> endfor
> 
> objSheet.Range("A1:E18").copy
> objsheet.release
> 
> Local Ex_Clip = clip.get
> wait.for(70)
> 
> local Ex_clip2 = Regex.pcreReplace(?"\t",Ex_Clip, ?"")
> 
> wait.for(100)
> 
> File.Writeall(?"C:\List1.Txt", Ex_Clip2)
> wait.for(100)
> 
> local s_file = ?"C:\" ++ date ++TIME++ ?".xls"
> 
> Com.Method(objApp, "ActiveWorkbook.SaveAS", s_file)
> 
> wait.for(200)
> 
> objApp.Quit
> 
> com.unload
> 
> Quit
> ---------------------------------------------------
>  
> 
> Regards,
> kottami
>


Reply via email to