Section 73. Import and Export Sheet Data


73. Import and Export Sheet Data

BEFORE YOU BEGIN

47 Print a Spreadsheet


SEE ALSO

74 About Advanced Spreadsheet Printing

140 Access an Existing Database


As with all the OpenOffice.org programs, Calc works well with data from similar programs such as Microsoft Office and StarOffice. Most of the time, you can load an Excel spreadsheet directly into Calc and work with the spreadsheet as though you had originally created it in Calc. When you load a spreadsheet from another program into Calc, you are using Calc's automatic import feature to bring that data into Calc's workspace. If you want to use Calc data in a program that does not support the OpenDocument format, you must export the spreadsheet data.

KEY TERMS

Import To load data from a non-Calc program into Calc.

Export To save data from Calc so another program can use the data.


NOTES

All spreadsheet programs that support the OASIS standard use the same file extensions. Therefore, any spreadsheet created in StarOffice 8 or KOffice shares Calc's native file extensions: .ods for spreadsheets and .ots for spreadsheet templates.

If you want to use a database you create in Calc in the Base component of OpenOffice.org, you must first register the Calc database with OpenOffice.org. See 140 Access an Existing Database for more information.


73. Import and Export Sheet Data


Although Calc imports virtually all Excel spreadsheets, Calc may have problems importing the following Excel items. If your imported spreadsheets contain any of these items, you may need to adjust the imported spreadsheet manually to eliminate the sections with these items or make a note that the items will not be appearing:

  • AutoShapes

  • OLE objects

  • Advanced Office form fields

  • Pivot tables

  • Non-Calc-supported chart types

  • Excel's conditional formatting

  • Esoteric Excel functions and formulas

Like OpenOffice.org 2.0, StarOffice 8 and KOffice use the new file format developed by the Organization for the Advancement of Structured Information Standards (OASIS), so exchanging documents with StarOffice is virtually seamless. Working with Microsoft Excel files is not quite as transparent but is usually simple enough.

In addition to exporting Calc files to other spreadsheet programs, you can export them as PDF or XHTML files. PDF files are useful for eBooks and for offering as downloads to web page visitors because PDF files can be read on many kinds of computer systems. A primary advantage of PDF files is that they look the same no matter what kind of computer you view them on. The XHTML format is useful for saving a spreadsheet as a web page so that it can be opened in a web browser.

Like a PDF file, an XHTML file cannot be directly edited. People viewing the page in a Web browser can select and copy data, but cannot change it.

KEY TERMS

Portable Document Format (PDF) A file format developed by Adobe Systems, Inc., that enables you to electronically send formatted documents and have them appear onscreen exactly as they would if they were printed.

eXtensible Hypertext Markup Language (XHTML) A nonproprietary file format that lets you save a file as a Web page and ensure that the content and formatting remain intact.


1.
Import Using Open

To import an Excel or other non-OpenDocument format spreadsheet into Calc, simply use File, Open to request the file. Browse the files from the Open dialog box until you find the spreadsheet you want to import and then click OK to import the file into Calc. Almost always, assuming the spreadsheet doesn't contain some advanced or esoteric feature, such as those listed in this task's introduction, the spreadsheet imports perfectly , and you can continue editing and printing it as though you had created the sheet originally in Calc.

NOTE

If you open a spreadsheet created in an earlier version of OpenOffice.org Calc (such as version 1.1), notice that not only do earlier Calc files have a different file extension ( .sxc. ), they also display a different icon in the Open dialog box. Like Excel files, these files open seamlessly in OpenOffice 2.0 and retain most formatting and content.

TIP

After importing a spreadsheet, save the spreadsheet with File, Save As and select the OpenDocument Spreadsheet extension .ods from the Save as type list box to convert the spreadsheet to Calc's native format. This also preserves the file's original Excel format.

2.
Request the Export

Although Calc's File menu contains an Export command, you should only use this command when you want to export your current spreadsheet data to a PDF file (see 36 Save a Document as a PDF File ).

To export your spreadsheet in a non-OpenDocument format, select File, Save As .

3.
Select the Export Type

The Save As dialog box opens, and you select the type of file you want Calc to convert your spreadsheet to in the Save as type list box.

You can export the file to a Data Interchange Format with the .dif extension, a dBASE file with the .dbf extension, one of several versions of Excel (most commonly, the .xls extension is used for Excel spreadsheets), one of several pre-version 8 versions of StarCalc (with the .sdc extension), a SYLK file with the .slk extension, a text-based comma-separated values file (known as a CSV file) with the .csv or .txt extension, or an HTML document with the .html extension, which you would use if you wanted to display your spreadsheet as a Web page.

TIP

The dBASE file format is useful when you use Calc as a database, as you learn in 75 About Calc Databases .

When you click Save , Calc converts the spreadsheet to the format you selected and saves the file under the name you typed in the File name field. A warning dialog box may open if there is any danger of losing content or formatting in the selected format.

4.
Export as PDF

Calc's File, Export as PDF command converts your spreadsheet to Adobe's PDF format (see 36 Save a Document as a PDF File ) and saves the file with the .PDF filename extension. After you save the file, an Options dialog box opens where you can set options such as choosing a range within the document print, or raising or lowering the quality of JPEG images contained in the document. You can customize your new PDF document or accept the defaults and click OK .

You can also use the Export Directly As PDF button on the Standard toolbar instead of the menu command to save a spreadsheet as a PDF document, but you will not be able to choose additional options for saving the file if you go this route.

5.
Export as Web Page

Calc's File, Export command offers two choices: You can export to PDF format (as described in step 4) or you can export to XHTML format. The default file format in the Export dialog box is PDF, so use the File format list arrow to change to the XHTML format.

NOTE

If you try to save an existing Calc spreadsheet in an earlier version of Calc (such as the OpenOffice 1.0 Spreadsheet file format), a dialog box opens to warn you that some formatting or content might be lost. Although you can choose to save in the older format if necessary, it's hard to imagine why anyone would decide not to upgrade to the newer version of the software.


TIPS

An XML (eXtensible Markup Language) format is also available for Excel 2003 XML documents, as well as a PXL (Pocket Excel) format if you want to export to Microsoft's Pocket PC operating system.

Calc's File, Export command also offers the option of converting a file to PDF format, but the File, Export to PDF command offers quicker access to this option.




OpenOffice.org 2, Firefox, and Thunderbird for Windows All in One
Sams Teach Yourself OpenOffice.org 2, Firefox and Thunderbird for Windows All in One
ISBN: 0672328089
EAN: 2147483647
Year: 2005
Pages: 232
Authors: Greg Perry

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net