int rot=0; doc -e LW //Loop over all worksheet in the current workbook only; { string str$= wks.Name$; rot=rot+1; if (str$ != "Sheet1") {rot= ; str$=;}
}; has worked. Thanks. Jonas
quote:Originally posted by yuki_wu
Hi,
I think you may want something like this.
doc -e LW //Loop over all worksheet in the current workbook only
{
string str wks.Name$;
if(str != “Sheet1”)
{
…
}
}
Hi, I want to write name of the sheet to a cell. What shall be corrected in the script below? //; string str$= wks.Name$; str$=; range aa= Sheet1!Col(C)[1]; aa=str$; //; ("str$=" prints sheet name, but sheet name is not written in Col(C)[1].) Please advise.
Range is a data type that allows you to access columns, worksheet, matrix or loose dataset. It is just like a general vector, so you can’t assign a string variable to a vector. While aa[1] is considered as an element of the vector, so it works.