I experienced that one (the last) keyword argument was ignored when used in excel com api.
The code below represents my experience and a workaround i discovered. First open a excel window than run the code. It will open a dialog box to input a cell selection. It will wait for input.
import win32com.client as com
Excel = com.Dispatch('Excel.Application')
kwargs = {'Prompt':'msg', 'Title':'title', 'Default':None, 'Left':None, 'Top':None, 'HelpFile':None, 'HelpContextID':None, 'Type':8}
Range = Excel.Application.InputBox(**kwargs)
Next select a range and click ok in the InputBox-Dialog. InputBox should return now. Range contains the top-left content of the selected range as a string. This is the default behavior if no Type argument is passed, which shouldn't bethecasesince we passed a non-default Type value. C.f. InputBox Doc
I originally posted this at xlwings/xlwings#1909 where someone else reported the same bug.
A workaround i discovered is to use positional args instead of kwargs i.e.:
Range = Excel.Application.InputBox('msg',None,None,None,None,None, None, 8)
I experienced that one (the last) keyword argument was ignored when used in excel com api.
The code below represents my experience and a workaround i discovered. First open a excel window than run the code. It will open a dialog box to input a cell selection. It will wait for input.
Next select a range and click ok in the InputBox-Dialog. InputBox should return now.
Range
contains the top-left content of the selected range as a string. This is the default behavior if no Type argument is passed, which shouldn't bethecasesince we passed a non-default Type value. C.f. InputBox DocI originally posted this at xlwings/xlwings#1909 where someone else reported the same bug.
A workaround i discovered is to use positional args instead of kwargs i.e.:
Edit: complete the example and rephrasing