def mapeaXMLenXLS(excel, file, hoja_excel_mapeada, fila=1): print file #Creamos los datos mapeados para serializarlos en excel extracter=TagExtracter(file,initMapeado=True) mapeados=extracter.getMapeados() #Serializamos el objeto en filas y columnas dentro de la hoja mapeada xml_mapped_as_xls=SerializedFileInExcelSheet(hoja_excel_mapeada,mapeados,excel, row=fila) #Guardamos los datos del xml serializado hoja_excel_mapeada.addMappedXML(xml_mapped_as_xls,file) return xml_mapped_as_xls
def mapeaXMLenXLS1(excel, file): #file="../files/curso2.xml" #file="../files/test.xml" extracter=TagExtracter(file,initMapeado=True) traduccion=creaHojaDeTraduccion(excel) audio = creaHojaDeAudios(excel, "audios") mapeados=extracter.getMapeados() estructura=creaHojaDeEstructura(excel, mapeados[0]) hoja_excel_mapeada=HojaEstructura(estructura) xml_mapped_as_xls=SerializedFileInExcelSheet(hoja_excel_mapeada,mapeados,excel, row=1) #mappedFile, name, first_row, last_row hoja_excel_mapeada.addMappedXML(xml_mapped_as_xls,file) hoja_excel_mapeada.hoja.protect = True hoja_excel_mapeada.hoja.hide=True print hoja_excel_mapeada.hoja