--- In [email protected], "kottami" <[EMAIL PROTECTED]> wrote: > > Hi.. PP Users.. > xlDown is a constant, right?
So you need to find it's value. Try googling for "vbs xlDown" (VBS being a likely place someone has wanted to do same thing; that got me http://www.dbforums.com/archive/index.php/t-525846.html "Look up the values of these constants in Excel object browser (press F2 in VBA edit window)." "Const xlDown = -4121" > To modify File_Path.. > Path1\Path2\Path3\FileName ==> Path1\Path2\FileName Sorry, not with you. > My Script is > > ------------------------ > LOCAL objApp objSheet list_file n_file i k ss ss_word objCell sStatus > LOCAL s_file > objApp = com.create_object("Excel.Application") > com.set_property(objApp, "Visible", 1) > com.method(objApp, "Workbooks.Add") > > objSheet = com.method(objApp, "ActiveWorkbook.Worksheets", 1) > > list_file = file.listfiles(?"c:\WINDOWS\java\", 1) > > n_file = line(list_file, 0) ;; File Num > > for ( i =1 ; i <= n_file ;i++) > > 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 Probably much easier to use something like objSheet.Cells(i, k-1) = word(ss, k, ?"\") than the three-lines sets below. Haven't tested. > 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 > > com.release(objSheet) > > s_file = ?"C:\" ++ date ++TIME++ ?".xls" > > Com.Method(objApp, "ActiveWorkbook.SaveAS", s_file) or perhaps objApp.ActiveWorkbook.SaveAS(s_file) ;; Haven't tested. > sStatus = com.method(objApp, "Quit") or objApp.quit > objApp = "" > com.unload > > Quit > ------------------------ > > > I want to know Saving just Sheet1 with Text File, except empty > cells... That's an amusing VBA question. Off top of my head dunno how to do it. Figure out how to do it in vba, then move it to com plugin. > Of course, File Plugins Method is more simple, > but, I'd like to learn COM Plugins_Method..
