25-09-15, 05:35 PM
PHP كود :
Dim MyExcel As New Excel.Application
Dim R As Integer, C As Integer
MyExcel.Workbooks.Open App.Path & "\2.xls"
For R = 0 To MsFlex.Rows - 1
For C = 0 To MsFlex.Cols - 1
MsFlex.row = R
MsFlex.Col = C
If MsFlex.CellBackColor = 0 Then
If R = 0 Then
MyExcel.ActiveSheet.Cells(R + 1, C + 1).Interior.Color = RGB(212, 208, 200)
Else
MyExcel.ActiveSheet.Cells(R + 1, C + 1).Interior.Color = vbWhite
End If
Else
MyExcel.ActiveSheet.Cells(R + 1, C + 1).Interior.Color = MsFlex.CellBackColor
End If
MyExcel.ActiveSheet.Cells(R + 1, C + 1).Interior.Pattern = xlSolid
MyExcel.ActiveSheet.Cells(R + 1, C + 1).BorderAround 1, xlThin, xlColorIndexAutomatic
MyExcel.ActiveSheet.Cells(R + 1, C + 1).Value = MsFlex.TextMatrix(R, C)
Next C
Next R
MyExcel.Visible = True
Set MyExcel = Nothing
سبحان الله والحمدلله ولا إله إلا الله والله أكبر
اللهم اغْفِرْ لِلمؤمنين والمؤمنات والمسلمين والمسلمات الأحياء منهم والأموات