Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e83b0fb

Browse files
Update the example
1 parent 9f24125 commit e83b0fb

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

‎CS/SpreadsheetDocServerPivotAPI/CodeUtils/CodeExampleModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ public List<CodeExample> ParseSourceFileAndFindRegionsWithExamples(string groupN
374374

375375
foreach (var match in matches)
376376
{
377-
string[] lines = match.ToString().Split(new string[] { "\r\n" }, StringSplitOptions.None);
377+
string matchString = match.ToString();
378+
string splitter = matchString.IndexOf("\r\n") >= 0 ? "\r\n" : "\n";
379+
string[] lines = match.ToString().Split(new string[] { splitter }, StringSplitOptions.None);
378380

379381
if (lines.Length <= 2)
380382
continue;

‎Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Spreadsheet Document Server Pivot Table API
1+
# Spreadsheet Pivot Table API
22

33

4-
This example demonstrates how to use the <a href="http://help.devexpress.com/#DocumentServer/CustomDocument14912">Spreadsheet Document Server</a> <strong>Pivot Table API</strong> to create and modify pivot tables in code.<br>The application uses the <a href="https://documentation.devexpress.com/#WindowsForms/CustomDocument6975">RichEditControl</a> to display and edit the code. The code modifies the spreadsheet document loaded in the <a href="http://help.devexpress.com/#DocumentServer/clsDevExpressSpreadsheetWorkbooktopic">Workbook</a> instance. To see the results, open the document in Microsoft Excel by clicking the button.<br>You can modify the code and watch the result. If an error occurs during compilation or execution, the background color of the code window changes.<br><br>The<strong> Universal Subscription</strong> or an additional <strong>Document Server Subscription</strong> is required to use this example in production code. Please refer to the <a href="http://www.devexpress.com/Subscriptions/">DevExpress Subscription</a> page for pricing information.
4+
This example demonstrates how to use the <a href="https://documentation.devexpress.com/OfficeFileAPI/14912/Spreadsheet-Document-API">Spreadsheet Document API</a> to create and modify pivot tables in code.<br>The application uses the <a href="https://documentation.devexpress.com/#WindowsForms/CustomDocument6975">RichEditControl</a> to display and edit the code. The code modifies the spreadsheet document loaded into the <a href="https://documentation.devexpress.com/OfficeFileAPI/DevExpress.Spreadsheet.Workbook.class">Workbook</a> instance. To see the results, open the document in Microsoft Excel by clicking the button.<br>You can modify the code and watch the result. If an error occurs during compilation or execution, the background color of the code window changes.<br><br>The<strong> Universal Subscription</strong> or an additional <strong>Office File API Subscription</strong> is required to use this example in production code. Please refer to the <a href="https://www.devexpress.com/Buy/NET/">DevExpress Subscription</a> page for pricing information.
55

66
<br/>
77

‎VB/SpreadsheetDocServerPivotAPI/CodeUtils/CodeExampleModel.vb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ Namespace SpreadsheetDocServerPivotAPI
327327
Dim matches = Regex.Matches(sourceCode, RegexRegionPattern, RegexOptions.Singleline)
328328

329329
For Each match In matches
330-
Dim lines() As String = match.ToString().Split(New String() { ControlChars.CrLf }, StringSplitOptions.None)
330+
Dim matchString As String = match.ToString()
331+
Dim splitter As String = If(matchString.IndexOf(Constants.vbCrLf) >= 0, Constants.vbCrLf, Constants.vbLf)
332+
Dim lines() As String = match.ToString().Split(New String() { splitter }, StringSplitOptions.None)
331333

332334
If lines.Length <= 2 Then
333335
Continue For

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /