Question : Fields in the query change since it is a special char

Back to this, hope all have had a safe and holidays...

my table for family code pulls fmcf and fmdesc (A1 Blade, A! knife.....)
But vfp takes the ! and turns it into A_ and so on with the others.

I need the special chars to populate back in my cFinal for COPY TO c:\result.xls type xl5

The original family table has the two fields and if I could even get the description (FMDESC) to populate on the final cursor that would be better than a bunch of Under Scores with no description every where.

Answer : Fields in the query change since it is a special char

To be more specific, you may try this code after COPY TO c:\result.xls type xl5
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
ox = CREATEOBJECT('excel.application')
ox.Workbooks.Open('c:\result.xls')
ow = ox.ActiveWorkbook
? ow.Worksheets(1).cells(1,1).value
? ow.Worksheets(1).cells(1,2).value
? ow.Worksheets(1).cells(1,3).value
? ow.Worksheets(1).cells(1,4).value
? ow.Worksheets(1).cells(1,5).value
? ow.Worksheets(1).cells(1,6).value
? ow.Worksheets(1).cells(1,7).value
? ow.Worksheets(1).cells(1,8).value
? ow.Worksheets(1).cells(1,9).value

ow.Worksheets(1).cells(1,9).value = 'c!'

ow.Save()
ow.Close
ox.Quit

*-- This makes the Excel visible
*-- ox.Visible = .t.
Random Solutions  
 
programming4us programming4us