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 a9fdc41

Browse files
Update the example (#1)
1 parent 20f705f commit a9fdc41

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

‎CS/SpreadsheetDocServerAPIPart2/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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# Spreadsheet Document Server API - Part 2
1+
# Spreadsheet Document API - Part 2
22

33

4-
This example demonstrates how to use the <a href="http://help.devexpress.com/#DocumentServer/CustomDocument14912">Spreadsheet Document Server</a> API to programmatically manage spreadsheet documents, without the need for Microsoft Excel to be installed.<br>The application includes the <a href="https://documentation.devexpress.com/#WindowsForms/CustomDocument6975">RichEditControl</a> used 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 backcolor of the code window changes.<br><br>This sample introduces API properties and methods used to perform the following operations:<br>
5-
<p>- Insert, delete and modify pictures<br>- Add a hyperlink to a picture<br>- Create a table<br>- Apply a custom style to the table<br>- Protect a workbook<br>- Protect a worksheet<br>- Apply user-specific permissions to a range in a protected worksheet<br>- Sort a range in descending and ascending orders<br>- Sort by multiple columns<br>- Simple search<br>- Search with options <br>- Export to HTML<br>- Group and outline data<br>- Insert subtotals<br>- Filter data by a list of values<br>- Apply a number filter<br>- Apply a text filter <br>- Apply a dynamic filter<br>- Sort the filtered data<br><br>For more information, review the <a href="http://help.devexpress.com/#DocumentServer/CustomDocument12074"><u>Examples</u></a> section in the documentation.<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.</p>
6-
4+
This example demonstrates how to use the <a href="https://documentation.devexpress.com/OfficeFileAPI/14912/Spreadsheet-Document-API">Spreadsheet Document API</a> to programmatically manage spreadsheet documents, without the need for Microsoft Excel to be installed.<br>The application includes the <a href="https://documentation.devexpress.com/#WindowsForms/CustomDocument6975">RichEditControl</a> used to display and edit the code. The code modifies the spreadsheet document loaded in 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 backcolor of the code window changes.<br><br>This sample introduces API properties and methods used to perform the following operations:<br>
5+
<p>- Insert, delete and modify pictures<br>- Add a hyperlink to a picture<br>- Create a table<br>- Apply a custom style to the table<br>- Protect a workbook<br>- Protect a worksheet<br>- Apply user-specific permissions to a range in a protected worksheet<br>- Sort a range in descending and ascending orders<br>- Sort by multiple columns<br>- Simple search<br>- Search with options <br>- Export to HTML<br>- Group and outline data<br>- Insert subtotals<br>- Filter data by a list of values<br>- Apply a number filter<br>- Apply a text filter <br>- Apply a dynamic filter<br>- Sort the filtered data<br><br>For more information, review the <a href="https://documentation.devexpress.com/OfficeFileAPI/12074/Spreadsheet-Document-API/Examples"><u>Examples</u></a> section in the documentation.<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.</p>
76
<br/>
87

98

‎VB/SpreadsheetDocServerAPIPart2/CodeUtils/CodeExampleModel.vb‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ Namespace SpreadsheetDocServerAPIPart2
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 によって変換されたページ (->オリジナル) /