Last change
on this file since 12073 was
9580,
checked in by sforsten, 12 years ago
|
#1730:
- added SymbolicDataAnalysisExpressionExcelFormatter
- changed modifiers in SymbolicExpressionTreeChart of methods SaveImageAsBitmap and SaveImageAsEmf to public
- added menu item ExportSymbolicSolutionToExcelMenuItem to export a symbolic solution to an excel file
- added EPPlus-3.1.3 to ExtLibs
|
File size:
1000 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Text.RegularExpressions;
|
---|
6 |
|
---|
7 | namespace OfficeOpenXml.Utils
|
---|
8 | {
|
---|
9 | public static class AddressUtility
|
---|
10 | {
|
---|
11 | public static string ParseEntireColumnSelections(string address)
|
---|
12 | {
|
---|
13 | string parsedAddress = address;
|
---|
14 | var matches = Regex.Matches(address, "[A-Z]+:[A-Z]+");
|
---|
15 | foreach (Match match in matches)
|
---|
16 | {
|
---|
17 | AddRowNumbersToEntireColumnRange(ref parsedAddress, match.Value);
|
---|
18 | }
|
---|
19 | return parsedAddress;
|
---|
20 | }
|
---|
21 |
|
---|
22 | private static void AddRowNumbersToEntireColumnRange(ref string address, string range)
|
---|
23 | {
|
---|
24 | var parsedRange = string.Format("{0}{1}", range, ExcelPackage.MaxRows);
|
---|
25 | var splitArr = parsedRange.Split(new char[] { ':' });
|
---|
26 | address = address.Replace(range, string.Format("{0}1:{1}", splitArr[0], splitArr[1]));
|
---|
27 | }
|
---|
28 | }
|
---|
29 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.