Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add Variables to new row in Excel?
#1
Hi,

I've been looking for a way to add certain variables that i've extracted to a new row in Excel, however I cant find any way of doing this other than manually selecting the new row and then having my macro type the variables into the columns.

For example, I have 3 variables to add to a new row.

Code:
Copy      Help
str a = "Variable 1"
str b = "Variable 1"
str c = "Variable 1"

So if row 1 was clear in my Open excel sheet (Book1) I am tryin to add str a to A1, str b to B1 & str c to C1.
If row 1 already hd data, I would want to add it to the next blank row, e.g B1, B2 & B3.

Is there a way to do this without manually selecting the line to key them in?

Thanks,

Paul
#2
Macro Macro1269
Code:
Copy      Help
;/exe 1

str a = "Varaiable 1"
str b = "Varaiable 2"
str c = "Varaiable 3"

ExcelSheet es.Init
int r=es.NumRows+1

es.SetCell(a 1 r)
es.SetCell(b 2 r)
es.SetCell(c 3 r)


Forum Jump:


Users browsing this thread: 1 Guest(s)