Tag: XLWINGS
Tengo un archivo de Excel del cual quiero usar 2 columnas para un marco de datos de pandas. La primera columna debe ser el índice y tiene fechas con horas (día mes año horas minutos). La segunda columna tiene los valores correspondientes. Cuando uso el siguiente código: df = acc_used_range.options( . . . Read more
Antecedentes Utilizo xlwings dentro de Excel, acabo de recibir este mensaje indicando que Xlwings no pudo encontrar la ubicación de mi OneDrive. Seguí los pasos que se indican en su sección de solución de problemas y pude resolverlo parcialmente. Me di cuenta de que OneDrive necesita estar sin pausar (es . . . Read more
He exportado un dataframe a Excel utilizando xlwings y estoy intentando darle formato como una tabla. Quiero aplicar el estilo “None” pero no puedo entender cómo especificar el “None”. Esta línea funciona: table = sheet.tables.add(source=sheet[“A1″].expand(), name=’TableName’, table_style_name=”TableStyleLight1″) Pero en lugar de “TableStyleLight1” quiero utilizar “None”. He intentado con “”, ”, . . . Read more
Tengo un archivo de excel llamado refresh_excel.xlsx en el que se ha escrito una consulta de energía simple para obtener archivos de una carpeta, combinarlos y cargarlos y ver los registros. Para fines de automatización, tengo un script de Python simple como el siguiente. import win32com.client xlapp = win32com.client.DispatchEx(“Excel.Application”) wb . . . Read more
Windows 10, Python 3.6, xlwings 0.24.9 Ejemplo: xlsx_book = xw.books.active sht = xlsx_book.sheets['esta pestaña'] sht.range('B5').value = 3 sht.range('B5').api.AddComment('modelo #3') Aunque los comentarios se inserten, el código todavía muestra lo siguiente: Traceback (most recent call last): File “C:\Users\xxx\OneDrive – xxx.py”, línea xxx, in sht.range(‘B5’).api.AddComment(‘modelo #3’) File “C:\Users\xxx\AppData\Roaming\Python\Python36\site-packages\xlwings_xlwindows.py”, línea 70, en call . . . Read more