7.2 Adding Objects to Worksheet

Summary

Both worksheet header rows and data cells can contain embedded objects, linked objects as well as formatted text. In addition, floating graphs can be added to the worksheet like Excel.

Note: Beginning with Origin 2018, any inserted graph, whether it be a an editable graph, a graph inserted as a linked or static picture, an image inserted from file, or a sparkline, will generate a pop-up preview when you hover on the containing worksheet cell.

What you will learn

  • How to insert various objects into a worksheet cell.
  • How to add floating graph to worksheet.

Steps

Inserting Objects in Cells

  1. Start with a New Project by clicking on the New Project button Button New Project.png.
  2. Click on the Import Wizard button . In the Import Wizard - Source page, browse to select S15-125-03.dat file in Origin's Sample\Import and Export folder. Click on the Finish button to complete the importing.
  3. Highlight columns A(X) and B(Y), choose Plot > 2D: Scatter: Scatter from the menu or click on the Scatter Plot button Button Scatter.png to create a graph.

    Inserting Objects In Cells 1.png

  4. Return to the workbook and select the Column: Add New Columns... from the menu or click on the Add New Columns button Button Add New Columns.png to add 3 columns.
  5. Expand the workbook so you can see all 7 columns.
  6. In the row 1 of E(Y), type New Features and press Enter.
  7. Select cell E1, and then click the Bold button Button Bold.png on the Format Toolbar.
  8. Click the Font Color button Button Font Color.png on the Format Toolbar and pick Yellow as the color.
  9. Click the Fill Color button Button Fill Color.png on the Style Toolbar and pick Blue as the color.
  10. Select the range E1 to F1, click the Merge cells button Button Merge Cells.png.
  11. Right-click on cell G1 and choose Insert Arrow: Left from the context menu to insert a arrow to the cell.
  12. Select the range E2 to G12, click the Merge cells button Button Merge Cells.png.
  13. Right-click on the cell and choose Insert Graph.
  14. In the InsertGraph dialog, type Graph1 in the large Graphs box or click on the Browse button Button Browse.png to select Graph1.

    Inserting Objects In Cells 2.png

  15. Click OK to close this dialog.
  16. Right-click on E13 to choose Insert Images from Files from the context emnu.
  17. Click the Browse button Button Browse.png and change the Files of Type to Bitmap (*.bmp).
  18. In the Origin User File Folder, select the Userdef.BMP, click Add File(s) button and then click OK button.
  19. Click OK button to close the InserImg dialog.
  20. Right-click on cell F13 to choose Insert Notes.
  21. Double-click on cell F13. Modify the text and then close the Notes window. A note wil be saved in the cell.
  22. Right-click in E14 and choose Insert Sparklines to open the InsertSparklines dialog.
  23. In the dialog, click the Data Columns fly-out button to choose C(Y). Uncheck Long Name in 1st Column check box.

    Inserting Objects In Cells 4.png

  24. Click OK to close the dialog. A sparkline will appear in the cell.
  25. Click on cell E15 and type: http://www.originlab.com and press Enter.
  26. Click on the text in E15 which opens your web browser to the OriginLab web site.
  27. Click on cell E16 to choose Insert Variables from the context menu. The Insert Variable dialog opens.
  28. with the worksheet Book1 is selected in the right panel, go to the Info tab, expand the USER.VARIABLES branch, select SAMPLE and then click on the Insert button. A variable will be inserted to the cell.

    Inserting Objects In Cells 8.png

  29. Double-click on the cell E16, the text will change to a variable string.

    Inserting Objects In Cells 5.png

The Graph, Notes and Sparklines in the above lesson are all examples of embedded objects (the Insert Graph could be either Embedded or Linked.) Embedded objects present a visual of a hidden external object that can be opened by double-clicking. Changes to the object can be made and then the object window can be closed and the source worksheet cell is updated.

Adding floating Graph to worksheet

  1. Continue the above project. Highlight Col(D) in Book1 to plot a line graph.
    Inserting Objects in Cells 06.png
  2. In Book1, right-click the empty area or title of the book to select Add Graph:Graph1 from the context menu. The graph is added to the sheet. Note: Origin pre-loads the last-created graph to the Add Graph shortcut command. If you only see the shortcut Add Graph (no named graph following the shortcut command), clicking Add Graph will open the Graph Browser. In the Graph Browser, select your graph and click OK to insert the graph and return to the worksheet.
  3. Left-click and hold down the mouse button on the graph and drag it to reposition it on the worksheet.
    Inserting Objects in Cells 07.png