Home > database >  How to put the memory in VFP, an array of disposable assigned to EXCEL in the table?
How to put the memory in VFP, an array of disposable assigned to EXCEL in the table?

Time:09-26

VB can be disposable, the contents of an array of disposable assigned to a section of the EXCEL table
SsArr (10, 5) is a 10 lines 5 column form, has the assignment
.
Xlsapp. Sheets (1). The Range (" A1: E10 ")=ssArr
.
This assignment is successful
But in VFP values, the same assignment, the results for each single cell ssArr values (1, 1), need through the circulation and assign each cell can be achieved, whether there is a better way?

CodePudding user response:

VFP seems to really have no,

CodePudding user response:

Can be saved as a excel table, as for the writing of excel, or use scan to write

CodePudding user response:

The following code is to sleep on the night of urban teachers to write code that is only for reference:
 Local ASZ [50, 7] 
Store [] To ASZ
For lnI=1 To 50
For lnI1=1 To 7
ASZ [lnI, lnI1]=Padl (lnI * lnI1, 4, [0])
Endfor
Endfor

The Local cc, oo As Excel. Application

M.o o=Newobject (' Excel. Application)
If m.o o.W orkbooks. Count & lt; 1
M.o o.W orkbooks. The Add ()
Endif
If m.o o.W orkbooks (1). Sheets. Count & lt; 1
M.o grown heets. The Add ()
Endif

The TEXT to m.c noshow c
Sub ArrayFill (vfparray)
Range (" b2 "). The Resize (UBound (vfparray, 1), UBound (vfparray, 2)). The Value=https://bbs.csdn.net/topics/vfparray
End Sub
ENDTEXT
* do the following this line of the trust of the need to check the Excel options: tools - & gt; The macro - & gt; Security - & gt; Reliable distributors - & gt; Trust in "VB program" visit
M.o o.A ctiveWorkbook. VBProject. VBComponents. Add (1). The CodeModule. Method AddFromString (m.c c)
M.o o.R UN (' ArrayFill '@ asz)
M.o o.V isible=. T.

CodePudding user response:

The VFP is not, I tried to use for to solve!
  •  Tags:  
  • VFP
  • Related