Voila, j'ai une mshflexgrid dans un programme que j'aimerais exporté sous excel.

J'ai déja une fonction qui m'envoie les données sous excel et qui fonctionne, mais mes lignes et collones qui sont fusionnées dans ma flexgrid ne le sont plus sous Excel.

Ma question est donc de savoir comment exporter correctement mes données sous excel en gardant la mise en forme exact de ma flexgrid.

D'avance merci

@++
dubidon

ps: voici une partie du code d'export sous excel
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
    For IntI = 1 To MSHFlexGrid1.Rows - 1
        MSHFlexGrid1.row = IntI
        For Intj = 0 To MSHFlexGrid1.Cols - 1
            MSHFlexGrid1.col = Intj
            If MSHFlexGrid1.ColWidth(Intj) <> 0 Then
                If TabLongCol(Intj) + 1 < Len(Trim(MSHFlexGrid1.Text)) Then TabLongCol(Intj) = Len(Trim(MSHFlexGrid1.Text)) + 1
                ' ---- est ce un format date ?
                If MSHFlexGrid1.ColData(Intj) = 2 And EstDate(MSHFlexGrid1.Text) Then FormatCol = "<col Format='d/m/yyyy'>" Else FormatCol = ""
                Print #IntFileNum, "<td><borders Index='10'>" & IIf(MSHFlexGrid1.CellBackColor < 0, "", "<interior Color='" & MSHFlexGrid1.CellBackColor & "'>");
                If FormatCol = "" Then
                    Print #IntFileNum, MSHFlexGrid1.Text;
                Else
                    Print #IntFileNum, FormatCol & Str(DateToLong(MSHFlexGrid1.Text) + 1);
                End If
                Print #IntFileNum, "<col Large='" & TabLongCol(Intj) & "'></td>";
            End If
        Next Intj
        Print #IntFileNum,
    Next IntI