It:Importare una tabella HTML da una pagina Web in un documento di Calc

From NeoWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 22:29, 9 March 2007 (edit)
Valterb (Talk | contribs)

← Previous diff
Current revision (07:17, 25 January 2010) (edit) (undo)
Sardisson (Talk | contribs)
(Importare con sincronizzazione - oops, whole section was missing)
 
(3 intermediate revisions not shown.)
Line 26: Line 26:
* Definisci eventualmente una frequenza di aggiornamento dei dati spuntando la cesella {{prefName|Aggiorna ogni}} e regolando la frequenza di aggiornamento. * Definisci eventualmente una frequenza di aggiornamento dei dati spuntando la cesella {{prefName|Aggiorna ogni}} e regolando la frequenza di aggiornamento.
-{{botlangbarIT|[[Fr:Importer_des_Tableaux_HTML_dans_un_Document_Calc|Français]]}}+===Opening auto-generated <code>xls</code> files in Calc===
 +Some websites create auto-generated files that are actually HTML files, but which have an <code>xls</code> extension. Excel will open these files correctly, but if you try to open them with NeoOffice, they will open in Writer, because NeoOffice recognizes that they are HTML files. [[user:thanson|thanson]] offered the following solution in the [http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&p=40923#40923 trinity forums].
 + 
 +This procedure assumes that the troublesome spreadsheet has been saved to your local machine - that is, the file that has the embedded HTML forcing it to open in Writer/Web.
 + 
 +* Open a new blank spreadsheet in Calc.
 +* In the {{menu|Insert}} menu, choose {{menu|Link to External Data…}}.
 +* The {{window|External Data}} window appears, asking you for the "URL of external data source" - obviously, you don't need the URL as the file is already on your hard drive. So then, click the browse button ({{button|...}}) just to the right of the URL field. Browse to the location of the spreadsheet, select the file, and Calc will attempt to find the data tables in the spreadsheet. Be prepared to wait a minute or two as Calc digs though the file attempting to make sense of what it has found.
 +* Once Calc has sifted through the file you'll see a few choices in the {{section|Available tables/ranges}} section - I had several options from which to choose, including {{prefName|HTML_tables}}, {{prefName|HTML_all}}, and {{prefName|HTML_1}}
 +* Select the table you want to insert into the spreadsheet and click {{button|OK}}. I simply selected {{prefName|HTML_all}} and got what I needed, but I suppose that you could select only specific tables if you wanted to exclude some data.
 + 
 +Another option is to open a new, blank spreadsheet and choose {{menu|Sheet From File…}} from the {{menu|Insert}} menu. Select your file, choose which sheet to import from the file, and the position to insert the imported sheet in the blank spreadsheet, and then click {{button|OK}}.
 + 
 +'''N.B.''' NeoOffice's underlying OpenOffice.org HTML import code assumes these sorts of files are always ISO-8859-1 (or Latin 1)-encoded. If your file is in a different encoding (for instance, UTF-8), you will need to modify the file in a text editor to prevent corruption of non-ASCII characters. At the beginning of the file, add <pre><nowiki><meta http-equiv="Content-Type" content="text/html;charset=utf-8"></nowiki></pre> (for a UTF-8-encoded file) in order to allow the HTML import code to know the correct character encoding.
 + 
 +{{botlangbarIT|[[Fr:Importer_des_Tableaux_HTML_dans_un_Document_Calc|Français]] [[:Importing HTML Tables into a Calc Document|English]]}}
[[Category:Tips and Hints]][[Category:NeoOffice]][[Category:NeoWikiIT]] [[Category:Tips and Hints]][[Category:NeoOffice]][[Category:NeoWikiIT]]

Current revision

Il modulo Calc di NeoOffice vi permette di salvare una tabella presa da una pagfina internet. Per farlo sono possibili vari metodi, ed uno di questi ti permette di sincronizzare la tabella con quella del sito internet dove si trova.

Importare senza sincronizzazione

Puoi, a partire da un browser, selezionare la tabella presente in una pagina internet e fare un semplice copia ed incolla in un foglio di calcolo.
Tuttavia a volte succede che la tabella incollata si posiziona tutta nella sola prima colonna. VPuoi allora utilizzare uno dei due metodi seguenti:
Primo metodo:

  • Copia la tabella dalla pagina web.
  • Apri un documento Calc e nel menù Modifica, scegli il sub-menù Incolla speciale e una delle due opzioni per raggiungere il risultato voluto.

Secondo metodo, utilizzabile se la pagina è di libero accesso:

  • Apri un documento di Writer Web. Per farlo
    • Vai nel menù File, scegli il sub-menù Nuovo eppoi Documento HTML.
  • Copia l'URL della pagina web contenente la tabella voluta e incollalo nel campo Carica URL situata in alto a sinistra nella barra degli strumenti standard del documento (se tu non vedessi il campo, vai in fondo a destra nella barra degli strumenti standard, premi sulla freccetta presente; si aprirà un menù a discesa, scegli pulsanti visibili e smarca Carica URL).
  • Premi il tasto Invio.
  • Seleziona la tabella che vuoi inserire nel foglio di calcolo e copiala Cmd-C.
  • Incollala Cmd-V nel tuo documento Calc.

Importare con sincronizzazione

La pagina internet deve essere di libero accesso.
Se vuoi che la tabella rimanga sincronizzata con la pagina internet puoi procedre come spiegato qui di seguito:

  • Apri la pagina internet contenente la tabella che vuoi importare.
  • Copia l'URL.
  • Apri un documento Calc e seleziona una cella.
  • Scegli il menù Inserisci eppoi il sub-menù Collegamento a dati esterni….
  • Nel campo URL della sorgente dati esterna della finestra Dati esterni incollare l'URL e premere il tasto Invio.
  • Nella sezione Sezioni/tabelle disponibili seleziona le opzioni HTML_tables e HTML_all eppoi clicca su OK.
  • Definisci eventualmente una frequenza di aggiornamento dei dati spuntando la cesella Aggiorna ogni e regolando la frequenza di aggiornamento.

Opening auto-generated xls files in Calc

Some websites create auto-generated files that are actually HTML files, but which have an xls extension. Excel will open these files correctly, but if you try to open them with NeoOffice, they will open in Writer, because NeoOffice recognizes that they are HTML files. offered the following solution in the trinity forums.

This procedure assumes that the troublesome spreadsheet has been saved to your local machine - that is, the file that has the embedded HTML forcing it to open in Writer/Web.

  • Open a new blank spreadsheet in Calc.
  • In the Insert menu, choose Link to External Data….
  • The External Data window appears, asking you for the "URL of external data source" - obviously, you don't need the URL as the file is already on your hard drive. So then, click the browse button (...) just to the right of the URL field. Browse to the location of the spreadsheet, select the file, and Calc will attempt to find the data tables in the spreadsheet. Be prepared to wait a minute or two as Calc digs though the file attempting to make sense of what it has found.
  • Once Calc has sifted through the file you'll see a few choices in the Available tables/ranges section - I had several options from which to choose, including HTML_tables, HTML_all, and HTML_1
  • Select the table you want to insert into the spreadsheet and click OK. I simply selected HTML_all and got what I needed, but I suppose that you could select only specific tables if you wanted to exclude some data.

Another option is to open a new, blank spreadsheet and choose Sheet From File… from the Insert menu. Select your file, choose which sheet to import from the file, and the position to insert the imported sheet in the blank spreadsheet, and then click OK.

N.B. NeoOffice's underlying OpenOffice.org HTML import code assumes these sorts of files are always ISO-8859-1 (or Latin 1)-encoded. If your file is in a different encoding (for instance, UTF-8), you will need to modify the file in a text editor to prevent corruption of non-ASCII characters. At the beginning of the file, add
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
(for a UTF-8-encoded file) in order to allow the HTML import code to know the correct character encoding.


Questo articolo in altre lingue: Français English
Personal tools