Writing in an Excel file from VB.net when you don't know the range name -


i want write excel using row/column numbers instead of range names. way i've found .cells property error 0x800a03ec when try use it. tried simplify as possible figure out how make work. code bellow works "test1" , error when tries write "test2". i'm running excel 2016 , latest version of visual studio on w10

dim xlapp new excel.application dim xlworkbook excel.workbook dim xlworksheet excel.worksheet  xlworkbook = xlapp.workbooks.add xlapp.visible = true xlworksheet = xlworkbook.sheets("sheet1")  xlworksheet     .range("a1").value = "test1"     .range(.cells(8, 8)).value = "test2" end 

can me figure out how fix or knows alternative method ?

.range(.cells(8, 8)).value = "test2" 

take out .range(). line needs is:

.cells(8,8).value = "test2" 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -