需要添加几行到表格最后我的代码是:
Set xlBook = xlApp.Workbooks.Open(TextBox1.Value, ReadOnly = True)
Set xlsheet = xlBook.Worksheets("GLCD+PLCD&SUFFIX")
maxno = xlsheet.UsedRange.Rows.Count
Set newrow = xlsheet.Rows.Add(BeforeRow:=xlsheet.Rows(maxno))可运行到添加哪行总是告诉我:对象不支持该属性和方法
大家帮我看看有什么问题
Set xlBook = xlApp.Workbooks.Open(TextBox1.Value, ReadOnly = True)
Set xlsheet = xlBook.Worksheets("GLCD+PLCD&SUFFIX")
maxno = xlsheet.UsedRange.Rows.Count
Set newrow = xlsheet.Rows.Add(BeforeRow:=xlsheet.Rows(maxno))可运行到添加哪行总是告诉我:对象不支持该属性和方法
大家帮我看看有什么问题
xlsApp.ActiveSheet.Rows(maxno).Insert
2) Excel 末尾添加不需要任何插入操作,maxno 的下一行可以直接填充数据。
xlsheet.Cells(A, maxno + 1).Value = "asdfasdfasdf"
好像不行啊。
xlsheet.Cells(30, 5).Value = "123" 'Cells(30, 5)--第30行、第5列,等同于 Range("E30")