Assign Excel cell value from Datepicker widget Selection using Python

2020-06-28 Thread narenchunduri
When I run the python code I should be able to open my Excel and when I click 
on one Excel cell I should have my datepicker widget popped up and I should be 
able to select any date from my datepicker widget as my Excel cell value

Tried below code but in vain: (Used jupyter Notebook)

from ipywidgets import widgets
from openpyxl import *

wb = load_workbook('My_Excel.xlsx')
worksheet = wb.active
worksheet['B1'] = 'Datepicker'
worksheet['B2'] = widgets.DatePicker()
wb.save('My_Excel.xlsx')
wb.close()
Error Occured: ValueError: Cannot convert DatePicker(value=None) to Excel
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-06-28 Thread narenchunduri
Datepicker is returning two different types. before date change its  and after change its 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-06-28 Thread narenchunduri
Do we have any other to achive my query
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-06-28 Thread narenchunduri
Is there any other way to achieve my query? 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-06-30 Thread narenchunduri
Thx kushal for your valuable points
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-07-04 Thread narenchunduri
I am trying to assign a widget to an excel cell. Convertion wont help me.Thanks
-- 
https://mail.python.org/mailman/listinfo/python-list


Need a Dynamic vlookup using python

2020-07-11 Thread narenchunduri
Any suggestions please
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Need a Dynamic vlookup using python

2020-07-12 Thread narenchunduri
Sorry for not making it clear.
I tried below code

# import modules
from openpyxl import *
from openpyxl.styles import *
import webbrowser
import pandas
from openpyxl.worksheet.datavalidation import DataValidation


# Read all Excels into pandas dataframes
sowexcel = pandas.read_excel('Billing Roster - SOW.xlsx')

#Load the existing Resource Allocation Excel
wb = load_workbook('ACFC_Resource_Allocation.xlsx')
allocationsheet = wb.active

def load():

maxrow = allocationsheet.max_row

sow_list = sowexcel['SOW #'].tolist()
column_sow = ','.join(sow_list)
validator_sow = DataValidation(type='list', 
formula1='"{}"'.format(column_sow), allow_blank=True) 
allocationsheet.add_data_validation(validator_sow)
validator_sow.add('D2:D%s' %maxrow)


# save the file
wb.save('ACFC_Resource_Allocation.xlsx')
wb.close()


# Driver code
if __name__ == "__main__":

load()
file_open = webbrowser.open('ACFC_Resource_Allocation.xlsx')

In Billing Roster - SOW.xlsx I have new column data one is named as SOW and 
other is named SOW Description (Match value for SOW).
And now when i open ACFC_Resource_Allocation.xlsx excel and for an example if 
select a value in D2 (SOW) cell from the dropdown i should get a matching value 
into E2 cell after the selection from dropdown.

I only have an idea than a vlookup from Excel like below should solve my case. 
Not sure how to achieve in python.
=VLOOKUP(D2,'[Billing Roster - SOW.xlsx]SOW List'!$A$1:$B$14,1,FALSE)

Please let me know if am not still clear.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Need a Dynamic vlookup using python

2020-07-19 Thread narenchunduri
Any solution possible for this. 
Please let me know
-- 
https://mail.python.org/mailman/listinfo/python-list