If a field in a CSV file begins with an apostrophe ('
), both Excel and Numbers will treat the field as text, and not render it with any numerical formatting.
Your CSV files appear to try to force text rendering through enclosing number fields in double quotes, but Numbers and Excel don't seem to take the hint that double quote numbers should be treated as strings. The trick seems to be to modify the CSV files so they use the "starts with a single apostrophe" trick rather than the "contained in double quotes" trick for numeric fields, but keep the double quotes for text fields involving punctuation (including commas, quotation marks, line breaks, etc).
To process your CSV files so they do this, you can create an Automator application.
In Automator, create a new Application.
It will have a single action: Run Shell Script (passing input as arguments). Here is the script:
for f in "$@"
do
perl -pi -e "s/\"\"([0-9A-Za-z: \.\-+]+)\"/'\1/g" "$f"
done
Save the resulting application on your Desktop. Drop any CSV files you want to use in Numbers on the application icon, and they will be converted so Numbers should keep the numbers in the fields as literal numbers, and not format them or throw away information.
Back up your data before trying this; it is possible that a particularly oddly constructed string in a record field could throw off the results here.
You can change the default keybindings for OS X text editing with the DefaultKeyBinding.dict file. Make a new text file at ~/Library/KeyBindings/DefaultKeyBinding.dict
, with these contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>^</key>
<string>moveWordLeft:</string>
<key>^</key>
<string>moveWordRight:</string>
</dict>
</plist>
Restart or log out and in, and controlleft and controlright should do what you're looking for. This will work in most OS X apps, but there are some (typically third party text editors) that use their own bindings, which will need to be switched on a case-by-case basis.
Best Answer
The keyboard shortcut for going to the last cell of a row: ⌘+Right Arrow
The keyboard shortcut for going to the first cell of a row: ⌘+Left Arrow
The keyboard shortcut for going to the last cell of a column: ⌘+Down Arrow
The keyboard shortcut for going to the first cell of a column: ⌘+Up Arrow
This will save holding the arrow key down repeat extending beyond the table bounds resulting in the annoying beeping/screen flash error.