>I've got a comma separated values file (csv) that opens in a webBrowser control hosted in a VFP9 form. It appears rendered as a spreadsheet (Excel) and is editable.
>
>How can I prevent the contents from being changed?
>
>I've tried to set the file as readonly, but, it does not help; the user can still edit the content.
>
>TIA
>Mike
#define xlNoSelection -4142
oXLS = myWBControl.Object.Document
oExcel = oXLS.Application
oExcel.CommandBars("Standard").visible = .F.
oExcel.CommandBars("Formatting").visible = .F.
oExcel.ActiveWorkbook.ActiveSheet.EnableSelection = xlNoSelection
oExcel.ActiveWorkbook.ActiveSheet.Protect(,,.T.,,.T.)
Cetin