Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!