@@ -238,6 +238,13 @@ internal static extern IntPtr DeleteComment(
238238 [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string cell
239239 ) ;
240240
241+ [ DllImport ( LibraryName , CallingConvention = CallingConvention . Cdecl ) ]
242+ internal static extern IntPtr DeleteFormControl (
243+ long fileIdx ,
244+ [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string sheet ,
245+ [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string cell
246+ ) ;
247+
241248 [ DllImport ( LibraryName , CallingConvention = CallingConvention . Cdecl ) ]
242249 internal static extern IntPtr DeletePicture (
243250 long fileIdx ,
@@ -583,6 +590,13 @@ internal static extern IntPtr StreamSetRow(
583590 long length
584591 ) ;
585592
593+ [ DllImport ( LibraryName , CallingConvention = CallingConvention . Cdecl ) ]
594+ internal static extern IntPtr UnsetConditionalFormat (
595+ long swIdx ,
596+ [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string cell ,
597+ [ MarshalAs ( UnmanagedType . LPUTF8Str ) ] string rangeRef
598+ ) ;
599+
586600 [ DllImport ( LibraryName , CallingConvention = CallingConvention . Cdecl ) ]
587601 internal static extern IntPtr UpdateLinkedValue ( long fileIdx ) ;
588602
@@ -2762,6 +2776,34 @@ public void DeleteComment(string sheet, string cell)
27622776 throw new RuntimeError ( err ) ;
27632777 }
27642778
2779+ /// <summary>
2780+ /// DeleteFormControl provides the method to delete form control in a
2781+ /// worksheet by given worksheet name and cell reference.
2782+ /// <example>
2783+ /// For example, delete the form control in Sheet1!$A$1:
2784+ /// <code>
2785+ /// try
2786+ /// {
2787+ /// f.DeleteFormControl("Sheet1", "A1");
2788+ /// }
2789+ /// catch (RuntimeError err)
2790+ /// {
2791+ /// Console.WriteLine(err.Message);
2792+ /// }
2793+ /// </code>
2794+ /// </example>
2795+ /// </summary>
2796+ /// <param name="sheet">The worksheet name</param>
2797+ /// <param name="cell">The cell reference</param>
2798+ /// <exception cref="RuntimeError">Return None if no error occurred,
2799+ /// otherwise raise a RuntimeError with the message.</exception>
2800+ public void DeleteFormControl ( string sheet , string cell )
2801+ {
2802+ string err = Marshal . PtrToStringUTF8 ( Lib . DeleteFormControl ( FileIdx , sheet , cell ) ) ;
2803+ if ( ! string . IsNullOrEmpty ( err ) )
2804+ throw new RuntimeError ( err ) ;
2805+ }
2806+
27652807 /// <summary>
27662808 /// Delete all pictures in a cell by given worksheet name and cell
27672809 /// reference.
@@ -4818,6 +4860,24 @@ public void SetWorkbookProps(WorkbookPropsOptions options)
48184860 throw new RuntimeError ( err ) ;
48194861 }
48204862
4863+ /// <summary>
4864+ /// UnsetConditionalFormat provides a function to unset the conditional
4865+ /// format by given worksheet name and range reference.
4866+ /// </summary>
4867+ /// <param name="sheet">The worksheet name</param>
4868+ /// <param name="rangeRef">The top-left and right-bottom cell range
4869+ /// reference</param>
4870+ /// <exception cref="RuntimeError">Return None if no error occurred,
4871+ /// otherwise raise a RuntimeError with the message.</exception>
4872+ public void UnsetConditionalFormat ( string sheet , string rangeRef )
4873+ {
4874+ string err = Marshal . PtrToStringUTF8 (
4875+ Lib . UnsetConditionalFormat ( FileIdx , sheet , rangeRef )
4876+ ) ;
4877+ if ( ! string . IsNullOrEmpty ( err ) )
4878+ throw new RuntimeError ( err ) ;
4879+ }
4880+
48214881 /// <summary>
48224882 /// Fix linked values within a spreadsheet are not updating in Office
48234883 /// Excel application. This function will be remove value tag when met a
0 commit comments