Unable to set the NumberFormat property of the Range class

In the course practice “Reconciliation”,I always stuck at the step“Insert Column”,shows as below. Pls help thx2021-09-17_135350

1.1 SequenceX (SequenceX)																				
	Private = False																			
	Variables																			
		Notes(IWorkbookQuickHandle)																		
		Saved(BindingsRepository)																		
	Activities																			
		1.4 Use Browser Chrome: ACME System 1 - Dashboard (NApplicationCard)																		
			Unified Application Target																	
				Selector = <html app='chrome.exe' title='ACME System 1 - Dashboard'/>																
				URL = https://acme-test.uipath.com/reboot-your-skills																
			Input mode = HardwareEvents																	
			Window attach mode = ByInstance																	
			Resize window = None																	
			Private = False																	
			Body																	
				1.5 Do (Sequence)																
					Private = False															
					Activities															
						1.13 Click 'Internal Invoices' (NClick)														
							Key modifiers = None													
							Click type = Single													
							Mouse button = Left													
							Input mode = SameAsCard													
							Target													
								Window selector (Application instance) = <html app='chrome.exe' title='ACME System 1 - Dashboard' />												
								Selector = <webctrl aaname='                      Internal Invoices' parentid='dashmenu' tag='BUTTON' />												
								Fuzzy selector = <webctrl aaname='                      Internal Invoices' parentid='dashmenu' tag='BUTTON' type='button' check:text='Internal Invoices' />												
								Targeting methods = FuzzySelector, Image												
							Private = False													
						1.30 Wait for Download (GetLastDownloadedFile)														
							Downloads folder = string.Format("{0}\Downloads", Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))													
							Downloaded file = Saved.Values(Of System.IO.FileInfo)("Fullreport")													
							Private = False													
							Body													
								1.31 Do (Sequence)												
									Private = False											
									Activities											
										1.6 Click 'Download Full' (NClick)										
											Key modifiers = None									
											Click type = Single									
											Mouse button = Left									
											Input mode = SameAsCard									
											Target									
												Window selector (Application instance) = <html app='chrome.exe' title='ACME System 1 - Dashboard' />								
												Selector = <webctrl aaname='Download Full Invoice Report' parentid='dashmenu' tag='A' />								
												Fuzzy selector = <webctrl aaname='Download Full Invoice Report' parentid='dashmenu' tag='A' type='' check:text='Download Full Invoice Report' />								
												Targeting methods = FuzzySelector, Image								
											Private = False									
						1.6 Click 'Internal Invoices' (NClick)														
							Key modifiers = None													
							Click type = Single													
							Mouse button = Left													
							Input mode = SameAsCard													
							Target													
								Window selector (Application instance) = <html app='chrome.exe' title='ACME System 1 - Dashboard' />												
								Selector = <webctrl aaname='                      Internal Invoices' parentid='dashmenu' tag='BUTTON' />												
								Fuzzy selector = <webctrl aaname='                      Internal Invoices' parentid='dashmenu' tag='BUTTON' type='button' check:text='Internal Invoices' />												
								Targeting methods = FuzzySelector, Image												
							Private = False													
						1.6 Click 'Download Monthly' (NClick)														
							Key modifiers = None													
							Click type = Single													
							Mouse button = Left													
							Input mode = SameAsCard													
							Target													
								Window selector (Application instance) = <html app='chrome.exe' title='ACME System 1 - Dashboard' />												
								Selector = <webctrl aaname='Download Monthly Invoices' parentid='dashmenu' tag='A' />												
								Fuzzy selector = <webctrl aaname='Download Monthly Invoices' parentid='dashmenu' tag='A' type='' check:text='Download Monthly Invoices' />												
								Targeting methods = FuzzySelector, Image												
							Private = False													
						1.6 Use Excel File (ExcelApplicationCard)														
							Workbook path = Saved.Values(Of System.IO.FileInfo)("Fullreport").FullName													
							Create if not exists = True													
							Save changes = True													
							Read-only = False													
							Private = False													
							Body													
								1.7 Do (Sequence)												
									Private = False											
									Activities											
										1.8 Insert Column (InsertColumnX)										
											Range = Fullreport.Sheet("Sheet1").Range("export")									
											Relative to column = E									
											Where to insert = After									
											Add header = Reconcile									
											Has headers = False									
											Private = False									
										1.8 For Each Excel Row (ExcelForEachRow)										
											In range = Fullreport.Sheet("Sheet1").Range("export")									
											Has headers = True									
											EmptyRowBehavior = Stop									
											Save after each row = False									
											Private = False									
											Body									
												1.9 Do (Sequence)								
													Private = False							
													Activities							
														1.10 Type Into 'Vendor TaxID' (NTypeInto)						
															Text = CurrentRow.ByField("Vendor")					
															Activate = True					
															Click before typing = Single					
															Empty field = SingleLine					
															Input mode = SameAsCard					
															Target					
																Window selector (Application instance) = <html app='chrome.exe' title='ACME System 1 - Download Monthly Invoices' />				
																Anchor 1				
																	Selector = <webctrl tag='LABEL' />			
																	Fuzzy selector = <webctrl tag='LABEL' type='' aaname='Vendor TaxID:' check:text='Vendor TaxID:' />			
																	Targeting methods = FuzzySelector, Image			
																Selector = <webctrl tag='INPUT' />				
																Fuzzy selector = <webctrl tag='INPUT' type='text' aaname='' />				
																Targeting methods = FuzzySelector, Image				
															Private = False					
														1.10 Write Text File (WriteTextFile)						
															FileName = Notes.Sheet("Scratchpad").Cell("_A1")					
															Text = CurrentRow.ByField("Month")					
															Private = False					
														1.10 Write Text File (WriteTextFile)						
															FileName = Notes.Sheet("Scratchpad").Cell("_A2")					
															Text = string.Format("=text({0}*29,""mmmm"")", Notes.Sheet("Scratchpad").Cell("_A1"))					
															Private = False					
														1.10 Select Item 'Month' (NSelectItem)						
															Item = Notes.Sheet("Scratchpad").Cell("_A2")					
															Target					
																Window selector (Application instance) = <html app='chrome.exe' title='ACME System 1 - Download Monthly Invoices' />				
																Anchor 1				
																	Selector = <webctrl aaname='Month:' tag='LABEL' />			
																	Fuzzy selector = <webctrl aaname='Month:' tag='LABEL' type='' check:text='Month:' />			
																	Targeting methods = FuzzySelector, Image			
																Selector = <webctrl tag='SELECT' />				
																Fuzzy selector = <webctrl tag='SELECT' type='' aaname='' />				
																Targeting methods = FuzzySelector				
															Private = False					
														1.8 Wait for Download (GetLastDownloadedFile)						
															Downloads folder = string.Format("{0}\Downloads", Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))					
															Downloaded file = Saved.Values(Of System.IO.FileInfo)("monthreport")					
															Private = False					
															Body					
																1.9 Do (Sequence)				
																	Private = False			
																	Activities			
																		1.10 Click 'Download Report' (NClick)		
																			Key modifiers = None	
																			Click type = Single	
																			Mouse button = Left	
																			Input mode = SameAsCard	
																			Target	
																				Window selector (Application instance) = <html app='chrome.exe' title='ACME System 1 - Download Monthly Invoices' />
																				Selector = <webctrl id='buttonDownload' tag='BUTTON' />
																				Fuzzy selector = <webctrl id='buttonDownload' tag='BUTTON' type='button' aaname='Download Report' check:text='Download Report' />
																				Targeting methods = FuzzySelector, Image
																			Private = False	
														1.10 Use Excel File (ExcelApplicationCard)						
															Workbook path = Saved.Values(Of System.IO.FileInfo)("monthreport").FullName					
															Create if not exists = True					
															Save changes = True					
															Read-only = False					
															Private = False					
															Body					
																1.11 Do (Sequence)				
																	Private = False			
																	Activities			
																		1.12 Write Cell (WriteCellX)		
																			Where to write = VendorReport.Sheet("Worksheet").Cell("H2")	
																			What to write = string.Format("=sum(E:E)")	
																			Auto increment row = False	
																			Private = False	
																		1.12 Write Cell (WriteCellX)		
																			Where to write = CurrentRow.ByField("Reconcile")	
																			What to write = string.Format("{0}-{1}", CurrentRow.ByField("Total"), VendorReport.Sheet("Worksheet").Cell("H2").ToString)	
																			Auto increment row = False	
																			Private = False	

Hi

I think you need to allow Formatting of cells in your excel
@Torres

Dear thx.I unprotected the Excel manually,the bug remains. It has Insert the Column, but show that error.

Is it throwing same error
@Torres

Yes,the Same Error. :sweat_smile: