473,548 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Shifting columns in excel using perl

1 New Member
Hi,
I am using perl. I have generated my 2d array datas using formy loop from A4 to D4. I want that datas from N4 to T4.


#!usr/local/bin/perl
print("Enter the no of corners:");
$corners=<STDIN >;

use Spreadsheet::Wr iteExcel;

my $workbook = Spreadsheet::Wr iteExcel->new( 'newproj.xls' );
my $worksheet = $workbook->add_worksheet( );
my $format = $workbook->add_format() ;
$format->set_bold();

@array = ( ["","","","","", "","",""] , ["","","","","", "","",""] , ["","","","","", "","",""] , [1,2,3,4,5,6,7] ,[2,4,6,8,10,12,1 4],[3,6,9,12,15,18, 21] );

for my $i(0 .. $corners)
{
for my $j(0 .. 5)
{
$worksheet->write($j, $i , $array[$j][$i])
}
}

$workbook->close();
Feb 6 '17 #1
0 4531

Sign in to post your reply or Sign up for a free account.

Similar topics

1
6179
by: barma16 | last post by:
I've hit a bit of a brick wall here, and could use some advice. I have an Access application whose output is a four-tab Excel spreadsheet where three of the four tabs are the result of database queries. A number of fields in the queries are designed to become formulae in Excel after the export has taken place (and they need to be in Excel...
3
4003
by: rahatekarabhijeet | last post by:
I want to create excel sheet using perl, i had installed all the necessary modules from CPAN. The perl program i taken from CPAN itself it is given below, #!/usr/bin/perl -w use warnings; use strict; use Excel::Template; # Create the Excel template my $template = Excel::Template->new(
1
10472
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am trying to export to Excel using a command in an Access Form. RowID strFY AccountID CostElementWBS 1 2008 1 ...
0
2287
by: shintu | last post by:
Hallo, I am trying to write french accented characters é è ê in Excel worksheet using my perl script , But I am stuck here as I couldnt find a way of writing it !: My code: use strict; use warnings;
2
2288
by: danny2000 | last post by:
Hi all. Please excuse my ignorance here, but is it possible and / or efficient to do things such as insert worksheets, make charts, pivot tables, filter data in an excel workbook using Perl? I'm trying to establish whether I have a better option than VBA. Thanks.
3
5939
by: zaxxon25 | last post by:
I am having an issue with attaching 2 attachments one xip and other excel file with email and sending using perl sendmail. I tried to look on various forums and everywhere i get advice using MIME :: Lite. Unfortunately i cannot use it . I have tried to write a program on my own to send 2 attachments and sending using perl sendmail but program is...
12
4028
by: vijayarl | last post by:
Hi All, To Moderator : Sorry i have posted this querry to member rather putting in the forum. To All: Problem stmt: I am reading the data from the excel files & writing its content to another excel file.problem is that everytime it reads data it writes all the content.
4
5430
by: ravir81 | last post by:
Hi, I am currently working on excel validation using Perl. I am new to Excel validation but not for Perl. I have a question regarding one of the validation. Could anyone please tell me how to get the number of duplicate rows based on a particular cell value of each these duplicate rows. I mean all the cell values of a row will not be...
1
1623
by: chintan85 | last post by:
Hi Guys, I have some rows in excel in which one of the cell is green in color while rest of rows are either white or orange. I have want to extract row which has the cell with bgcolor green using PERL code. Can somebody suggest me on how to do this. Any help is appreciated! Chintan
0
2810
by: sravan | last post by:
I am producing 5 different Excel worksheets (.csv file) using Perl. I want to combine all these as one file (Excel workbook) with 5 different worksheets rather then have 5 seperate files. here is the script i'm using now .. #!/usr/bin/perl -w use lib "/csv2xl/lib/site_perl"; use strict;
0
7438
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7803
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6036
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5082
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3475
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
751
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.