Hi all.
Firstly sorry for my English.
I read all those I found about exporting from VFP 6 to Excel and I learned a lot but in the end I still have two problems.
I need to export from VFP 6 to Excel a table. I did it using COPY TO and, since that I need to modify some cells, I tried using this code (just to test) :
oExcel=CreateObject('Excel.Application')
oExcel.Application.Visible = .f.
oExcel.Workbooks.Open('C:\TEMP\F.xls')
oExcel.Range("A1:C185"
.Select
oExcel.Selection.NumberFormat = "mm:ss"
oExcel.Workbooks.Close()
RELEASE oExcel
All seems work fine but :
1. Excel asks a confirmation for the changes. How can avoid it ?
2. Probably this is an Excel question, but after having applied the new cell format the cells are not recognised as "hh:mm" really till I go into the cell (manually) and simply press 'enter'. After this operation the content is aligned to the right and, i.e., I can sum the cells.
Any tip ?
Thanks in advance.
Marco (Italy)
Firstly sorry for my English.
I read all those I found about exporting from VFP 6 to Excel and I learned a lot but in the end I still have two problems.
I need to export from VFP 6 to Excel a table. I did it using COPY TO and, since that I need to modify some cells, I tried using this code (just to test) :
oExcel=CreateObject('Excel.Application')
oExcel.Application.Visible = .f.
oExcel.Workbooks.Open('C:\TEMP\F.xls')
oExcel.Range("A1:C185"
oExcel.Selection.NumberFormat = "mm:ss"
oExcel.Workbooks.Close()
RELEASE oExcel
All seems work fine but :
1. Excel asks a confirmation for the changes. How can avoid it ?
2. Probably this is an Excel question, but after having applied the new cell format the cells are not recognised as "hh:mm" really till I go into the cell (manually) and simply press 'enter'. After this operation the content is aligned to the right and, i.e., I can sum the cells.
Any tip ?
Thanks in advance.
Marco (Italy)