This might be a similar idea to Mike's, but here goes:
You would need to create and utilize a string variable (e.g. %A) which pads n with leading zeros by checking its character length.
The script below is an example. It uses ii instead of n.
for(ii=1;ii<=10;ii++)
{
%A=$(ii);
if(%[%A]==1)
{
%A="00$(ii)";
}
if(%[%A]==2)
{
%A="0$(ii)";
}
%A="%Afile.xls";
type -a "The filename is: %A";
}
To execute the script and view its output:
- Copy and paste the script into the Origin Script window (Window => Script Window).
- Highlight the script.
- Press the ENTER key on your keyboard.