Estoy utilizando la lib hbxlsxwriter pero generar archivos Excel, algo así:
textleft y textLeftCancelled son formatos que luego se utilizan así:workbook := workbook_new("ventac.xlsx")
worksheet := workbook_add_worksheet(workbook, 'venta')
textLeft = workbook_add_format(workbook)
format_set_align(textLeft, LXW_ALIGN_LEFT)
format_set_align(textLeft, LXW_ALIGN_VERTICAL_CENTER)
format_set_font_name(textLeft, "Calibri")
format_set_font_size(textLeft, 09)
textLeftCancelled = workbook_add_format(workbook)
format_set_align(textLeftCancelled, LXW_ALIGN_LEFT)
format_set_align(textLeftCancelled, LXW_ALIGN_VERTICAL_CENTER)
format_set_font_name(textLeftCancelled, "Calibri")
format_set_font_size(textLeftCancelled, 09)
format_set_bg_color(textLeftCancelled, 0xFF0000)
format_set_font_color(textLeftCancelled, 0xFFFFFF)
format_set_bold(textLeftCancelled)
worksheet_write_string(worksheet, linea, 0, fechaLegible(fecha), IIF( cancelado, textLeftCancelled, textLeft) )
Pero esa definición son más de 100 líneas porque estoy utilizando muchos formatos por ello la necesidad de sacar la definición de los formatos a otro archivo prg utilizando memvar, pero en los formatos utilizo la variable workbook y esa variable debe estar en cada reporte..., no sé si pude explicar claramente mi problema y necesidad... alguna idea?.
Saludos,
Javier