Importing on .Net converting text field to a number

 Hi,


I'm trying to set up an import schedule for a supplier and the CSV file they provide has the Price field as a text field. It includes the currency symbol and occasionally the term 'from £xx.xx'


Whislt I can remove the currency symbol and 'from' term using the expressions available in import i'm struggling to convert a number such as "3.5" to a number that could be put in the Price field of linnworks on import?


Maybe over-thinking this however can't find a expression such as Value['N'] in excel that would convert text 'N' to number.


The most common error I get on various expressions are 'N2[] operand function requires the first parameter to be a double' tried asb[] which fails


Any suggestions would be appreciated.


Regards,

Phil.

Hello Phil,



 Thank you for your question. In order to replicate this the I created a file with this data:

SPA_Import_Replace_SourceFile.PNG

(Retail price column format is set to "text")


 Imported the file and added expression that I mapped to "Retail price" and used replace (Replace[Replace[v{Retail price}, "£", ""], "from ", ""])

SPA_Import_Replace_ImportMap.PNG


 And the result was this:

SPA_Import_Replace_Result.PNG


 Number 7.5 was fine for Linnworks, and it added 0 to the end by itself. Alternatively, you could also run replace against the Excel file and then choose the whole price column and format them all to the desired format.


Hope this helps.



With Best Regards,

Rimo


Technical Support


Login to post a comment