Excel format cell then set cell
Posted: Thu Feb 15, 2018 5:16 pm
I have run into an issue with using the Excel set cell action. I have a text file that has rows of numbers, many of which have leading zeroes. When I do a text loop to get each number and load to an Excel file, the zeroes are dropped in Excel. I have Excel template files which have the specific column format set to text. I have also tried setting the format using the format cell = @.
Neither of these help. When the number is put into the cell in Excel, the format is reset to general and leading zeroes dropped. I also tried adding a single quote to the beginning of the variable holding the number when I set the cell. This appears to work but I end up with a leading single quote in the cell. This Excel file will eventually be used in another process and there cannot be anything other than the number in the cell.
When the file is opened and the numbers are pasted into the Excel file (outside of RoboTask), it works as needed. Any suggestions?
Neither of these help. When the number is put into the cell in Excel, the format is reset to general and leading zeroes dropped. I also tried adding a single quote to the beginning of the variable holding the number when I set the cell. This appears to work but I end up with a leading single quote in the cell. This Excel file will eventually be used in another process and there cannot be anything other than the number in the cell.
When the file is opened and the numbers are pasted into the Excel file (outside of RoboTask), it works as needed. Any suggestions?