Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions libraries/radspreadstreamprocessing/features/cell-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ When you apply a style to a cell with locally set properties, the end result is

#### **[C#] Example 1: Get a built-in style and apply a number group**

{{region radspreadstreamprocessing-features-styling-cell-styles_0}}

{{region cs-radspreadstreamprocessing-features-styling-cell-styles_0}}
SpreadCellStyle style = workbook.CellStyles.GetByName("Good");
style.ApplyNumberFormat = true;
{{endregion}}
Expand All @@ -101,8 +100,7 @@ Creating a new style is pretty straight-forward. All you have to do is invoke th

#### **[C#] Example 2: Create SpreadCellStyle and apply it to a cell**

{{region radspreadstreamprocessing-features-styling-cell-styles_1}}

{{region cs-radspreadstreamprocessing-features-styling-cell-styles_1}}
SpreadBorder border = new SpreadBorder(SpreadBorderStyle.Thick, new SpreadThemableColor(new SpreadColor(255, 0, 0)));
SpreadCellStyle style = workbook.CellStyles.Add("MyStyle");

Expand All @@ -123,10 +121,10 @@ Creating a new style is pretty straight-forward. All you have to do is invoke th
style.Indent = 5;
style.VerticalAlignment = SpreadVerticalAlignment.Top;
style.WrapText = false;

cell.SetFormat(new SpreadCellFormat()
{
CellStyle = style
cell.SetFormat(new SpreadCellFormat()
{
CellStyle = style
});
{{endregion}}

Expand All @@ -138,9 +136,8 @@ Modifying a style is even easier than creating one. All you need to do is retrie

#### **[C#] Example 3: Modify a built-in style**

{{region radspreadstreamprocessing-features-styling-cell-styles_2}}

SpreadCellStyle style = workbook.CellStyles.GetByName("Bad");
{{region cs-radspreadstreamprocessing-features-styling-cell-styles_2}}
SpreadCellStyle style = workbook.CellStyles.GetByName("Bad");
style.IsBold = true;
{{endregion}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ You can create an instance of the IWorksheetViewExporter interface using the cor

#### **[C#] Example 1: Create IWorksheetViewExporter instance**

{{region radspreadstreamprocessing-features-worksheet-view-exporter_0}}

{{region cs-radspreadstreamprocessing-features-worksheet-view-exporter_0}}
using (IWorksheetViewExporter worksheetView = worksheetExporter.CreateWorksheetViewExporter())
{
// ...
// ...
}
{{endregion}}

Expand All @@ -52,15 +51,13 @@ With the IWorksheetViewExporter interface you can set the first visible cell. Th

#### **[C#] Example 2: Export a document with first visible cell C5**

{{region radspreadstreamprocessing-features-worksheet-view-exporter_1}}

{{region cs-radspreadstreamprocessing-features-worksheet-view-exporter_1}}
using (IWorksheetExporter worksheetExporter = workbookExporter.CreateWorksheetExporter("Sheet 1"))
{
using (IWorksheetViewExporter worksheetView = worksheetExporter.CreateWorksheetViewExporter())
{
worksheetView.SetFirstVisibleCell(4, 2);
}

// Fill the worksheet.
}
{{endregion}}
Expand All @@ -72,35 +69,31 @@ IWorksheetViewExporter defines methods that allow you apply selection to the exp

#### **[C#] Example 3: Export a document with applied multiple selection ranges**

{{region radspreadstreamprocessing-features-worksheet-view-exporter_2}}

using (IWorksheetExporter worksheet = workbookExporter.CreateWorksheetExporter("Sheet 1"))
{{region cs-radspreadstreamprocessing-features-worksheet-view-exporter_2}}
using (IWorksheetExporter worksheetExporter = workbookExporter.CreateWorksheetExporter("Sheet 1"))
{
using (IWorksheetViewExporter worksheetView = worksheet.CreateWorksheetViewExporter())
using (IWorksheetViewExporter worksheetView = worksheetExporter.CreateWorksheetViewExporter())
{
worksheetView.AddSelectionRange(2, 2, 5, 5);
worksheetView.AddSelectionRange(4, 4, 8, 8);
worksheetView.AddSelectionRange(3, 3, 10, 10);
}

// Fill the worksheet.
}
{{endregion}}


#### **[C#] Example 4: Export a document with selection range and specified active cell of the selection**

{{region radspreadstreamprocessing-features-worksheet-view-exporter_3}}

{{region cs-radspreadstreamprocessing-features-worksheet-view-exporter_3}}
using (IWorksheetExporter worksheet = workbookExporter.CreateWorksheetExporter("Sheet 1"))
{
using (IWorksheetViewExporter worksheetView = worksheet.CreateWorksheetViewExporter())
{
worksheetView.AddSelectionRange(2, 2, 5, 5);
worksheetView.SetActiveSelectionCell(3, 3);
}

// Fill the worksheet.
// Fill the worksheet with data.
}
{{endregion}}

Expand All @@ -114,7 +107,7 @@ You can apply a scale factor to the exported document.

#### **[C#] Example 5: Set scale factor**

{{region radspreadstreamprocessing-features-worksheet-view-exporter_4}}
{{region cs-radspreadstreamprocessing-features-worksheet-view-exporter_4}}
worksheetView.SetScaleFactor(0.5);
{{endregion}}

Expand All @@ -125,7 +118,7 @@ IWorksheetViewExporter enables you to set whether the resultant document should

#### **[C#] Example 6: Hide grid lines and row/column headers**

{{region radspreadstreamprocessing-features-worksheet-view-exporter_5}}
{{region cs-radspreadstreamprocessing-features-worksheet-view-exporter_5}}
worksheetView.SetShouldShowGridLines(false);
worksheetView.SetShouldShowRowColumnHeaders(false);
{{endregion}}
Expand All @@ -137,7 +130,7 @@ You can freeze panes in the spreadsheet document using the SetFreezePanes() meth

#### **[C#] Example 7: Set freeze panes**

{{region radspreadstreamprocessing-features-worksheet-view-exporter_6}}
{{region cs-radspreadstreamprocessing-features-worksheet-view-exporter_6}}
worksheetView.SetFreezePanes(4, 6);
{{endregion}}

Expand All @@ -148,7 +141,7 @@ An overload of the SetFreezePanes() method enables you to change the first visib

#### **[C#] Example 8: Set freeze panes and change the first visible cell of the scrollable pane**

{{region radspreadstreamprocessing-features-worksheet-view-exporter_7}}
{{region cs-radspreadstreamprocessing-features-worksheet-view-exporter_7}}
worksheetView.SetFreezePanes(4, 6, 10, 10);
{{endregion}}

Expand Down
34 changes: 16 additions & 18 deletions libraries/radspreadstreamprocessing/model/cells.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ A concrete instance of ICellExporter could be created through the **CreateCellEx
#### **[C#] Example 1: Using ICellExporter**


{{region radspreadstreamprocessing-model-cells_0}}
using (ICellExporter cell = row.CreateCellExporter())
{
{{region cs-radspreadstreamprocessing-model-cells_0}}
using (ICellExporter cell = row.CreateCellExporter())
{
}
{{endregion}}

Expand All @@ -58,10 +58,10 @@ The **SetValue()** method exposes several overloads allowing you to set values f

#### **[C#] Example 2: Setting a value to a cell**

{{region radspreadstreamprocessing-model-cells_1}}
using (ICellExporter cell = row.CreateCellExporter())
{
cell.SetValue(123.456);
{{region cs-radspreadstreamprocessing-model-cells_1}}
using (ICellExporter cell = row.CreateCellExporter())
{
cell.SetValue(123.456);
}
{{endregion}}

Expand All @@ -72,10 +72,10 @@ In order to allow you setting a formula as a value of a cell, ICellExporter defi

#### **[C#] Example 4: Setting a formula to a cell**

{{region radspreadstreamprocessing-model-cells_3}}
using (ICellExporter cell = row.CreateCellExporter())
{
cell.SetFormula("=Sum(A1, B2)");
{{region cs-radspreadstreamprocessing-model-cells_3}}
using (ICellExporter cell = row.CreateCellExporter())
{
cell.SetFormula("=Sum(A1, B2)");
}
{{endregion}}

Expand All @@ -91,8 +91,7 @@ In some cases you may need to skip several cells and start filling the data in t

#### **[C#] Example 3: Skip cells**

{{region radspreadstreamprocessing-model-cells_2}}

{{region cs-radspreadstreamprocessing-model-cells_2}}
row.SkipCells(5);
using (ICellExporter cell = row.CreateCellExporter())
{
Expand All @@ -110,10 +109,10 @@ In some cases you may need to skip several cells and start filling the data in t

#### **[C#] Example 5: Merge cells**

{{region radspreadstreamprocessing-model-cells_4}}
{{region cs-radspreadstreamprocessing-model-cells_4}}
using (IWorksheetExporter worksheet = workbook.CreateWorksheetExporter("Sheet 1"))
{
worksheet.MergeCells(3, 3, 10, 10);
{
worksheet.MergeCells(3, 3, 10, 10);
}
{{endregion}}

Expand Down Expand Up @@ -172,8 +171,7 @@ Another method, exposed by **ICellExporter** - SetFormat() - enables you to chan


#### **[C#] Example 6: Format cells**
{{region radspreadstreamprocessing-model-cells_5}}

{{region cs-radspreadstreamprocessing-model-cells_5}}
SpreadBorder border = new SpreadBorder(SpreadBorderStyle.Thick, new SpreadThemableColor(new SpreadColor(255, 0, 0)));

SpreadCellFormat cellFormat = new SpreadCellFormat()
Expand Down
11 changes: 4 additions & 7 deletions libraries/radspreadstreamprocessing/model/column.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ A concrete instance of IColumnExporter could be created through the CreateColumn
#### **[C#] Example 1: Create IColumnExporter**


{{region radspreadstreamprocessing-model-columns_0}}

{{region cs-radspreadstreamprocessing-model-columns_0}}
using (IColumnExporter column = worksheet.CreateColumnExporter())
{
}
Expand All @@ -56,11 +55,10 @@ In order to customize the way a column appears, you could use one of the followi

#### **[C#] Example 2: Set properties to IColumnExporter**

{{region radspreadstreamprocessing-model-columns_1}}

{{region cs-radspreadstreamprocessing-model-columns_1}}
using (IColumnExporter column = worksheet.CreateColumnExporter())
{
column.SetWidthInPixels(100);
column.SetWidthInPixels(100);
}
{{endregion}}

Expand All @@ -72,8 +70,7 @@ In some cases you may need to skip several columns and start filling the data in

#### **[C#] Example 3: Skip columns**

{{region radspreadstreamprocessing-model-columns_2}}

{{region cs-radspreadstreamprocessing-model-columns_2}}
worksheet.SkipColumns(5);
using (IColumnExporter column = worksheet.CreateColumnExporter())
{
Expand Down
11 changes: 4 additions & 7 deletions libraries/radspreadstreamprocessing/model/row.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ A concrete instance of IRowExporter could be created through the CreateRowExport
#### **[C#] Example 1: Create IRowExporter**


{{region radspreadstreamprocessing-model-rows_0}}

{{region cs-radspreadstreamprocessing-model-rows_0}}
using (IRowExporter row = worksheet.CreateRowExporter())
{
}
Expand All @@ -56,11 +55,10 @@ In order to customize the way a row appears, you could use one of the following

#### **[C#] Example 2: Set properties to IRowExporter**

{{region radspreadstreamprocessing-model-rows_1}}

{{region cs-radspreadstreamprocessing-model-rows_1}}
using (IRowExporter row = worksheet.CreateRowExporter())
{
row.SetHeightInPixels(200);
row.SetHeightInPixels(200);
}
{{endregion}}

Expand All @@ -72,8 +70,7 @@ In some cases you may need to skip several rows and start filling the data in th

#### **[C#] Example 3: Skip rows**

{{region radspreadstreamprocessing-model-rows_2}}

{{region cs-radspreadstreamprocessing-model-rows_2}}
worksheet.SkipRows(5);
using (IRowExporter row = worksheet.CreateRowExporter())
{
Expand Down
3 changes: 1 addition & 2 deletions libraries/radspreadstreamprocessing/model/workbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ The code from **Example 1** creates an empty workbook and exports it to an XLSX

#### **[C#] Example 1: Create IWorkbookExporter**

{{region radspreadstreamprocessing-model-workbook_0}}

{{region cs-radspreadstreamprocessing-model-workbook_0}}
using (FileStream stream = File.OpenWrite("sample.xlsx"))
{
using (IWorkbookExporter workbook = SpreadExporter.CreateWorkbookExporter(SpreadDocumentFormat.Xlsx, stream))
Expand Down
5 changes: 2 additions & 3 deletions libraries/radspreadstreamprocessing/model/worksheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ A concrete instance of IWorksheetExporter could be created through the CreateWor

#### **[C#] Example 1: Create IWorksheetExporter**

{{region radspreadstreamprocessing-model-worksheet_0}}

{{region cs-radspreadstreamprocessing-model-worksheet_0}}
using (IWorksheetExporter worksheet = workbook.CreateWorksheetExporter("My sheet"))
{
// Fill the worksheet with data and set the desired properties
// Fill the worksheet with data and set the desired properties
}
{{endregion}}

Expand Down