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
62 changes: 31 additions & 31 deletions libraries/radspreadprocessing/features/clipboard-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ __Example 1__ creates a new workbook with a single worksheet and assigns some sa

#### __[C#] Example 1: Copy selected cells__

{{region radspreadprocessing-features-clipboard-support_0}}
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

worksheet.Cells[0, 0].SetValue("Product");
worksheet.Cells[1, 0].SetValue("Service");
worksheet.Cells[0, 1].SetValue(17.4);
worksheet.Cells[1, 1].SetValue(12.9);
worksheet.Cells[2, 0].SetValue("Total");
worksheet.Cells[2, 1].SetValue("=SUM(A1:B1)");

CellRange copiedCellRange = new CellRange(0, 0, 2, 1);
WorksheetFragment worksheetFragment = worksheet.Cells[copiedCellRange].Copy();
{{region cs-radspreadprocessing-features-clipboard-support_0}}
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();
worksheet.Cells[0, 0].SetValue("Product");
worksheet.Cells[1, 0].SetValue("Service");
worksheet.Cells[0, 1].SetValue(17.4);
worksheet.Cells[1, 1].SetValue(12.9);
worksheet.Cells[2, 0].SetValue("Total");
worksheet.Cells[2, 1].SetValue("=SUM(A1:B1)");
CellRange copiedCellRange = new CellRange(0, 0, 2, 1);
WorksheetFragment worksheetFragment = worksheet.Cells[copiedCellRange].Copy();
{{endregion}}


Expand Down Expand Up @@ -73,17 +73,17 @@ __Example 2__ creates a new workbook with an empty worksheet. Further, the examp

#### __[C#] Example 2: Copy all__

{{region radspreadprocessing-features-clipboard-support_1}}
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

worksheet.Cells[0, 0].SetValue("=CONCATENATE(\"Rad\", \"Spreadsheet\")");
worksheet.Cells[0, 0].SetForeColor(new ThemableColor(Colors.Green));

WorksheetFragment worksheetFragment = worksheet.Cells[0, 0].Copy();

PasteOptions pasteOptions = new PasteOptions(PasteType.All);
worksheet.Cells[1, 0].Paste(worksheetFragment, pasteOptions);
{{region cs-radspreadprocessing-features-clipboard-support_1}}
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();
worksheet.Cells[0, 0].SetValue("=CONCATENATE(\"Rad\", \"Spreadsheet\")");
worksheet.Cells[0, 0].SetForeColor(new ThemableColor(Colors.Green));
WorksheetFragment worksheetFragment = worksheet.Cells[0, 0].Copy();
PasteOptions pasteOptions = new PasteOptions(PasteType.All);
worksheet.Cells[1, 0].Paste(worksheetFragment, pasteOptions);
{{endregion}}


Expand All @@ -93,9 +93,9 @@ Using different __PasteType__, however, produces different output. __Example 3__

#### __[C#] Example 3: Paste using PasteType.Values__

{{region radspreadprocessing-features-clipboard-support_2}}
PasteOptions pasteOptionsValues = new PasteOptions(PasteType.Values);
worksheet.Cells[2, 0].Paste(worksheetFragment, pasteOptionsValues);
{{region cs-radspreadprocessing-features-clipboard-support_2}}
PasteOptions pasteOptionsValues = new PasteOptions(PasteType.Values);
worksheet.Cells[2, 0].Paste(worksheetFragment, pasteOptionsValues);
{{endregion}}


Expand All @@ -108,13 +108,13 @@ __Example 4__ combines the Value and Formats paste types and preserves both the

#### __[C#] Example 4: Combine Values and Formats PasteType__

{{region radspreadprocessing-features-clipboard-support_3}}
PasteOptions valuesAndFormatting = new PasteOptions(PasteType.Formulas | PasteType.Formats);
worksheet.Cells[3, 0].Paste(worksheetFragment, valuesAndFormatting);
{{region cs-radspreadprocessing-features-clipboard-support_3}}
PasteOptions valuesAndFormatting = new PasteOptions(PasteType.Formulas | PasteType.Formats);
worksheet.Cells[3, 0].Paste(worksheetFragment, valuesAndFormatting);
{{endregion}}



# See Also
## See Also

* [CellSelection]({%slug radspreadprocessing-working-with-cells-accessing-cells-of-worksheet%})
247 changes: 124 additions & 123 deletions libraries/radspreadprocessing/features/data-validation.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ __Example 1__ illustrates how the contents of column *A* can be copied to the re

#### __[C#] Example 1: Fill right__

{{region radspreadprocessing-features-fill-data-automatically-repeat-values_0}}
Workbook workbook = new Workbook();
workbook.Worksheets.Add();
Worksheet activeWorksheet = workbook.ActiveWorksheet;

activeWorksheet.Cells[0, 0].SetValue(5);
activeWorksheet.Cells[1, 0].SetValue(8);
activeWorksheet.Cells[2, 0].SetValue(13);
activeWorksheet.Cells[3, 0].SetValue(21);

CellRange range = new CellRange(0, 0, 3, 3);
activeWorksheet.Cells[range].FillData(FillDirection.Right);
{{region cs-radspreadprocessing-features-fill-data-automatically-repeat-values_0}}
Workbook workbook = new Workbook();
workbook.Worksheets.Add();
Worksheet activeWorksheet = workbook.ActiveWorksheet;
activeWorksheet.Cells[0, 0].SetValue(5);
activeWorksheet.Cells[1, 0].SetValue(8);
activeWorksheet.Cells[2, 0].SetValue(13);
activeWorksheet.Cells[3, 0].SetValue(21);
CellRange range = new CellRange(0, 0, 3, 3);
activeWorksheet.Cells[range].FillData(FillDirection.Right);
{{endregion}}


Expand All @@ -67,17 +67,17 @@ __Example 2__ invokes the __FillData()__ method with __FillDirection Down__ for

#### __[C#] Example 2: Fill down__

{{region radspreadprocessing-features-fill-data-automatically-repeat-values_1}}
Workbook workbook = new Workbook();
workbook.Worksheets.Add();
Worksheet activeWorksheet = workbook.ActiveWorksheet;

activeWorksheet.Cells[1, 1].SetValue(34);
activeWorksheet.Cells[1, 2].SetValue(55);
activeWorksheet.Cells[1, 3].SetValue(89);

CellRange range = new CellRange(1, 1, 3, 3);
activeWorksheet.Cells[range].FillData(FillDirection.Down);
{{region cs-radspreadprocessing-features-fill-data-automatically-repeat-values_1}}
Workbook workbook = new Workbook();
workbook.Worksheets.Add();
Worksheet activeWorksheet = workbook.ActiveWorksheet;
activeWorksheet.Cells[1, 1].SetValue(34);
activeWorksheet.Cells[1, 2].SetValue(55);
activeWorksheet.Cells[1, 3].SetValue(89);
CellRange range = new CellRange(1, 1, 3, 3);
activeWorksheet.Cells[range].FillData(FillDirection.Down);
{{endregion}}


Expand All @@ -88,7 +88,7 @@ __Figure 2__ demonstrates the result of __Example 2__.
#### Figure 2: Data filled down
![Rad Spread Processing Features Fill Data Automatically Repeat Values 02](images/RadSpreadProcessing_Features_Fill_Data_Automatically_Repeat_Values_02.png)

# See Also
## See Also

* [Accessing Cells of a Worksheet]({%slug radspreadprocessing-working-with-cells-accessing-cells-of-worksheet%})
* [Series]({%slug radspreadprocessing-features-fill-data-automatically-series%})
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,15 @@ __Example 1__ creates a new worksheet that has the value *1* in cell *A1* and *3

#### __[C#] Example 1: Fill linear series__

{{region radspreadprocessing-features-fill-data-automatically-series_0}}
{{region cs-radspreadprocessing-features-fill-data-automatically-series_0}}
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

worksheet.Cells[0, 0].SetValue(1);
worksheet.Cells[0, 1].SetValue(3);

CellRange range = new CellRange(0, 0, 0, 5);
worksheet.Cells[range].FillDataSeriesLinear(CellOrientation.Horizontal, 2);
worksheet.Cells[0, 0].SetValue(1);
worksheet.Cells[0, 1].SetValue(3);

CellRange range = new CellRange(0, 0, 0, 5);
worksheet.Cells[range].FillDataSeriesLinear(CellOrientation.Horizontal, 2);
{{endregion}}


Expand All @@ -80,20 +78,18 @@ __Example 2__ shows how to use __FillDataSeriesLinearTrend()__ to continue serie

#### __[C#] Example 2: Fill linear trend series__

{{region radspreadprocessing-features-fill-data-automatically-series_1}}
{{region cs-radspreadprocessing-features-fill-data-automatically-series_1}}
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

worksheet.Cells[0, 0].SetValue(1);
worksheet.Cells[0, 1].SetValue(8);
worksheet.Cells[0, 2].SetValue(3);
worksheet.Cells[0, 3].SetValue(10);
worksheet.Cells[0, 4].SetValue(5);

CellRange range = new CellRange(0, 0, 0, 9);
worksheet.Cells[range].FillDataSeriesLinearTrend(CellOrientation.Horizontal);
worksheet.Cells[0, 0].SetValue(1);
worksheet.Cells[0, 1].SetValue(8);
worksheet.Cells[0, 2].SetValue(3);
worksheet.Cells[0, 3].SetValue(10);
worksheet.Cells[0, 4].SetValue(5);

CellRange range = new CellRange(0, 0, 0, 9);
worksheet.Cells[range].FillDataSeriesLinearTrend(CellOrientation.Horizontal);
{{endregion}}


Expand All @@ -120,17 +116,15 @@ __Example 3__ shows how to use the __FillDataSeriesExponential()__ method to con

#### __[C#] Example 3: Fill exponential series__

{{region radspreadprocessing-features-fill-data-automatically-series_2}}
{{region cs-radspreadprocessing-features-fill-data-automatically-series_2}}
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

worksheet.Cells[0, 0].SetValue(1);
worksheet.Cells[0, 1].SetValue(3);

CellRange range = new CellRange(0, 0, 0, 5);
worksheet.Cells[range].FillDataSeriesExponential(CellOrientation.Horizontal, 4);
worksheet.Cells[0, 0].SetValue(1);
worksheet.Cells[0, 1].SetValue(3);

CellRange range = new CellRange(0, 0, 0, 5);
worksheet.Cells[range].FillDataSeriesExponential(CellOrientation.Horizontal, 4);
{{endregion}}


Expand All @@ -151,19 +145,17 @@ __Example 4__ shows how to use the __FillDataSeriesLinearTrend()__ method to con

#### __[C#] Example 4: Exponential trend series__

{{region radspreadprocessing-features-fill-data-automatically-series_3}}
{{region cs-radspreadprocessing-features-fill-data-automatically-series_3}}
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

worksheet.Cells[0, 0].SetValue(1);
worksheet.Cells[0, 1].SetValue(5);
worksheet.Cells[0, 2].SetValue(2);
worksheet.Cells[0, 3].SetValue(9);

CellRange range = new CellRange(0, 0, 0, 5);
worksheet.Cells[range].FillDataSeriesExponentialTrend(CellOrientation.Horizontal);
worksheet.Cells[0, 0].SetValue(1);
worksheet.Cells[0, 1].SetValue(5);
worksheet.Cells[0, 2].SetValue(2);
worksheet.Cells[0, 3].SetValue(9);

CellRange range = new CellRange(0, 0, 0, 5);
worksheet.Cells[range].FillDataSeriesExponentialTrend(CellOrientation.Horizontal);
{{endregion}}


Expand All @@ -190,16 +182,14 @@ __Example 5__ shows how to construct series that use *5/28/2013* as a starting p

#### __[C#] Example 5: Fill date series__

{{region radspreadprocessing-features-fill-data-automatically-series_4}}
{{region cs-radspreadprocessing-features-fill-data-automatically-series_4}}
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

worksheet.Cells[0, 0].SetValue(new DateTime(2013, 5, 28));

CellRange range = new CellRange(0, 0, 0, 9);
worksheet.Cells[range].FillDataSeriesDate(CellOrientation.Horizontal, DateUnitType.Weekday, 2);
worksheet.Cells[0, 0].SetValue(new DateTime(2013, 5, 28));

CellRange range = new CellRange(0, 0, 0, 9);
worksheet.Cells[range].FillDataSeriesDate(CellOrientation.Horizontal, DateUnitType.Weekday, 2);
{{endregion}}


Expand Down Expand Up @@ -284,16 +274,14 @@ __Example 6__ shows how to use the __FillDataSeriesAuto()__ method for initial v

#### __[C#] Example 6: Auto fill__

{{region radspreadprocessing-features-fill-data-automatically-series_5}}
{{region cs-radspreadprocessing-features-fill-data-automatically-series_5}}
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

worksheet.Cells[0, 0].SetValue("1st");

CellRange range = new CellRange(0, 0, 0, 5);
worksheet.Cells[range].FillDataSeriesAuto(CellOrientation.Horizontal, true);
worksheet.Cells[0, 0].SetValue("1st");

CellRange range = new CellRange(0, 0, 0, 5);
worksheet.Cells[range].FillDataSeriesAuto(CellOrientation.Horizontal, true);
{{endregion}}


Expand All @@ -309,16 +297,14 @@ __Example 7__ demonstrates the behavior of the __FillDataSeriesAuto()__ method.

#### __[C#] Example 7: Auto fill reversed direction__

{{region radspreadprocessing-features-fill-data-automatically-series_6}}
{{region cs-radspreadprocessing-features-fill-data-automatically-series_6}}
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();

worksheet.Cells[0, 5].SetValue("6th");

CellRange range = new CellRange(0, 5, 0, 0);
worksheet.Cells[range].FillDataSeriesAuto(CellOrientation.Horizontal, true);
worksheet.Cells[0, 5].SetValue("6th");

CellRange range = new CellRange(0, 5, 0, 0);
worksheet.Cells[range].FillDataSeriesAuto(CellOrientation.Horizontal, true);
{{endregion}}


Expand All @@ -329,7 +315,7 @@ __Figure 9__ demonstrates the result of __Example 7__.
#### Figure 8: Auto fill reversed direction
![Rad Spread Processing Features Fill Data Automatically Series 09](images/RadSpreadProcessing_Features_Fill_Data_Automatically_Series_09.png)

# See Also
## See Also

* [Accessing Cells of a Worksheet]({%slug radspreadprocessing-working-with-cells-accessing-cells-of-worksheet%})
* [Repeat Values]({%slug radspreadprocessing-features-fill-data-automatically-repeat-values%})
Loading