Spread for ASP.NET 7.0 Product Documentation
Save(SheetSkin,Stream) Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetSkin Class > Save Method : Save(SheetSkin,Stream) Method


skin
Name of the skin
stream
Stream to which to save the skin

Glossary Item Box

Saves a skin to a stream.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Sub Save( _
   ByVal skin As SheetSkin, _
   ByVal stream As Stream _
) 
Visual Basic (Usage)Copy Code
Dim skin As SheetSkin
Dim stream As Stream
 
SheetSkin.Save(skin, stream)
C# 
public static void Save( 
   SheetSkin skin,
   Stream stream
)

Parameters

skin
Name of the skin
stream
Stream to which to save the skin

Example

This example saves a skin and then loads it in another spreadsheet.
C#Copy Code
FarPoint.Web.Spread.SheetSkin sk = new FarPoint.Web.Spread.SheetSkin("TestSkin", Color.LightGoldenrodYellow, Color.Wheat,
Color.DarkGreen, 2, Color.YellowGreen, GridLines.Both, Color.Thistle, Color.BlanchedAlmond, Color.Wheat, Color.DarkBlue, Color.Empty,
Color.Empty, false, false, true, true, true);
FarPoint.Web.Spread.SheetSkin sk1;
sk.Apply(FpSpread1);
if (IsPostBack)
{
    System.IO.FileStream s, s1;
    s = System.IO.File.Create("D:\\skinsave1.skn", IO.FileMode.Create);
    sk1.Save(sk, s);
    s.Flush();
    s.Close();
    s1 = System.IO.File.Open("D:\\skinsave1.skn", IO.FileMode.Open);
    sk1.Load(s1).Apply(FpSpread2);
}
Visual BasicCopy Code
Dim sk As New FarPoint.Web.Spread.SheetSkin("TestSkin", Color.LightGoldenrodYellow, Color.Wheat, Color.DarkGreen, 2, Color.YellowGreen,
GridLines.Both, Color.Thistle, Color.BlanchedAlmond, Color.Wheat, Color.DarkBlue, Nothing, Nothing, False, False, True, True,
True)
Dim sk1 As FarPoint.Web.Spread.SheetSkin
sk.Apply(FpSpread1)
If IsPostBack Then
    Dim s, s1 As System.IO.FileStream
    s = System.IO.File.Create("D:\skinsave1.skn", IO.FileMode.Create)
    sk1.Save(sk, s)
    s.Flush()
    s.Close()
    s1 = System.IO.File.Open("D:\skinsave1.skn", IO.FileMode.Open)
    sk1.Load(s1).Apply(FpSpread2)
End If

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.