Spread Windows Forms 8.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, such as Spread 7.0. For details on opening a Spread COM file, refer to the OpenSpreadFile methods of the FpSpread class.
Since the .NET platform is completely different than 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.
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).
This example code opens a Spread 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") |
The Open dialog appears.
If the file is opened successfully, a message appears stating the file has been opened.