cancel
Showing results for 
Search instead for 
Did you mean: 

Convert collection written as text in Excel

Anonymous
Not applicable
Hi all, I am currently working on a process that identifies a range of numbers from a large spreadsheet and writes them in a shorter worksheet for reconciliation following some calculations. When these numbers are written from the collection to Excel they are written in the format "numbers written as text". This means that the cells that include formulas cannot perform the calculations. Even when formatting the cell to any given number format or custom format the calculations cannot be performed. When I manually enter a cell and press the enter key, the calculations are performed. Is there a way to change the format of the collection so that this issue is avoided? I am looping through the collection before it is written to Excel and so I assume the easiest would be if I could do the formatting at this stage. Thanks in advance. Best regards, Lasse
4 REPLIES 4

RobinToll
Staff
Staff
Is the collection set to text fields or number fields? If they are text fields, try storing them as Numbers in the collection. Another thing you could do is, if you're doing ""Write As Collection"", you could try copying individual rows through the clipboard and see if that makes a difference.

Louis-JulienGoo
Level 3
Use the action ""Format Cell"" from MS Excel VBO with Cell Format as ""@"" (=Text) before writing down your collection.

Gilberto.lopez
Level 3
And somebody know how to set format as Number? please help me.

PrateekMehan
Level 6
Hi Gilberto, Try using Utility String - format Number. Or you can write a small code for that also . Thanks, Prateek.