Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

234
Visualizações
Add rows at begining of excel with out overwriting the already present row using python xlswriter

I have a excel file which consists of data. I need to Add few rows at the beginning of the excel file without overwriting the already present rows at beginning.

The code i am trying shown below works fine in adding the rows to excel but its replacing the contents at the initial rows or overwriting on top of it.

workbook = xlsxwriter.Workbook('Demo.xlsx')
worksheet = workbook.add_worksheet()
worksheet.set_column('A:F', 20)
worksheet.set_row(1, 30)
worksheet.set_row(2, 50)
worksheet.set_row(3, 50)
merge_format = workbook.add_format({
    'bold': 1,
    'border': 5,
    'font_size':15,
    'align': 'center',
    'valign': 'vcenter',
    'fg_color': 'white'})

worksheet.merge_range('A1:F1', 'Production Description, Amazon', merge_format)
# Merge 3 cells over two rows.
worksheet.merge_range('A2:F2', 'Sample Name', merge_format)
worksheet.merge_range('A3:F3', 'Progress Reports : Internal Assessment 1', merge_format)
about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda