我用以下代码打开一个execl文档,想在里面添加内容,但是打开之后提示文件为只读的。不知道如何解决。请高手指教!
Dim ex As New Excel.Application
Dim exwbook As Excel.Workbook
Set ex = CreateObject("excel.application")
Set exwbook = ex.Workbooks.Open("C:\book1.XLS")
exwbook.Application.Visible = True
exwbook.Worksheets.Application.name = Me.用人单位名称.Value
exwbook.Worksheets.Application.Cells(1, 1) = "单位名称"