Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] icsv - v.Cell - breaks after 10 loops

I'm trying to write some text to a csv file. The code works...only up to around 10 times. Once rowpos = 10 or so, I get this error on the line indicated below...

Error (RT) in write comments to csv file: 0x80070057, The parameter is incorrect. ?

Macro write comments to csv file
Copy      Help
int i
int rowpos
str tempstr

Acc a.Find(w "PUSHBUTTON" "[]View" "class=*.Window.*[]wfName=ribbonBarWriteView" 0x1005)

for rowpos 0 50
,a.Find(w "PUSHBUTTON" "[]View" "class=*.Window.*[]wfName=ribbonBarWriteView" 0x1005)
,tempstr.findreplace("<p>" "")
,tempstr.findreplace("</p>" "[]")
,tempstr.findreplace("<br />" "")
,v.Cell(rowpos 0)= tempstr   ;;<-------------- keeps breaking here after when rowpos is about 10

Hi Gintaras,

I'm still stuck on this problem. Please help when you get a chance.
To debug, insert this line before.
,out F"{rowpos} {v.RowCount}"
I ran it with your code and I got this

9 9

ps. here's how I did it

Macro write comments to csv file
Copy      Help
,out F"{rowpos} {v.RowCount}"
,v.Cell(rowpos 0)=tempstr  ;;<-------- this is the problem! ONLY this "Error (RT) in write comments to csv file:  0x80070057, The parameter is incorrect.    ? " it seems like once it reaches double digits it dies
,out F"---------------------{rowpos}"
,out v.Cell(rowpos 0)

in the other thread you said, I solved it? "incorrect row index."


I'm sorry, but I'm lost. All I know is that's the output ( 9 9) I got from the code that you gave me.

I don't know understand why it breaks after this. In other words, I don't know why I can't write more than 10 rows.

What do I need to do to make it work?
Add 50 rows. Or stop setting cell values when rowpos becomes = v.RowCount.
Thanks for that. It works fine now.

Forum Jump:

Users browsing this thread: 1 Guest(s)