22{
33 using MiniExcelLibs . Utils ;
44 using System ;
5- internal static class ExcelOpenXmlUtils
5+ #if DEBUG
6+ public
7+ #else
8+ internal
9+ #endif
10+ static class ExcelOpenXmlUtils
611 {
712 /// <summary>
813 /// Encode to XML (special characteres: ' " > < &)
914 /// </summary>
10- internal static string EncodeXML ( string value ) => value == null
15+ public static string EncodeXML ( string value ) => value == null
1116 ? string . Empty
1217 : XmlEncoder . EncodeString ( value )
1318 . Replace ( "&" , "&" )
@@ -18,13 +23,13 @@ internal static string EncodeXML(string value) => value == null
1823 . ToString ( ) ;
1924
2025 /// <summary>X=CellLetter,Y=CellNumber,ex:A1=(1,1),B2=(2,2)</summary>
21- internal static string ConvertXyToCell ( Tuple < int , int > xy )
26+ public static string ConvertXyToCell ( Tuple < int , int > xy )
2227 {
2328 return ConvertXyToCell ( xy . Item1 , xy . Item2 ) ;
2429 }
2530
2631 /// <summary>X=CellLetter,Y=CellNumber,ex:A1=(1,1),B2=(2,2)</summary>
27- internal static string ConvertXyToCell ( int x , int y )
32+ public static string ConvertXyToCell ( int x , int y )
2833 {
2934 int dividend = x ;
3035 string columnName = String . Empty ;
@@ -40,12 +45,12 @@ internal static string ConvertXyToCell(int x, int y)
4045 }
4146
4247 /// <summary>X=CellLetter,Y=CellNumber,ex:A1=(1,1),B2=(2,2)</summary>
43- internal static Tuple < int , int > ConvertCellToXY ( string cell )
48+ public static Tuple < int , int > ConvertCellToXY ( string cell )
4449 {
4550 return Tuple . Create ( GetCellColumnIndex ( cell ) , GetCellRowNumber ( cell ) ) ;
4651 }
4752
48- internal static int GetColumnNumber ( string name )
53+ public static int GetColumnNumber ( string name )
4954 {
5055 int number = - 1 ;
5156 int pow = 1 ;
@@ -58,7 +63,7 @@ internal static int GetColumnNumber(string name)
5863 return number ;
5964 }
6065
61- internal static int GetCellColumnIndex ( string cell )
66+ public static int GetCellColumnIndex ( string cell )
6267 {
6368 const string keys = " ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;
6469 const int mode = 26 ;
@@ -72,7 +77,7 @@ internal static int GetCellColumnIndex(string cell)
7277 return x ;
7378 }
7479
75- internal static int GetCellRowNumber ( string cell )
80+ public static int GetCellRowNumber ( string cell )
7681 {
7782 if ( string . IsNullOrEmpty ( cell ) )
7883 throw new Exception ( "cell is null or empty" ) ;
@@ -85,7 +90,7 @@ internal static int GetCellRowNumber(string cell)
8590 return int . Parse ( cellNumber ) ;
8691 }
8792
88- internal static string GetCellColumnLetter ( string cell )
93+ public static string GetCellColumnLetter ( string cell )
8994 {
9095 string GetCellLetter = string . Empty ;
9196 for ( int i = 0 ; i < cell . Length ; i ++ )
@@ -96,7 +101,7 @@ internal static string GetCellColumnLetter(string cell)
96101 return GetCellLetter ;
97102 }
98103
99- internal static string ConvertColumnName ( int x )
104+ public static string ConvertColumnName ( int x )
100105 {
101106 int dividend = x ;
102107 string columnName = String . Empty ;
0 commit comments