En Números en una MacBook Pro a principios de 2013, ¿cómo se puede saltar a una línea específica, como la línea 4223860.
Los datos están en realidad en formato csv, y no tengo idea de lo que hay dentro de esa línea.
Cualquier ayuda es muy apreciada.
En Números en una MacBook Pro a principios de 2013, ¿cómo se puede saltar a una línea específica, como la línea 4223860.
Los datos están en realidad en formato csv, y no tengo idea de lo que hay dentro de esa línea.
Cualquier ayuda es muy apreciada.
Si tiene problemas para abrir el archivo y solo desea ver esa línea, intente lo siguiente en la Terminal. Si nunca ha usado Terminal antes, tenga en cuenta que debe navegar al directorio donde está el archivo primero, lo más fácil es copiar ese archivo en su Escritorio y ejecutar el siguiente comando en Terminal para navegar a su carpeta de escritorio:
cd ~/Desktop
Luego ejecuta este comando:
head -4223860 mybigfile.csv|tail -1 > export.csv
donde "mybigfile.csv" sería su nombre de archivo y export.csv es el nombre del archivo exportado. También puede mostrar la línea en el terminal sin guardar en ningún archivo con:
head -4223860 mybigfile.csv|tail -1
No puede hacer esto en Números de forma nativa, pero AppleScript ayuda:
Cree una
_main()
on _main()
tell application "Numbers"
if not (exists document 1) then return
set {table:_table} to my _selection(document 1)
if _table is missing value then
display dialog "Select some cell(s) in target table first"
return
end if
tell _table
set {rk, cn} to {count rows, column -1's name}
end tell
repeat
display dialog "Enter cell name" & return & ¬
" row in 1.." & rk & return & ¬
" column A.." & cn default answer ("A" & rk) with title "Select Cell"
set cellname to text returned of result
try
tell _table
set selection range to range cellname
end tell
exit repeat
on error
display dialog "Unable to select the specified cell: " & cellname
end try
end repeat
end tell
end _main
on _selection(doc)
(*
reference doc : target document
return record : {range:_range, table:_table, sheet:_sheet}
_range = reference to named range in selection
_table = table object to which selection range belongs
_sheet = sheet object to which selection range belongs
*)
(*
Limitation
Numbers allows to select uncontinuous regions
but its scripting interface does not provide decent method to retrieve them.
If uncontinuous regions are selected, 'selection range' returns the minimum continuous region
which includes all the regions in selection.
*)
script o
property parent : {}
property pp : {}
local q, r, s, _range, _table, _sheet
tell application "Numbers"
set pp to doc's every sheet's every table's selection range as list
repeat with p in my pp -- per sheet
set q to p's every specifier -- retrieve object (filtering out missing value)
if q ≠ {} then
set q to q's item 1 -- selection range object [1]
set r to q as record -- selection range object specifier record [2]
set _table to r's every specifier's item 1 -- container table reference [3]
set s to (a reference to _table's selection range) -- selection range reference [4]
set _range to (a reference to _table's range (s's name)) -- named range reference [5]
set _sheet to (_table as record)'s every specifier's item 1 -- container sheet reference [3]
return {range:_range, table:_table, sheet:_sheet}
end if
end repeat
return {range:missing value, table:missing value, sheet:missing value}
end tell
(*
[1] class specifier for 'range' is broken in Numbers 09
[2] «class want» value is broken in Numbers 09
[3] simple method to get «class from» value without asking for «class from» key which causes trouble in recompilation of the token 'from'.
[4] proper reference of selection range object
[5] proper reference of named range object
*)
end script
tell o to run
end _selection
y colóquelo en ~ / Library / Scripts / Applications / Numbers.
Parece que existe un límite de 65535 filas y 255 columnas para los archivos de Numbers. Así que una "línea" 4223860 no se puede importar y, por lo tanto, no se puede mostrar.
Probado en 10.9.5 y Números 3.2.2. Robado descaradamente allí: fuente - que también proporciona otros métodos, incluido uno con un acceso directo.