export data to excel
Posted on 2003-03-18
I exported data from a flexgrid to an excel-sheet. Now I have another problem. The data in the flexgrid are not recognized as doubles in excel. All the data with a comma, are recognized as strings. How can I change this? So how can I make excel recognize my data with comma's as normal data.
this is the code:
Set ApExcel = CreateObject("Excel.application") 'Creates an object
ApExcel.Visible = True ' So you can see Excel
ApExcel.Workbooks.Add 'Adds a new book.
For x = 1 To aantal
For y = 1 To aantal
ApExcel.selection.numberformat = ""
ApExcel.Cells(x, y).Value = MSFlexGrid1.TextMatrix(x, y) 'Add Text to a Cell
'You can use the line above, changing coordenates to go to any
'cell and you can also add Formulas