Search  
Saturday, February 11, 2012 ..:: Forum ::.. Register  Login
 Forum Minimize
Pentru a putea posta mesaje trebuie să vă înregistraţi.
Notă: Mesajele cu conţinut jignitor sau ilegal (inclusiv cereri de soft piratat) nu sunt acceptate şi vor fi şterse imediat .

Pentru a primi raspunsuri rapide si corecte, scrieti in mesaj ce intentionati sa faceti, ce mesaj de eroare primiti, in ce context si in urma caror actiuni. De asemenea, mentionati versiunea de FoxPro in care lucrati!
Dacă nu specificați versiunea, se consideră VFP 9.0 SP2.

SearchForum Home
  Visual FoxPro  Office Automation  SaveAs...
 SaveAs
 
 1/26/2010 9:35:37 PM
User is offlineAstalus
126 posts
5th


SaveAs
 (N/A)

in codul inserat , doresc la sfarsit sa fac salvare cu save as

nu merge

va rog corectati / multumesc

========================================


* http://www.tek-tips.com/faq.cfm?pid=184
*

local oExcel, oSheet
oExcel = CreateObject([Excel.Application])
oExcel.Visible = .T.
oExcel.Workbooks.Add()

oSheet = oExcel.ActiveSheet
osheet.Columns("B:B").ColumnWidth = 40

lnRow = 1
lnCol = 1
oSheet.Cells(lnRow,1).Value = [FoxPro AM]

lnRow = 3
oSheet.Range([A3]).Select
oSheet.Cells(lnRow,lnCol).Value = [codpr]
oSheet.Cells(lnRow,lnCol).Font.Bold = .T.
oSheet.Cells(lnRow,lnCol).HorizontalAlignment = 2
       
lnCol = lnCol + 1
oSheet.Range([B3]).Select
oSheet.Cells(lnRow,lnCol).Value = [denpr]
oSheet.Cells(lnRow,lnCol).Font.Bold = .T.
oSheet.Cells(lnRow,lnCol).HorizontalAlignment = 1
       
lnCol = lnCol + 1
oSheet.Range([C3]).Select
oSheet.Cells(lnRow,lnCol).Value = [um]
oSheet.Cells(lnRow,lnCol).Font.Bold = .T.
oSheet.Cells(lnRow,lnCol).HorizontalAlignment = 4

lnCol = lnCol + 1
oSheet.Range([D3]).Select
oSheet.Cells(lnRow,lnCol).Value = [grupa]
oSheet.Cells(lnRow,lnCol).Font.Bold = .T.
oSheet.Cells(lnRow,lnCol).HorizontalAlignment = 3

lnCol = lnCol + 1
oSheet.Range([E3]).Select
oSheet.Cells(lnRow,lnCol).Value = [proctva]
oSheet.Cells(lnRow,lnCol).Font.Bold = .T.
oSheet.Cells(lnRow,lnCol).HorizontalAlignment = 3

*
*----------------------------------------------------
*       
lnRow = 4
lnBeginRange = lnRow

open database "d:\aplicatie\baza_date\vinzari.dbc" exclusive
use produse
GO TOP
DO WHILE NOT EOF()
    lnRow = lnRow + 1
    oSheet.Cells(lnRow,1).Value = produse.codpr
    oSheet.Cells(lnRow,2).Value = produse.denpr
    oSheet.Cells(lnRow,3).Value = produse.um
    oSheet.Cells(lnRow,4).Value = produse.grupa
    oSheet.Cells(lnRow,5).Value = produse.proctva

    SKIP
ENDDO       

oexcel.SaveAs("D:\aplicatie\automation\ion.xls")
oexcel.quit()

 

 1/27/2010 7:09:19 AM
User is offlineAstalus
126 posts
5th


Re: SaveAs
 (N/A)

intre timp s-a rezolvat

oexcel.activeworkbook.SaveAs("D:\aplicatie\automation\ion.xls")

  Visual FoxPro  Office Automation  SaveAs...

Search  Forum Home         

 Google Ads Minimize

    

Copyright 2002-2010 Profox   Terms Of Use  Privacy Statement