{"action":"created","issue":{"url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/55","repository_url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet","labels_url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/55/comments","events_url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/55/events","html_url":"https://github.com/PHPOffice/PhpSpreadsheet/issues/55","id":195557061,"number":55,"title":"Phone numbers in format +1234567890 are being miss-interpreted as FORMAT_NUMERIC","user":{"login":"Quix0r","id":470798,"avatar_url":"https://avatars.githubusercontent.com/u/470798?v=3","gravatar_id":"","url":"https://api.github.com/users/Quix0r","html_url":"https://github.com/Quix0r","followers_url":"https://api.github.com/users/Quix0r/followers","following_url":"https://api.github.com/users/Quix0r/following{/other_user}","gists_url":"https://api.github.com/users/Quix0r/gists{/gist_id}","starred_url":"https://api.github.com/users/Quix0r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quix0r/subscriptions","organizations_url":"https://api.github.com/users/Quix0r/orgs","repos_url":"https://api.github.com/users/Quix0r/repos","events_url":"https://api.github.com/users/Quix0r/events{/privacy}","received_events_url":"https://api.github.com/users/Quix0r/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-14T15:13:37Z","updated_at":"2016-12-15T16:17:09Z","closed_at":null,"body":"My CSV file looks like this:\r\n\r\n> \"FirstName\";\"FamilyName\";\"PhoneNumber\";\"Supplier\";\"Birthday\"\r\n> \"Max\";\"Mustermann\";\"+49123456789\";\"csv-test\";03.01.1981\r\n\r\nThe shown phone number is with current code being interpreted as FORMAT_NUMERIC. But as you can see, I have wrapped it into quotes which should mean FORMAT_STRING. This causes the correctly formatted phone number being returned as 49123456789 and not +49123456789.\r\n\r\nIf my code sees 49123456789, it auto-prepends a leading zero so the numer is being \"fixed\". Sadly I cannot turn leading 49 into zero because there are also valid phone numbers with 49 in pre-dial code.\r\n\r\nSo is there a clean way to force PHPSpreadsheet (same with PHPExcel!) to interpret it as FORMAT_STRING (e.g. with **@** symbol being set to text)?"},"comment":{"url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/comments/267369456","html_url":"https://github.com/PHPOffice/PhpSpreadsheet/issues/55#issuecomment-267369456","issue_url":"https://api.github.com/repos/PHPOffice/PhpSpreadsheet/issues/55","id":267369456,"user":{"login":"Quix0r","id":470798,"avatar_url":"https://avatars.githubusercontent.com/u/470798?v=3","gravatar_id":"","url":"https://api.github.com/users/Quix0r","html_url":"https://github.com/Quix0r","followers_url":"https://api.github.com/users/Quix0r/followers","following_url":"https://api.github.com/users/Quix0r/following{/other_user}","gists_url":"https://api.github.com/users/Quix0r/gists{/gist_id}","starred_url":"https://api.github.com/users/Quix0r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quix0r/subscriptions","organizations_url":"https://api.github.com/users/Quix0r/orgs","repos_url":"https://api.github.com/users/Quix0r/repos","events_url":"https://api.github.com/users/Quix0r/events{/privacy}","received_events_url":"https://api.github.com/users/Quix0r/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T16:17:09Z","updated_at":"2016-12-15T16:17:09Z","body":"I think I have an idea:\r\n\r\n- add helper field e.g. $columnFormats in value binder\r\n- pre-set data type (from class `DataType`) per column/worksheet in helper field (through setter, of course)\r\n- in bindValue() check if a format is set, if so use it for validation of value and bind it with correct format\r\n"}}
{"actor":{"display_login":"Quix0r"}}