Spread Windows Forms 11.0 Product Documentation
Opening a Spread COM File
Spread Windows Forms 11.0 Product Documentation > Developer's Guide > Managing File Operations > Opening Existing Files > Opening a Spread COM File

You can open an existing file from the COM version of Spread (Spread COM 7.0 or later). For details on opening a Spread COM file, refer to the OpenSpreadFile methods of the FpSpread class.

Since the .NET platform is completely different from the COM environment, there are many differences between the Spread file for the products in these two environments. For more information about importing Spread COM files and understanding compatibility with Spread Windows Forms, refer to the Version Comparison Reference.

Using Code

Use the OpenSpreadFile method of the FpSpread class, providing the path and file name for the file to open, or use the OpenSpreadFile method of the SheetView class (in the ActiveSheet or Sheets shortcut object).

Example

This example code opens a Spread COM 7 file in the active sheet.

C#
Copy Code
// Open an old Spread 7 file into the active sheet.
fpSpread1.ActiveSheet.OpenSpreadFile("C:\\oldfile.ss7");
VB
Copy Code
' Open an old Spread 7 file into the active sheet.
fpSpread1.ActiveSheet.OpenSpreadFile("C:\oldfile.ss7")

Using the Spread Designer

  1. From the File menu, select Open.
  2. A dialog appears warning you that this overwrites your existing settings if you open a file. Click Yes to continue with the file open.

    The Open dialog appears.

  3. Change the Files of type box to Spread 7 files (*.ss7 or *.ss8).
  4. Specify the path and file name of the file to open, and then click Open.

    If the file is opened successfully, a message appears stating the file has been opened.

  5. Click OK to close the Spread Designer.