I'd like to export data from a webpage to Excel. It works but I still have some problems.
first I don't know how to create borders around my cells...
here is the VBA code which I can't "translate"
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
I tried using this, but it doesn't work
$cell=$sheet->Range('A'.$ligne);
$lacellule=$cell->Borders->xlEdgeLeft;
$lacellule->Weight='xlMedium';
another problem : how can I insert a row?
for example I select the 24th row (which is already well formated), and I insert another row, which will automaticaly have the same format (colors & borders)