# Saving and Loading Map Files

Learn how to save and load input maps to XML files using Spread for .NET

## Content

You can load or save the input maps to an XML file. Use the [SaveXmlInputMapFile](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.SaveXmlInputMapFile.html) method to save to a file and the [LoadXmlInputMapFile](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.LoadXmlInputMapFile.html) to load from an input map file.
Spread installs a default Excel compatibility XML file to the input map folder.

## Using Code

1. Create an input map.
2. Save the input map to a file.

## Example

This example saves an input map to an XML file.

```csharp
FarPoint.Win.Spread.SpreadView sv = fpSpread1.GetRootWorkbook();
                FarPoint.Win.Spread.InputMap im = new FarPoint.Win.Spread.InputMap();
                im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextRow);
                sv.SetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused, im);
                fpSpread1.SaveXmlInputMapFile("file.xml", FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused, FarPoint.Win.Spread.OperationMode.Normal);
```

```vbnet
Dim sv As FarPoint.Win.Spread.SpreadView = fpSpread1.GetRootWorkbook
                Dim im As New FarPoint.Win.Spread.InputMap()
                im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextRow)
                sv.SetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused, im)
                fpSpread1.SaveXmlInputMapFile("file.xml", FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused,
                FarPoint.Win.Spread.OperationMode.Normal)
```

## Using the Spread Designer

1. Select the **Settings** menu and then select the **Input Map** icon located under the **Other Settings** section.
2. From the **Select InputMap** section, select the mode options.
3. Specify the shortcut key and action.
4. Click **Add** to add the new input map.
5. Use the **Save** button to save the input map to a file. Use the **Load Input Maps** button to load an input map file instead.
6. Select **OK** to apply the input map.
7. From the **File** menu choose **Apply and Exit** to apply your changes to the component and exit Spread Designer.

## See Also

[Keyboard Interaction](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-mappingkeys)
[Underlying Keystroke Processing](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-mappingkeys/spwin-maps-keysyswin)
[Factors of Keyboard Map Usage](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-mappingkeys/spwin-maps-factors)
[Default Keyboard Navigation](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-mappingkeys/spwin-maps-keybdnav)
[Default Keyboard Maps](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-mappingkeys/spwin-maps-defaultmaps)
[Deactivating the Default Keyboard Map](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-mappingkeys/spwin-maps-defaultoff)
[Changing the Default Keyboard Map](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-mappingkeys/spwin-maps-defaultnew)
[Using Input Maps with Action Maps](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-mappingkeys/spwin-maps-action)
[Customizing the Input Maps](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-mappingkeys/spwin-maps-custominput)
[Changing an Input Map for a Child View](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-mappingkeys/spwin-maps-child)
[Using the Excel Compatibility Input Maps](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-mappingkeys/spwin-maps-using)