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

  • SEARCH
  • Home
  • 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 6874803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:14:25+00:00 2026-05-27T04:14:25+00:00

I am using Spreadsheet::WriteExcel to create an excel and write some data into it.

  • 0

I am using Spreadsheet::WriteExcel to create an excel and write some data into it.
I am using the merge_range to merger some cells.
But the problem is my below code does merge cells but dont show the data in it ($str contents).
I am not able to figure out why????.

Please help me, where did i going wrong?

Below is the part of my code:

#!/usr/bin/perl

use Spreadsheet::WriteExcel;
use strict;

my $wb = Spreadsheet::WriteExcel->new('excel_test.xls');
my $custom_ws = $wb->add_worksheet('Custom Parameters');

my $wb_format_merge = $wb->add_format();
$wb_format_merge->set_bold();
$wb_format_merge->set_text_wrap();
$wb_format_merge->set_border(1);
$wb_format_merge->set_align('left');
$wb_format_merge->set_valign('vcenter');

my($row, $coll) = 0;
my $merge_coll_len = 8;

###### write data ###
my $str = "Please select the follwong metrics to generate custom report in Details sheet";
$custom_ws->merge_range($row, $coll, $row, $coll + $merge_coll_len, $str,$merge_format);

$row += 2;
$custom_ws->write($row, $coll, 'select the data type for the reference');
  • 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-27T04:14:25+00:00Added an answer on May 27, 2026 at 4:14 am
    my($row, $coll) = 0;
    

    $coll is undefined

    use

    my($row, $coll)=(0,0);

    Using 4 row,coll,row,coll for the merge_range is perfectly valid (provided they have values 😉 )

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

Sidebar

Related Questions

The excel spreadsheet is connecting to SQL server 2005 using the connection string below:
I'm using Java and OpenXLS to write out an Excel spreadsheet. I want to
The problem: Loading an excel spreadsheet template. Using the Save command with a different
I'm using the Excel COM interop to insert images (specifically EPS) into a spreadsheet.
I have used Spreadsheet::WriteExcel for creating spreadsheet report. I tried to merge some cells
Today I started using the spreadsheet gem to make my excel files, but one
I am reading data from an Excel 2007 spreadsheet using ADO. Setting up the
I have a script that pulls data out of an excel spreadsheet using the
I'm trying to query an Excel spreadsheet using SQL. The problem I'm facing is
I have a C# method, see code below, that generates an Excel spreadsheet using

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.