Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7547153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:22:50+00:00 2026-05-30T09:22:50+00:00

In my Perl script I use the Spreadsheet::WriteExcel module to create an Excel file.

  • 0

In my Perl script I use the Spreadsheet::WriteExcel module to create an Excel file. The file contains a table, the size of which is dynamic – i.e., I don’t know how many rows it will have until the table is already created. I would like the last row of the table to have a slightly different format (e.g., its bottom border to be “===”). Unfortunately, I cannot apply this (different) format at the time when the row is being created, since at that time I don’t know yet that it will be the last row.

So, my question is: can I change the format of an already existing cell without changing its contents? If I pass undef as cell value to the $worksheet->write() method it just overwrites the contents of the cell with a blank cell.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:22:52+00:00Added an answer on May 30, 2026 at 9:22 am

    The direct answer to your question is that you cannot modify the format of an already written cell in Spreadsheet::WriteExcel. This is a planned feature for Excel::Writer::XLSX but it isn’t in place yet.

    So you will need to workaround it in some way such as buffering the table data until you are ready to write it or buffering a row at a time and only writing it when you have a new row.

    Or you could turn on compatiblilty_mode() and overwrite the last row with new formatted data. Note, this approach isn’t recommended without compatibility_mode() since Excel will complain about duplicate and or missing data in the file.

    Alternatively, setting the row format, as pointed out by @bvr, might work for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a perl script read Excel file and parse using a perl module
when I try to use a third part module in my perl script, I
I'm debugging a perl script which looks like this (simplified): #!/usr/bin/perl use strict; use
I have a perl script (or any executable) E which will take a file
I found this perl script online but I don't know how to use it.
I am trying to use RegEx within my Perl script to parse a file
I'm trying to use the fisher.test function, which is called from a perl script
I am writing a Perl/Tk script which displays Excel worksheets using the ss2tk example
I'm converting a classified ad/flat file perl script to use mysql/dbi; I have this
I have a Perl script I wrote for my own personal use that fetches

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.