Hi. You did that wrong. PadLeft will fill in all characters up to 7 characters, so it is putting single quote to make it ''28784
instead of '0028784
You want to zero fill it with the “0” character, then just place single quote at the start.
Cell = "'"+cell.tostring.padleft(7,cchar(“0“))