function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Marina PesciniMarina Pescini 

number type with dataloader

Hi, I am an administrator and not a developer. I am exporting data from Price Book Entry with DataLoader, but it exports prices in text format. Is there a SOQL code to convert them into numbers? 
thks
Chris SweetChris Sweet
Hi Marina, that's strange that it's being exported as a string instead of a number. I've tried this a few ways and get the same results, always showing as a number. Can you post the SOQL that you're using so I can try that out?
Marina PesciniMarina Pescini
Hi Chris,
this is the query
SELECT Id, UnitPrice FROM PricebookEntry
 
Chris SweetChris Sweet
Yeah, that should work. If you open up this file in a basic text editor (e.g. Notepad) does it look like text, or could it be something Excel is doing?
Marina PesciniMarina Pescini
I open it in excel and it is not a number..
Chris SweetChris Sweet
It's tough for me to tell how this is being formatted without seeing the raw data. Can you paste a few lines from the exported CSV as well as a screenshot of some lines in Excel?
Marina PesciniMarina Pescini

List Price
8580.0
8.58
15015.0
15.02
45.05

I have copied and pasted only the list price column so it's clearer
Marina PesciniMarina Pescini
In the meantime I have found a workaround: I replace all "." with "," and Excel automatically transform che cells' format in number; but I would like something more automatic..
Chris SweetChris Sweet
Ok, so I think I see where the confusion lies here. It sounds like you're using comma as your decimal point instead of a period. I'm guessing your Excel is set up to understand that, but your Salesforce instance is using period as the decimal point.

What may be able to help you is to change your Locale setting on your user record to your country. I haven't tested this, but it may help starting there.

There is something on the Idea Exchange about this if you're curious, but looks like it has very little interest: https://success.salesforce.com/ideaView?id=08730000000l6rcAAA