Outils pour utilisateurs

Outils du site


issue99:libreoffice

Ceci est une ancienne révision du document !


Jimmy Fixit is a self-employed handyman. He does carpentry, roofs, plumbing, lawn work, and flooring. He created a spreadsheet to invoice his customers, but when a customer didn't pay in the allotted time, he needed to send them a late notice. The notice was a detailed letter of what they owed, and a request for them to pay by a certain date. He wanted to add in a table listing the work done and any payments made. He could use a Writer table and do the calculations himself, but if he could insert a spreadsheet into the middle of his text document, he would have everything he needed. Turned out, he can.

Jimmy Fixit est un travailleur manuel indépendant. Il fait de la charpente, des toit, de la plomberie, le soin des pelouses et les revêtements de sol. Il a créé une feuille de calcul pour facturer ses clients, mais, quand un client ne payait pas dans le temps imparti, il avait besoin de leur envoyer une lettre de rappel. le rappel était une lettre détaillée de toute la dette, et une demande de payer avec une certaine date. Il voulait ajouter dans une table la liste du travail effectué et tous les paiements faits. Il aurait pu utiliser un tableau Writer et faire les calculs lui-même, mais, s'il pouvait insérer un feuille de calcul au milieu de document texte, il aurait tout ce dont il avait besoin. En fait, il peut.

Embed a Sheet in Writer with OLE Jimmy solved his problem by using Object Linking and Embedding (OLE) to embed a Calc sheet in his writer document. By embedding a sheet in his document, he was able to use formulas to do calculations on the tax and the total. The embedded sheet worked like a mini spreadsheet within his document. He was able to format the cells, adjust columns and rows, merge cells, and anything else he might do in a spreadsheet opened in Calc. To embed the sheet into his document, Jimmy selected the position in the document where he wanted the sheet to appear. Insert > Object > OLE Object brought up the Insert OLE Object dialog. From the dialog, he selected LibreOffice Spreadsheet from the list. After selecting the spreadsheet object type, he clicked on OK, and Writer created a mini Calc spreadsheet inside Jimmy's document. Jimmy used the eight adjustment handles to fit the inserted object to his document. The cells behaved just like the cells in a regular Calc sheet. He adjusted his rows and columns as needed, formatted his total column, and inserted formulas to calculate the tax due and total. When Jimmy finished, he clicked outside the embedded object to return to writing his document. The tabs and row/column headers disappeared. If at any time, he noticed he had made a mistake, double-clicking inside the embedded object allowed him to edit it again. While editing the object, Writer's toolbars and menus changed to Calc's toolbars and menus. Even the sidebar became the Calc sidebar. Editing the spreadsheet object was the same as having it opened in Calc.

Incorporer une feuille de calcul dans un texte Writer avec OLE

Jimmy a résolu son problème en utilisant OLE (Object Linking and Embedding - Liaison et incorporation d'objet) pour incorporer une feuille de calcul Calc dans son document texte. En faisant ainsi, il était capable d'utiliser des formules pour calculer les taxes et le total. La feuille de calcul incorporé fonctionne comme un mini-tableur dans son document. Il était capable de formater les cellules, d'ajuster les colonnes et les lignes, de fusionner des cellules, et tout autre chose qu'il aurait fait dasn une feuille de calcul ouverte dans Calc.

Pour incorporer la feuille dans son document, Jimmy a sélectionné la position où il veut faire apparaître la feuille dans le document. Insertion > Objet > Objet OLE l'amène dans la boîte de dialogue Objet OLE. Dans le cadre, il sélectionne Classeur LibreOffice dans la liste. Après avoir choisi le type d'objet Feuille de calcul,il cliqua sur OK et Writer créa une mini-feuille de calcul Calc dans le document de Jimmy.

Jimmy utilisa les huit poignées d'ajustement pour adapter la taille de l'objet à son document. Les cellules se comportaient comme les cellules d'un tableur Calc normal. Il ajusta ses lignes et ses colonnes suivant son besoin, formata la colonne des totaux et inséra les formules de calcul des taxes dues et du total. Quand Jimmy a eu terminé, il cliqué en dehors de l'objet incorporé pour retourner à l'écriture de son document. Les onglets, ainsi que les entêtes des colonnes et des lignes, disparurent. Si, à un quelconque moment, il avait remarqué une erreur, il aurait édité à nouveau l'objet incorporé en double-cliquant dessus. Pendant que l'objet est en édition, les barres d'outils et les menus de Writer sont remplacés par ceux de Calc. Même la barre latérale devient celle de Calc. L'édition de l'objet feuille de calcul est identique à ce qu'elle serait en l'ouvrant dans Calc.

OLE Link to an Existing Document Later on, Jimmy started tracking his customers in a Calc document – with each customer's transactions listed on a different sheet. When he had to create a collection notice for a customer, he felt like he was wasting his time just retyping information that already existed. After a little homework, Jimmy discovered that he could insert the data from the existing spreadsheet into the document using OLE linking. Insert> Object > OLE Object once again brought up the Insert OLE Object dialog. Instead of selecting the object type, this time Jimmy clicked “Create from file.” Clicking on the Search button, Jimmy browsed to the location of the spreadsheet containing his customers' records. Selecting the file, he clicked the Open button. Back in the Insert OLE Object dialog, he selected “Link to file” to create a link between the two documents. If he had not selected “Link to file”, the sheet would have been embedded instead of linked. More on the difference in a moment. Just like before, Jimmy got a mini Calc spreadsheet inserted into his document. However, this one was linked to the original spreadsheet document. On the tabs for the different sheets, he clicked the customer which he was creating the document for. Just like before, he had the full use of the Calc menus and toolbars as though he was editing the object directly in Calc. Once he clicked out of the linked sheet, the selected sheet showed in the document without tabs or row/column headers.

The Difference Between Linking and Embedding When Jimmy selected “Link to file”, he created a link between the spreadsheet file and the object in his Writer document. If he had not selected “Link to file”, the spreadsheet would have been embedded instead. When Jimmy linked the two, he created a very powerful tool for himself. Any changes he makes to the original spreadsheet will automatically update in the Writer document. Likewise, any changes he makes to the object in the Writer document will update in the original spreadsheet. The link created a two-way connection between the two documents. He could edit the sheet only in one document at a time. If he opened one document and the other was already open, the spreadsheet opened as read-only copy in the second document. However, if he had only embedded the sheet into the Writer document, no connection is created. Changes to one document would not affect the other. When using OLE, it is important to decide which method is going to best suit your purposes. For Jimmy, linking was the best choice.

Linking Only a Part of a Sheet with DDE As time passed on, Jimmy hired an accountant to keep his books. At the end of every month, Jimmy asked for the business financial status, and the accountant would send him a balance spreadsheet. Jimmy plowed through the long sheet for a few months before deciding it was too much. “Just give me a summary,” he told the accountant. The accountant began copying the summary section of the sheet and sending it to Jimmy, but now, Jimmy was asking for the summary two or three times a week. The accountant needed an easier way; so, he did some studying and discovered Dynamic Data Exchange (DDE). DDE was the predecessor to OLE, but it had one feature he liked. He wanted the ability to give Jimmy a document that would automatically update, but a document Jimmy could not edit. DDE creates a one-way link from the original to the linked document. Formatting and cell styling do not transfer. The table looked like a plain Writer table. Jimmy could edit the cells, but when he reopened the document, any changes were replaced with the data in the original.

To create the DDE link, the accountant copied the cells he needed from the original document. In the new document, he selected Edit > Paste Special. In the Paste Special dialog, the accountant chose the DDE Link option and clicked OK. The data was inserted into the document in a plain, unformatted table. Once the accountant created the document, he no longer had to worry about it. Jimmy could open the document at any time, and the table would update with the latest data in the spreadsheet. Anytime Jimmy asked him for a summary of the business financial status, the accountant just sent him a link to the document containing the DDE link. Jimmy started out with a simple need: to insert a sheet into his document. He was able to accomplish this by embedding a sheet in his document using OLE. As his needs became more complex, he switched to linking to his customer spreadsheet using OLE linking. When Jimmy hired an accountant, the accountant grew tired of providing Jimmy with updates on the business financial status; so, he used the old DDE method to create a link to the document that Jimmy could not change. OLE and DDE allowed Jimmy and his accountant to embed and link data to their documents and automate some of their work.

issue99/libreoffice.1439125957.txt.gz · Dernière modification : 2015/08/09 15:12 de d52fr